-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
74 lines (63 loc) · 2.04 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
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 = "snp2fasta/_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 = []
INSTALL_REQUIRES = get_requirements("requirements.txt")
setup(
name="snp2fasta",
version=verstr,
packages=["snp2fasta"],
entry_points={
"console_scripts": [
"snp2fasta = snp2fasta.snp2fasta:main",
]
},
setup_requires=setup_requires,
install_requires=INSTALL_REQUIRES,
python_requires=">=3.8",
description="SNP table to fasta of ref/alt with flanks",
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
"Source": "https://github.com/efriman/snp2fasta",
"Issues": "https://github.com/efriman/snp2fasta/issues",
},
author="Elias Friman",
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,
)