This repository was archived by the owner on May 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (44 loc) · 1.69 KB
/
setup.py
File metadata and controls
50 lines (44 loc) · 1.69 KB
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
import os.path
from setuptools import Extension, setup, Distribution
try:
from Cython.Distutils import build_ext
has_cython = True
except ImportError:
has_cython = False
compile_args = ['-std=gnu99', '-O3', '-fomit-frame-pointer',
'-malign-double', '-fstrict-aliasing', '-msse2',
# Suppress some easel warnings
'-Wno-unused-but-set-variable', '-Wno-uninitialized', '-Wno-parentheses']
easel_c_src = [ 'easel.c', 'esl_alphabet.c', 'esl_sqio.c', 'esl_sqio_ascii.c',
'esl_sq.c', 'esl_msa.c', 'esl_sqio_ncbi.c', 'esl_wuss.c', 'esl_keyhash.c',
'esl_vectorops.c', 'esl_ssi.c', 'esl_stack.c', 'esl_random.c']
easel_c_src = [os.path.join('easel-src', i) for i in easel_c_src]
easel_c_src.sort()
if has_cython:
extra = dict(ext_modules=[
Extension("peasel.ceasel", ["peasel/ceasel.pyx"] + easel_c_src,
include_dirs=['easel-src', 'peasel'],
extra_compile_args=compile_args,
language="c",),
], cmdclass={'build_ext': build_ext})
else:
extra = dict(ext_modules=[
Extension("peasel.ceasel", ["peasel/ceasel.c"] + easel_c_src,
include_dirs=['easel-src', 'peasel'],
extra_compile_args=compile_args,
language="c",),
])
class BinaryDistribution(Distribution):
def is_pure(self):
return False
setup(
name='peasel',
packages=['peasel', 'peasel.test'],
test_suite='peasel.test.suite',
version='0.4.0-dev',
author='Connor McCoy',
author_email='cmccoy@fhcrc.org',
url='http://github.com/cmccoy/peasel',
description='Python wrappers for (a tiny bit of) the Easel sequence library',
distclass=BinaryDistribution,
**extra)