-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
62 lines (50 loc) · 1.69 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
import os
import sys
import subprocess
try:
import setuptools
except ImportError:
sys.exit("setuptools package not found. "
"Please use 'pip install setuptools' first")
from setuptools import setup
from distutils.command.build import build as DistutilsBuild
from distutils.spawn import find_executable
from veritymap.__version__ import __version__
# Make sure we're running from the setup.py directory.
script_dir = os.path.dirname(os.path.realpath(__file__))
if script_dir != os.getcwd():
os.chdir(script_dir)
description = \
"""
VerityMap aligns long PacBio Hi-Fi and ONT reads to
genome assemblies (including long repetitive regions)
"""
class MakeBuild(DistutilsBuild):
def run(self):
os.chdir(os.path.join(script_dir, "veritymap"))
if not find_executable("make"):
sys.exit("ERROR: 'make' command is unavailable")
try:
subprocess.check_call(["make"])
except subprocess.CalledProcessError as e:
sys.exit("Compilation error: ", e)
os.chdir(script_dir)
DistutilsBuild.run(self)
setup(
name="VerityMap",
version="2.0.0",
description=description,
url='https://github.com/ablab/VerityMap',
author='Alla Mikheenko',
author_email='[email protected]',
license='GNU General Public License v3.0',
install_requires=[
'plotly', 'python-slugify', 'biopython', 'numpy'],
packages=['veritymap'],
package_dir={'veritymap': 'veritymap'},
package_data={'veritymap': ['build/bin/veritymap', 'config/*', '*', 'py_src/*', 'test_dataset/*',]},
entry_points={
'console_scripts': ['veritymap=veritymap.main:main']
},
cmdclass={'build': MakeBuild}
)