Skip to content

Commit

Permalink
Merge pull request #10 from nanoporetech/aarch64
Browse files Browse the repository at this point in the history
Aarch64
  • Loading branch information
cjw85 authored Aug 3, 2023
2 parents b3b0cf7 + e9e3e66 commit 1e6256d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-wheels.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
set -e -x

for PYBIN in /opt/python/cp3[891]*/bin; do
for VER in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311; do
PYBIN=/opt/python/${VER}/bin
rm -rf venv3
"${PYBIN}/python3" -m venv venv3
source venv3/bin/activate
Expand Down
19 changes: 13 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from shutil import rmtree
from subprocess import run

import platform
import setuptools
from setuptools import setup, Extension
from setuptools.command.install import install
Expand Down Expand Up @@ -58,10 +58,17 @@ def build_spoa():
bdir = "src/build"
rmtree(bdir, ignore_errors=True)
os.makedirs(bdir)
run([
"cmake", "-D", "spoa_optimize_for_portability=ON", "-D", "CMAKE_BUILD_TYPE=Release",
"-D", "CMAKE_CXX_FLAGS='-I ../vendor/cereal/include/ -fPIC '", "..",
], cwd=bdir)
extra_flags = []
if platform.machine() in {"aarch64", "arm64"}:
["-D", "spoa_use_simde=ON", "-D", "spoa_use_simde_nonvec=ON", "-D", "spoa_use_simde_openmp=ON"]
else:
# x86 -- builds with -msse4.1 instead of -march=native
["-D", "spoa_optimize_for_portability=ON"]
run(
["cmake"] + extra_flags + [
"-D", "CMAKE_BUILD_TYPE=Release",
"-D", "CMAKE_CXX_FLAGS='-I ../vendor/cereal/include/ -fPIC '",
".."], cwd=bdir)
run("make", cwd=bdir)


Expand Down Expand Up @@ -127,7 +134,7 @@ def build_extensions(self):

setup(
name='pyspoa',
version='0.0.9',
version='0.0.10',
author='Oxford Nanoporetech Technologies, Ltd.',
author_email='support@nanoporetech.com',
url='https://github.com/nanoporetech/pyspoa',
Expand Down

0 comments on commit 1e6256d

Please sign in to comment.