-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cleanup setup.py and make Python 3 compatible * Remove write_version_py() * Add setup.cfg * Add metadata to setup.cfg and code cleanup
- Loading branch information
Showing
2 changed files
with
66 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[metadata] | ||
author = bcbio community | ||
author_email = [email protected] | ||
classifiers = | ||
Environment :: Console | ||
Intended Audience :: Education | ||
Intended Audience :: Healthcare Industry | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Natural Language :: English | ||
Operating System :: POSIX :: Linux | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Topic :: Scientific/Engineering :: Bio-Informatics | ||
description = Best-practice pipelines for fully automated high throughput sequencing analysis | ||
keywords = ChIP-seq, DNA, genomics, pipeline, RNA, RNA-seq, sequencing, SNP, variant calling | ||
license = MIT | ||
license_file = LICENSE.txt | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
name = bcbio-nextgen | ||
project_urls = | ||
Documentation = https://bcbio-nextgen.readthedocs.io/ | ||
Source = https://github.com/bcbio/bcbio-nextgen | ||
Tracker = https://github.com/bcbio/bcbio-nextgen/issues | ||
url = https://github.com/bcbio/bcbio-nextgen | ||
|
||
[options] | ||
include_package_data = True | ||
packages = find: | ||
python_requires = >=3.6 | ||
scripts = | ||
scripts/bcbio_nextgen.py | ||
scripts/bcbio_setup_genome.py | ||
scripts/bcbio_prepare_samples.py | ||
scripts/bcbio_fastq_umi_prep.py | ||
scripts/cwltool2wdl.py | ||
zip_safe = False | ||
|
||
[options.packages.find] | ||
include = bcbio, bcbio.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,28 @@ | ||
#!/usr/bin/env python | ||
"""Setup file and install script for NextGen sequencing analysis scripts. | ||
""" | ||
|
||
"""Setup file and install script for NextGen sequencing analysis scripts""" | ||
|
||
import os | ||
from setuptools import setup, find_packages | ||
import subprocess | ||
|
||
import setuptools | ||
|
||
version = "1.2.0" | ||
VERSION = '1.2.0' | ||
|
||
def write_version_py(): | ||
version_py = os.path.join(os.path.dirname(__file__), 'bcbio', 'pipeline', | ||
'version.py') | ||
try: | ||
import subprocess | ||
p = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"], | ||
stdout=subprocess.PIPE) | ||
githash = p.stdout.read().strip() | ||
except: | ||
githash = "" | ||
with open(version_py, "w") as out_handle: | ||
out_handle.write("\n".join(['__version__ = "%s"' % version, | ||
'__git_revision__ = "%s"' % githash])) | ||
# add bcbio version number and git commit hash of the current revision to version.py | ||
try: | ||
git_run = subprocess.run(['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE) | ||
git_run.check_returncode() | ||
except subprocess.SubprocessError: | ||
commit_hash = '' | ||
else: | ||
commit_hash = git_run.stdout.strip().decode() | ||
|
||
install_requires = [] # install dependencies via conda | ||
zip_safe = False | ||
scripts = ['scripts/bcbio_nextgen.py', 'scripts/bcbio_setup_genome.py', 'scripts/bcbio_prepare_samples.py', | ||
'scripts/bcbio_fastq_umi_prep.py', 'scripts/cwltool2wdl.py'] | ||
here = os.path.dirname(os.path.abspath(__file__)) | ||
with open(os.path.join(here, 'bcbio', 'pipeline', 'version.py'), 'w') as version_file: | ||
version_file.writelines([f'__version__ = "{VERSION}"\n', | ||
f'__git_revision__ = "{commit_hash}"\n']) | ||
|
||
write_version_py() | ||
setup(name="bcbio-nextgen", | ||
version=version, | ||
author="bcbio community", | ||
author_email="[email protected]", | ||
description="Best-practice pipelines for fully automated high throughput sequencing analysis", | ||
long_description=(open('README.rst').read()), | ||
license="MIT", | ||
url="https://github.com/bcbio/bcbio-nextgen", | ||
packages=find_packages(exclude=["tests"]), | ||
zip_safe=zip_safe, | ||
scripts=scripts, | ||
install_requires=install_requires, | ||
include_package_data=True) | ||
# dependencies are installed via Conda from | ||
# https://github.com/chapmanb/cloudbiolinux/blob/master/contrib/flavor/ngs_pipeline_minimal/packages-conda.yaml | ||
setuptools.setup(version=VERSION) |