-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
77 lines (71 loc) · 2.24 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
import os
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext
import re
VERSIONFILE = "warpdemux/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
ext_modules = [
Extension(
name=str("warpdemux.segmentation._c_segmentation"),
sources=[str(os.path.join("warpdemux", "segmentation", "_c_segmentation.pyx"))],
include_dirs=[np.get_include()],
language="c++",
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
)
]
for e in ext_modules:
e.cython_directives = {"embedsignature": True}
setup(
name="WarpDemuX",
version=verstr,
packages=find_packages(exclude=["warpdemux/adapted*"]),
author="Wiep van der Toorn",
author_email="[email protected]",
include_package_data=True,
package_data={
"warpdemux.config": ["config_files/*.toml"],
"warpdemux.models": ["model_files/*.toml", "model_files/*.joblib"],
},
ext_modules=cythonize(ext_modules, language_level="3"),
cmdclass={"build_ext": build_ext},
entry_points={"console_scripts": ["warpdemux = warpdemux.main:main"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Typing :: Typed",
"License :: CC BY-NC 4.0",
],
install_requires=[
"pod5",
"vbz-h5py-plugin",
"dtaidistance",
"scikit-learn==1.3.1",
"scipy",
"cython==0.29.36",
"toml",
"torch==2.4.1",
"tqdm",
"numpy==1.24.4",
"pandas",
"joblib",
"attrs",
],
extras_require={
"live-demux": [
"minknow-api==5.7.2",
],
},
)