[med-svn] [Git][med-team/python-pyspoa][upstream] New upstream version 0.0.10
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Tue Sep 26 20:37:21 BST 2023
Étienne Mollier pushed to branch upstream at Debian Med / python-pyspoa
Commits:
ff5ea37e by Étienne Mollier at 2023-09-26T21:26:13+02:00
New upstream version 0.0.10
- - - - -
4 changed files:
- + .github/workflows/build-wheels.sh
- + .github/workflows/publish.yml
- + .github/workflows/test.yml
- setup.py
Changes:
=====================================
.github/workflows/build-wheels.sh
=====================================
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e -x
+
+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
+ "${PYBIN}/python3" -m pip install --upgrade pip
+ "${PYBIN}/python3" -m pip install cmake==3.27.1 scikit-build
+ "${PYBIN}/python3" -m pip wheel . -w dist
+ make clean
+ deactivate
+done
+
+for wheel in dist/*.whl; do
+ auditwheel repair "${wheel}"
+done
=====================================
.github/workflows/publish.yml
=====================================
@@ -0,0 +1,45 @@
+name: publish-pyspoa
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+
+ linux-wheels:
+ runs-on: ubuntu-latest
+ container: quay.io/pypa/manylinux_2_28_x86_64
+ steps:
+ - uses: actions/checkout at v3
+ with:
+ submodules: recursive
+ - name: Build wheels
+ run: |
+ bash .github/workflows/build-wheels.sh
+ - uses: actions/upload-artifact at v3
+ with:
+ name: linux-wheels
+ path: wheelhouse/
+
+ osx-wheels:
+ runs-on: macos-latest
+ strategy:
+ matrix:
+ python-version: ['3.8', '3.9', '3.10', '3.11']
+ steps:
+ - uses: actions/checkout at v3
+ with:
+ submodules: recursive
+ - uses: actions/setup-python at v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Build wheels
+ run: |
+ python3 -m venv venv3
+ source venv3/bin/activate
+ make build
+ - uses: actions/upload-artifact at v3
+ with:
+ name: osx-${{ matrix.python-version }}-wheel
+ path: dist/
=====================================
.github/workflows/test.yml
=====================================
@@ -0,0 +1,52 @@
+name: test-pyspoa
+
+on: [push]
+
+jobs:
+
+ test:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout at v3
+ with:
+ submodules: recursive
+ - uses: actions/setup-python at v4
+ with:
+ python-version: '3.9'
+ - name: Test ${{ matrix.os }} binding
+ run: |
+ python3 -m venv venv3
+ source venv3/bin/activate
+ make test
+
+ linux-wheels:
+ runs-on: ubuntu-latest
+ container: quay.io/pypa/manylinux_2_28_x86_64
+ steps:
+ - uses: actions/checkout at v3
+ with:
+ submodules: recursive
+ - name: Build wheels
+ run: |
+ bash .github/workflows/build-wheels.sh
+
+ osx-wheels:
+ runs-on: macos-latest
+ strategy:
+ matrix:
+ python-version: ['3.8', '3.9', '3.10', '3.11']
+ steps:
+ - uses: actions/checkout at v3
+ with:
+ submodules: recursive
+ - uses: actions/setup-python at v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Build wheels
+ run: |
+ python3 -m venv venv3
+ source venv3/bin/activate
+ make test
=====================================
setup.py
=====================================
@@ -2,12 +2,16 @@ import os
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
from setuptools.command.build_ext import build_ext
+LIB_SPOA = 'src/build/lib/libspoa.a'
+if os.environ.get('libspoa'):
+ LIB_SPOA = os.environ['libspoa']
+
class get_pybind_include(object):
"""
@@ -58,10 +62,18 @@ 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)
+ # x86 -- builds with -msse4.1 instead of -march=native
+ extra_flags = ["-D", "spoa_optimize_for_portability=ON"]
+ if platform.machine() in {"aarch64", "arm64"}:
+ extra_flags = [
+ "-D", "spoa_use_simde=ON",
+ "-D", "spoa_use_simde_nonvec=ON",
+ "-D", "spoa_use_simde_openmp=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)
@@ -84,7 +96,8 @@ class BuildExt(build_ext):
l_opts['unix'] += darwin_opts
def build_extensions(self):
- build_spoa()
+ if not os.environ.get('libspoa'):
+ build_spoa()
ct = self.compiler.compiler_type
opts = self.c_opts.get(ct, [])
link_opts = self.l_opts.get(ct, [])
@@ -113,7 +126,7 @@ ext_modules = [
],
language='c++',
extra_objects=[
- 'src/build/lib/libspoa.a'
+ LIB_SPOA
],
),
@@ -127,7 +140,7 @@ with open('README.md', encoding='utf-8') as f:
setup(
name='pyspoa',
- version='0.0.9',
+ version='0.0.10',
author='Oxford Nanoporetech Technologies, Ltd.',
author_email='support at nanoporetech.com',
url='https://github.com/nanoporetech/pyspoa',
View it on GitLab: https://salsa.debian.org/med-team/python-pyspoa/-/commit/ff5ea37e4766766c62823106c4f1f948c88773bd
--
View it on GitLab: https://salsa.debian.org/med-team/python-pyspoa/-/commit/ff5ea37e4766766c62823106c4f1f948c88773bd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230926/a621aef2/attachment-0001.htm>
More information about the debian-med-commit
mailing list