mappy to support arm64 (#203)
This commit is contained in:
parent
ff9917a1c4
commit
99ecdf7b5d
|
|
@ -4,6 +4,7 @@ include ksw2_dispatch.c
|
||||||
include getopt.c
|
include getopt.c
|
||||||
include main.c
|
include main.c
|
||||||
include README.md
|
include README.md
|
||||||
|
include sse2neon/emmintrin.h
|
||||||
include python/mappy.c
|
include python/mappy.c
|
||||||
include python/cmappy.h
|
include python/cmappy.h
|
||||||
include python/cmappy.pxd
|
include python/cmappy.pxd
|
||||||
|
|
|
||||||
20
setup.py
20
setup.py
|
|
@ -14,12 +14,22 @@ else: # with Cython
|
||||||
module_src = 'python/mappy.pyx'
|
module_src = 'python/mappy.pyx'
|
||||||
cmdclass['build_ext'] = build_ext
|
cmdclass['build_ext'] = build_ext
|
||||||
|
|
||||||
import sys
|
import sys, platform
|
||||||
|
|
||||||
sys.path.append('python')
|
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
|
||||||
|
|
||||||
def readme():
|
def readme():
|
||||||
with open('python/README.rst') as f:
|
with open('python/README.rst') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'mappy',
|
name = 'mappy',
|
||||||
|
|
@ -39,8 +49,8 @@ setup(
|
||||||
depends = ['minimap.h', 'bseq.h', 'kalloc.h', 'kdq.h', 'khash.h', 'kseq.h', 'ksort.h',
|
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',
|
'ksw2.h', 'kthread.h', 'kvec.h', 'mmpriv.h', 'sdust.h',
|
||||||
'python/cmappy.h', 'python/cmappy.pxd'],
|
'python/cmappy.h', 'python/cmappy.pxd'],
|
||||||
extra_compile_args = ['-DHAVE_KALLOC', '-msse4.1'], # WARNING: ancient x86_64 CPUs don't have SSE4
|
extra_compile_args = extra_compile_args,
|
||||||
include_dirs = ['.'],
|
include_dirs = include_dirs,
|
||||||
libraries = ['z', 'm', 'pthread'])],
|
libraries = ['z', 'm', 'pthread'])],
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue