-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
110 lines (97 loc) · 4.68 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
# coding: utf-8
"""Setup file for PyPI"""
from setuptools import setup, find_packages
from setuptools.extension import Extension
from distutils.extension import Extension
from Cython.Build import cythonize
from codecs import open
from os import path
import glob
import re
import sys
import numpy as np
### See comment here https://github.com/cython/cython/issues/2498
numpy_nodepr_api = dict(define_macros=[("NPY_NO_DEPRECATED_API",
"NPY_1_9_API_VERSION")])
here = path.abspath(path.dirname("__file__"))
with open(path.join(here, "DESCRIPTION.md"), encoding="utf-8") as description:
long_description = description.read()
if sys.version_info.major != 3:
raise EnvironmentError("""Mikado is a pipeline specifically programmed for python3,
and is not compatible with Python2. Please upgrade your python before proceeding!""")
requirements = [line.rstrip() for line in open("requirements.txt", "rt")]
extensions = [Extension("Mikado.utilities.overlap",
sources=[path.join("Mikado", "utilities", "overlap.pyx")],
**numpy_nodepr_api),
Extension("Mikado.utilities.f1",
sources=[path.join("Mikado", "utilities", "f1.pyx")],
**numpy_nodepr_api),
Extension("Mikado.scales.contrast",
sources=[path.join("Mikado", "scales", "contrast.pyx")],
**numpy_nodepr_api),
Extension("Mikado.utilities.intervaltree",
sources=[path.join("Mikado", "utilities", "intervaltree.pyx")],
**numpy_nodepr_api),
Extension("Mikado.serializers.blast_serializer.btop_parser",
include_dirs=[np.get_include()],
language="c++",
sources=[path.join("Mikado", "serializers", "blast_serializer", "btop_parser.pyx")],
**numpy_nodepr_api),
Extension("Mikado.serializers.blast_serializer.aln_string_parser",
include_dirs=[np.get_include()],
language="c++",
sources=[path.join("Mikado", "serializers", "blast_serializer", "aln_string_parser.pyx")],
**numpy_nodepr_api)
]
setup(
name="Mikado",
python_requires=">3.6",
version="2.3.4",
description="A Python3 annotation program to select the best gene model in each locus",
long_description=long_description,
url="https://github.com/EI-CoreBioinformatics/mikado",
author="Luca Venturini",
author_email="[email protected]",
license="LGPL3",
tests_require=["pytest"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Operating System :: POSIX :: Linux",
"Framework :: Pytest",
"Intended Audience :: Science/Research",
'Programming Language :: Python :: 3.7',
"Programming Language :: Python :: 3.8",
'Programming Language :: Python :: 3.9'
],
ext_modules=cythonize(extensions, compiler_directives = {"language_level": "3"}),
zip_safe=False,
keywords="rna-seq annotation genomics transcriptomics",
packages=find_packages(),
scripts=glob.glob("util/*.py"),
entry_points={"console_scripts": ["mikado = Mikado.__main__:main",
"daijin = Mikado.daijin.__main__:main",
]},
install_requires=requirements,
extras_require={
"postgresql": ["psycopg2"],
"mysql": ["mysqlclient>=1.3.6"],
"bam": ["pysam>=0.8"]
},
package_data={
"Mikado.configuration":
glob.glob("Mikado/configuration/*json") + glob.glob("Mikado/configuration/*yaml"),
"Mikado.configuration.scoring_files":
glob.glob("Mikado/configuration/scoring_files/*"),
"Mikado":
glob.glob(path.join("Mikado", "daijin", "*smk")) +
glob.glob(path.join("Mikado", "daijin", "*yaml")) + glob.glob("Mikado/daijin/*json"),
"Mikado.utilities.overlap": [path.join("Mikado", "utilities", "overlap.pxd")],
"Mikado.utilities.intervaltree": [path.join("Mikado", "utilities", "intervaltree.pxd")],
"Mikado.serializers.blast_serializers": glob.glob(path.join("Mikado", "serializers", "blast_serializers",
"*pxd")),
"Mikado.tests.blast_data": glob.glob(path.join("Mikado", "tests", "blast_data", "*"))
},
include_package_data=True
)