minimap2/setup.py

45 lines
1.4 KiB
Python
Raw Normal View History

try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
2017-09-17 10:29:52 +08:00
cmdclass = {}
try:
from Cython.Build import build_ext
except ImportError: # without Cython
module_src = 'python/mmappy.c'
2017-09-17 10:29:52 +08:00
else: # with Cython
module_src = 'python/mmappy.pyx'
2017-09-17 10:29:52 +08:00
cmdclass['build_ext'] = build_ext
2017-09-16 20:44:47 +08:00
2017-09-17 10:29:52 +08:00
import sys
2017-09-16 20:44:47 +08:00
sys.path.append('python')
2017-09-17 10:43:52 +08:00
def readme():
with open('python/README.rst') as f:
return f.read()
2017-09-16 20:44:47 +08:00
setup(
name = 'mmappy',
version = '2.2rc1',
2017-09-16 20:44:47 +08:00
url = 'https://github.com/lh3/minimap2',
description = 'Minimap2 python binding',
2017-09-17 10:43:52 +08:00
long_description = readme(),
2017-09-16 20:44:47 +08:00
author = 'Heng Li',
author_email = 'lh3@me.com',
2017-09-17 10:29:52 +08:00
license = 'MIT',
2017-09-16 20:44:47 +08:00
keywords = ['bioinformatics', 'sequence-alignment'],
ext_modules = [Extension('mmappy',
2017-09-17 10:29:52 +08:00
sources = [module_src, 'align.c', 'bseq.c', 'chain.c', 'format.c', 'hit.c', 'index.c',
'ksw2_extd2_sse.c', 'ksw2_exts2_sse.c', 'ksw2_extz2_sse.c', 'ksw2_ll_sse.c',
'kalloc.c', 'kthread.c', 'map.c', 'misc.c', 'sdust.c', 'sketch.c'],
depends = ['minimap.h', 'bseq.h', 'kalloc.h', 'kdq.h', 'khash.h', 'kseq.h', 'ksort.h',
'ksw2.h', 'kthread.h', 'kvec.h', 'mmpriv.h', 'sdust.h',
'python/cmmappy.h', 'python/cmmappy.pxd'],
extra_compile_args = ['-msse4'], # WARNING: ancient x86_64 CPUs don't have SSE4
2017-09-17 06:11:43 +08:00
include_dirs = ['.'],
2017-09-17 10:29:52 +08:00
libraries = ['z', 'm', 'pthread'])],
cmdclass = cmdclass)