-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
executable file
·62 lines (49 loc) · 1.7 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
#!/usr/bin/env python
"""Setup the aTRAM environment."""
# Test pip
# 1) Clean the /dist directory
# 2) python3 setup.py sdist bdist_wheel
# 3) pip install --index-url https://test.pypi.org/simple/
# --extra-index-url https://pypi.org/simple atram
# 4) twine upload --repository-url https://test.pypi.org/legacy/ dist/*
import re
from setuptools import setup, find_packages
def readme():
"""Get README.md content."""
with open("README.md", 'r') as f:
return f.read()
def license_():
"""Get LICENSE.txt content."""
with open("LICENSE.txt", 'r') as f:
return f.read()
def find_version():
"""Read version from db.py."""
regex = r"^ATRAM_VERSION = ['\"]v?([^'\"]*)['\"]"
with open("./lib/db.py", 'r') as f:
match = re.search(regex, f.read(), re.M)
if match:
return match.group(1)
raise RuntimeError("Unable to find version string.")
def find_requirements():
"""Read requirements.txt file and returns list of requirements."""
with open("requirements.txt", 'r') as f:
return f.read().splitlines()
setup(
name="atram",
version=find_version(),
packages=find_packages(),
install_requires=find_requirements(),
description="""atram ("automated target restricted assembly method") is
an iterative assembler that performs reference-guided
local de novo assemblies using a variety of available
methods""",
long_description=readme(),
license=license_(),
url="https://github.com/juliema/aTRAM",
python_requires='>=3.6',
scripts=[
'atram.py',
'atram_preprocessor.py',
'atram_stitcher.py',
'atram_framer.py',
])