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 main.c
|
||||
include README.md
|
||||
include sse2neon/emmintrin.h
|
||||
include python/mappy.c
|
||||
include python/cmappy.h
|
||||
include python/cmappy.pxd
|
||||
|
|
|
|||
20
setup.py
20
setup.py
|
|
@ -14,12 +14,22 @@ else: # with Cython
|
|||
module_src = 'python/mappy.pyx'
|
||||
cmdclass['build_ext'] = build_ext
|
||||
|
||||
import sys
|
||||
import sys, platform
|
||||
|
||||
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():
|
||||
with open('python/README.rst') as f:
|
||||
return f.read()
|
||||
with open('python/README.rst') as f:
|
||||
return f.read()
|
||||
|
||||
setup(
|
||||
name = 'mappy',
|
||||
|
|
@ -39,8 +49,8 @@ setup(
|
|||
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 = ['-DHAVE_KALLOC', '-msse4.1'], # WARNING: ancient x86_64 CPUs don't have SSE4
|
||||
include_dirs = ['.'],
|
||||
extra_compile_args = extra_compile_args,
|
||||
include_dirs = include_dirs,
|
||||
libraries = ['z', 'm', 'pthread'])],
|
||||
classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
|
|
|
|||
Loading…
Reference in New Issue