-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathsetup.py
79 lines (69 loc) · 2.55 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import io
import sys
import os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
here = os.path.join(os.path.abspath(os.path.dirname(__file__)))
def parse_reqs(req_path = "./requirements.txt"):
"""Recursively parse requirements from nested pip files."""
install_requires = []
with io.open(os.path.join(here, req_path), encoding="utf-8") as handle:
# remove comments and empty lines
lines = (line.strip() for line in handle if line.strip() and not line.startswith("#"))
for line in lines:
# check for nested requirements files
if line.startswith("-r"):
# recursively call this function
install_requires += parse_reqs(req_path=line[3:])
else:
# add the line as a new requirement
install_requires.append(line)
return install_requires
about = {}
with open(os.path.join(here, "genmod/__version__.py")) as f:
exec(f.read(), about)
# What packages are required for this module to be executed?
REQUIRED = parse_reqs()
# Shortcut for building/publishing to Pypi
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist bdist_wheel upload')
sys.exit()
# For making things look nice on pypi:
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError, RuntimeError):
long_description = 'Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.'
setup(name='genmod',
version='3.9',
description='Annotate genetic inheritance models in variant files',
author = 'Mans Magnusson',
author_email = 'mans.magnusson@scilifelab.se',
url = 'http://github.com/Clinical-Genomics/genmod',
license = 'MIT License',
install_requires=REQUIRED,
packages=find_packages(
exclude=('tests*', 'docs', 'examples', 'configs')
),
# package_data = {
# 'genmod': ['annotations/*']
# },
include_package_data = True,
entry_points= { "console_scripts" : [
"genmod = genmod.commands.base:cli",
]
},
keywords = ['inheritance', 'vcf', 'variants'],
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Unix",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
long_description = long_description,
)