-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathsetup.py
executable file
·93 lines (83 loc) · 3.3 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env python3
# to install: `pip3 install -e .`
# to install latest from pypi: `pip3 install --upgrade --upgrade-strategy eager --no-cache-dir pheweb`
# to upload to pypi: `./setup.py publish`
# to update deps: `kpa pip-find-updates`, edit, `pip3 install -U --upgrade-strategy=eager .`, test
# to test: `./setup.py test` or `pytest`
from setuptools import setup
import importlib
import sys
if sys.platform.startswith('win'):
raise Exception("PheWeb doesn't support Windows, because pysam doesn't support windows.")
if sys.version_info.major <= 2:
print("PheWeb requires Python 3. Please use Python 3 by installing it with `pip3 install pheweb` or `python3 -m pip install pheweb`.")
sys.exit(1)
if sys.version_info < (3, 6):
print("PheWeb requires Python 3.6 or newer. Use Miniconda or Homebrew or another solution to install a newer Python.")
sys.exit(1)
def load_module_by_path(module_name, filepath):
spec = importlib.util.spec_from_file_location(module_name, filepath)
if not spec: raise Exception(module_name, filepath, spec)
module = importlib.util.module_from_spec(spec)
module.__spec__.loader.exec_module(module)
return module
version = load_module_by_path('pheweb.version', 'pheweb/version.py').version
if sys.argv[-1] in ['publish', 'pub']:
import kpa.pypi_utils
kpa.pypi_utils.upload_package('pheweb', version)
sys.exit(0)
setup(
name='PheWeb',
version=version,
description="A tool for building PheWAS websites from association files",
long_description='Please see the README `on github <https://github.com/statgen/pheweb>`__',
author="Peter VandeHaar",
author_email="[email protected]",
url="https://github.com/statgen/pheweb",
classifiers=[
'Programming Language :: Python :: 3 :: Only',
'Operating System :: Unix',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
packages=['pheweb'],
entry_points={'console_scripts': [
'pheweb=pheweb.command_line:main',
'detect-ref=pheweb.load.detect_ref:main',
]},
include_package_data=True,
zip_safe=False,
cffi_modules=['pheweb/load/cffi/ffibuilder.py:ffibuilder'],
python_requires=">=3.6",
setup_requires=[
'cffi~=1.15',
'pytest-runner~=5.2',
],
install_requires=[
'Flask~=1.1',
'Flask-Compress~=1.8',
'Flask-Login~=0.5',
'rauth~=0.7',
'pysam~=0.16',
'intervaltree~=3.1',
'tqdm~=4.56',
'scipy~=1.5',
'numpy~=1.19',
'requests[security]~=2.25',
'gunicorn~=20.0.4',
'boltons~=20.2',
'cffi~=1.15', # in both `setup_requires` and `install_requires` as per <https://github.com/pypa/setuptools/issues/391>
'wget~=3.2',
'gevent~=21.1',
'psutil~=5.8',
'markupsafe==2.0.1', # flask 1.1 uses jinja 2.x which breaks with markupsafe>2.0.1. Pinning all deps might be better.
],
tests_require=[
'pytest~=6.2',
],
)