forked from marcelm/cutadapt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (51 loc) · 1.83 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
from distutils.core import setup, Extension
import sys
import os.path
from cutadapt import __version__
if sys.version_info < (2, 6):
sys.stdout.write("At least Python 2.6 is required.\n")
sys.exit(1)
try:
from Cython.Distutils import build_ext
except ImportError:
# no Cython available
cmdclass = { }
align_sources = [ 'cutadapt/_align.c' ]
qualtrim_sources = [ 'cutadapt/_qualtrim.c' ]
if not os.path.exists(align_sources[0]) or not os.path.exists(qualtrim_sources[0]):
sys.stdout.write("Cython is not installed and a pre-compiled alignment module\n")
sys.stdout.write("is also not available. You need to install Cython to continue.\n")
sys.exit(1)
else:
cmdclass = { 'build_ext' : build_ext }
align_sources = [ 'cutadapt/_align.pyx' ]
qualtrim_sources = [ 'cutadapt/_qualtrim.pyx' ]
align_module = Extension('cutadapt._align', sources=align_sources)
qualtrim_module = Extension('cutadapt._qualtrim', sources=qualtrim_sources)
setup(
name = 'cutadapt',
version = __version__,
author = 'Marcel Martin',
author_email = '[email protected]',
url = 'http://code.google.com/p/cutadapt/',
description = 'trim adapters from high-throughput sequencing reads',
license = 'MIT',
ext_modules = [align_module, qualtrim_module],
cmdclass = cmdclass,
packages = ['cutadapt', 'cutadapt.scripts'],
scripts = ['bin/cutadapt'],
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Cython",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
)