minimap2/setup.py

56 lines
1.8 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/mappy.c'
2017-09-17 10:29:52 +08:00
else: # with Cython
module_src = 'python/mappy.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 = 'mappy',
2017-12-12 23:39:20 +08:00
version = '2.6',
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',
keywords = 'sequence-alignment',
scripts = ['python/minimap2.py'],
ext_modules = [Extension('mappy',
2017-10-16 23:15:07 +08:00
sources = [module_src, 'align.c', 'bseq.c', 'chain.c', 'format.c', 'hit.c', 'index.c', 'pe.c',
2017-09-17 10:29:52 +08:00
'ksw2_extd2_sse.c', 'ksw2_exts2_sse.c', 'ksw2_extz2_sse.c', 'ksw2_ll_sse.c',
2017-12-12 23:39:20 +08:00
'kalloc.c', 'kthread.c', 'map.c', 'misc.c', 'sdust.c', 'sketch.c', 'esterr.c'],
2017-09-17 10:29:52 +08:00
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/cmappy.h', 'python/cmappy.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'])],
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: C',
'Programming Language :: Cython',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics'],
2017-09-17 10:29:52 +08:00
cmdclass = cmdclass)