-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
111 lines (91 loc) · 3.98 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python
# How to build source distribution
# - python setup.py sdist --format bztar
# - python setup.py sdist --format gztar
# - python setup.py sdist --format zip
# - python setup.py bdist_wheel
# How to build for conda
# - bash conda_build.sh
import os
import sys
from setuptools import setup
MAJOR = 1
MINOR = 5
MICRO = 0
VERSION = "{0}.{1}.{2}".format(MAJOR, MINOR, MICRO)
def check_python_version():
"""Checks the python version, exits if < 3.7."""
python_major, python_minor = sys.version_info[:2]
if python_major != 3 or python_minor < 7:
sys.stderr.write("genipe requires python 3 (version 3.7 or higher)\n")
sys.exit(1)
def write_version_file(fn=None):
if fn is None:
fn = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
os.path.join("genipe", "version.py"),
)
content = ("\n# THIS FILE WAS GENERATED AUTOMATICALLY BY GENIPE SETUP.PY\n"
'genipe_version = "{version}"\n')
a = open(fn, "w")
try:
a.write(content.format(version=VERSION))
finally:
a.close()
def setup_package():
# Checking the python version prior to installation
check_python_version()
# Saving the version into a file
write_version_file()
setup(
name="genipe",
version=VERSION,
description="An automatic genome-wide imputation pipeline.",
long_description=("This package provides tools to automatically "
"perform a genome-wide imputation analysis, "
"including the different imputation steps using "
"well known softwares, as well as downstream "
"statistical analysis. It also provides an "
"automatic report (using LaTeX), showing different "
"quality metrics about the imputation process."),
author="Louis-Philippe Lemieux Perreault",
author_email="[email protected]",
url="https://github.com/pgxcentre/genipe",
license="CC BY-NC 4.0",
entry_points={
"console_scripts": [
"genipe-launcher=genipe.pipeline.cli:main",
"impute2-merger=genipe.tools.impute2_merger:main",
"impute2-extractor=genipe.tools.impute2_extractor:main",
"imputed-stats=genipe.tools.imputed_stats:main",
"genipe-tutorial=genipe.tools.genipe_tutorial:main",
],
},
install_requires=["numpy >= 1.20", "Jinja2 >= 2.11",
"pandas >= 1.2", "setuptools >= 12.0.5"],
packages=["genipe", "genipe.pipeline", "genipe.task", "genipe.db",
"genipe.tools", "genipe.formats", "genipe.reporting",
"genipe.config", "genipe.tests"],
package_data={"genipe.reporting": ["templates/*.tex",
"templates/biblio/*",
"templates/utils/*",
"templates/parts/*.tex"],
"genipe.tests": ["data/*"],
"genipe": ["script_templates/*"]},
test_suite="genipe.tests.test_suite",
zip_safe=False,
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: Free for non-commercial use",
"Operating System :: Unix",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Scientific/Engineering :: Bio-Informatics"],
keywords="bioinformatics imputation pipeline analysis",
)
return
if __name__ == "__main__":
setup_package()