2017-09-16 21:14:34 +08:00
|
|
|
try:
|
|
|
|
|
from setuptools import setup, Extension
|
|
|
|
|
except ImportError:
|
|
|
|
|
from distutils.core import setup
|
|
|
|
|
from distutils.extension import Extension
|
|
|
|
|
|
2023-04-29 23:48:41 +08:00
|
|
|
import sys, platform
|
2018-07-25 11:53:02 +08:00
|
|
|
|
2023-04-29 23:48:41 +08:00
|
|
|
sys.path.append('python')
|
|
|
|
|
|
|
|
|
|
extra_compile_args = ['-DHAVE_KALLOC']
|
|
|
|
|
include_dirs = ["."]
|
|
|
|
|
|
|
|
|
|
if platform.machine() in ["aarch64", "arm64"]:
|
|
|
|
|
include_dirs.append("sse2neon/")
|
|
|
|
|
extra_compile_args.extend(['-ftree-vectorize', '-DKSW_SSE2_ONLY', '-D__SSE2__'])
|
|
|
|
|
else:
|
|
|
|
|
extra_compile_args.append('-msse4.1') # WARNING: ancient x86_64 CPUs don't have SSE4
|
2018-07-25 11:53:02 +08:00
|
|
|
|
2017-09-17 10:43:52 +08:00
|
|
|
def readme():
|
2018-07-25 11:53:02 +08:00
|
|
|
with open('python/README.rst') as f:
|
|
|
|
|
return f.read()
|
2017-09-17 10:43:52 +08:00
|
|
|
|
2017-09-16 20:44:47 +08:00
|
|
|
setup(
|
2017-09-17 12:05:30 +08:00
|
|
|
name = 'mappy',
|
2023-04-26 00:44:52 +08:00
|
|
|
version = '2.25',
|
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-18 05:06:39 +08:00
|
|
|
keywords = 'sequence-alignment',
|
|
|
|
|
scripts = ['python/minimap2.py'],
|
2023-04-29 23:48:41 +08:00
|
|
|
ext_modules = [Extension('mappy',
|
|
|
|
|
sources = ['python/mappy.pyx', 'align.c', 'bseq.c', 'lchain.c', 'seed.c', 'format.c', 'hit.c', 'index.c', 'pe.c', 'options.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', 'esterr.c', 'splitidx.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/cmappy.h', 'python/cmappy.pxd'],
|
|
|
|
|
extra_compile_args = extra_compile_args,
|
|
|
|
|
include_dirs = include_dirs,
|
|
|
|
|
libraries = ['z', 'm', 'pthread'])],
|
2017-09-18 05:06:39 +08:00
|
|
|
classifiers = [
|
2018-02-24 22:31:09 +08:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2017-09-18 05:06:39 +08:00
|
|
|
'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'],
|
2021-04-05 23:54:08 +08:00
|
|
|
setup_requires=["cython"])
|