-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
83 lines (72 loc) · 2.31 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
from setuptools import setup
import os
from os import path
import io
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
import re
VERSIONFILE = "coolpuppy/_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,))
def _read(*parts, **kwargs):
filepath = os.path.join(os.path.dirname(__file__), *parts)
encoding = kwargs.pop("encoding", "utf-8")
with io.open(filepath, encoding=encoding) as fh:
text = fh.read()
return text
def get_requirements(path):
content = _read(path)
return [
req
for req in content.split("\n")
if req != "" and not (req.startswith("#") or req.startswith("-"))
]
setup_requires = [
"cython",
"numpy",
]
on_rtd = os.environ.get("READTHEDOCS") == "True"
if on_rtd:
INSTALL_REQUIRES = []
else:
INSTALL_REQUIRES = get_requirements("requirements.txt")
setup(
name="coolpuppy",
version=verstr,
packages=["coolpuppy", "coolpuppy.lib"],
entry_points={
"console_scripts": [
"coolpup.py = coolpuppy.CLI:main",
"plotpup.py = coolpuppy.plotpuppy_CLI:main",
"dividepups.py = coolpuppy.divide_pups_CLI:main",
]
},
setup_requires=setup_requires,
install_requires=INSTALL_REQUIRES,
python_requires=">=3.8",
description="A versatile tool to perform pile-up analysis on Hi-C data in .cool format.",
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
"Source": "https://github.com/open2c/coolpuppy",
"Issues": "https://github.com/open2c/coolpuppy/issues",
},
author="Open2C",
author_email="[email protected]",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
zip_safe=False,
)