Skip to content

Commit

Permalink
improved setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyunzhu committed Apr 24, 2020
1 parent 18c1466 commit e8414f6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 44 deletions.
20 changes: 19 additions & 1 deletion hgtector/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
__version__ = "2.0b1"
#!/usr/bin/env python3

# ----------------------------------------------------------------------------
# Copyright (c) 2013--, Qiyun Zhu and Katharina Dittmar.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------

__name__ = 'hgtector'
__version__ = '2.0b2'
__description__ = (
'Genome-wide detection of putative horizontal gene transfer (HGT) events '
'based on sequence homology search hit distribution statistics')
__license__ = 'BSD-3-Clause'
__author__ = 'Qiyun Zhu',
__email__ = 'qiyunzhu@gmail.com',
__url__ = 'https://github.com/DittmarLab/HGTector'
Empty file added hgtector/tests/__init__.py
Empty file.
10 changes: 3 additions & 7 deletions scripts/hgtector
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ import sys
import argparse
from importlib import import_module

import hgtector.__init__ as init

__version__ = '2.0b1'

description = """HGTector: Genome-wide detection of putative horizontal gene \
transfer (HGT) events based on sequence homology search hit distribution \
statistics."""

module_names = ('search', 'analyze', 'database')

Expand Down Expand Up @@ -55,8 +51,8 @@ def parse_args(modules):
arguments
"""
parser = argparse.ArgumentParser(
description=description, add_help=False,
epilog='version: {}'.format(__version__),
description=init.__description__, add_help=False,
epilog=f'version: {init.__version__}',
formatter_class=argparse.RawDescriptionHelpFormatter)
subparsers = parser.add_subparsers(
title='commands', dest='command', required=True)
Expand Down
63 changes: 27 additions & 36 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from setuptools import setup, find_packages
from glob import glob

import hgtector.__init__ as init


classes = """
Development Status :: 4 - Beta
Expand All @@ -25,39 +27,28 @@
Operating System :: Windows
"""

classifiers = [s.strip() for s in classes.split('\n') if s]


description = (
'Genome-wide detection of putative horizontal gene transfer (HGT) events '
'based on sequence homology search hit distribution statistics')

long_description = open('README.md').read()


setup(
name='hgtector',
version='2.0b1',
license='BSD-3-Clause',
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
author='Qiyun Zhu',
author_email='qiyunzhu@gmail.com',
url='https://github.com/DittmarLab/HGTector',
packages=find_packages(),
scripts=glob('scripts/hgtector'),
package_data={'hgtector': ['config.yml']},
include_package_data=True,
install_requires=[
'pyyaml',
'numpy',
'scipy',
'pandas',
'scikit-learn',
'matplotlib'
],
classifiers=classifiers,
python_requires='>=3.6',
entry_points='[console_scripts]'
)
params = {
'name': init.__name__,
'version': init.__version__,
'license': init.__license__,
'description': init.__description__,
'long_description': open('README.md').read(),
'long_description_content_type': 'text/markdown',
'author': init.__author__,
'author_email': init.__email__,
'url': init.__url__,
'install_requires': ['pyyaml',
'numpy',
'scipy',
'pandas',
'scikit-learn',
'matplotlib'],
'classifiers': classes.strip().split('\n '),
'python_requires': '>=3.6',
'entry_points': '[console_scripts]',
'scripts': glob(f'scripts/{init.__name__}'),
'package_data': {init.__name__: ['config.yml']},
'include_package_data': True
}

setup(**params, packages=find_packages())

0 comments on commit e8414f6

Please sign in to comment.