-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
61 lines (51 loc) · 1.49 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
#!/usr/bin/env python
import glob
import sys
import subprocess
import setuptools
from distutils.core import setup
from distutils.extension import Extension
# check if cython exists
try:
from Cython.Distutils import build_ext
except:
print """Cython not installed. Please install cython from
http://cython.org.
"""
sys.exit(1)
# check if lfasta exitst
retcode = subprocess.call("which lfasta",
shell=True)
if retcode != 0:
print """WARNING: could not find lfasta in your path.
Please download the source code of W.R. Pearson's fasta package and
build lfasta using the following commands:
mkdir fasta2
cd fasta2
wget http://faculty.virginia.edu/wrpearson/fasta/fasta2/fasta2.shar.Z
gunzip fasta2.shar.Z
sh fasta2.shar
make lfasta
Copy the lfasta executable somewhere into your path.
"""
c_sources = [x for x in glob.glob("src/*.c") if x not in "src/main.c"]
# build the interface
pyradar = Extension(
"pyradar", # name of extension
["pyradar/pyradar.pyx", ] + c_sources,
library_dirs=[],
libraries=[],
language="c",
)
setup(name='Radar',
version='1.3',
description='RADAR - Rapid Automatic Detection and Alignment of Repeats',
author='Andreas Heger & Liisa Holm',
author_email='[email protected]',
url='https://github.com/AndreasHeger/radar',
package_dir={},
packages=[],
scripts=['scripts/radar.py', ],
ext_modules=[pyradar],
cmdclass={'build_ext': build_ext}
)