[med-svn] [Git][med-team/python-pyspoa][master] 5 commits: routine-update: New upstream version

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Tue Sep 26 20:37:07 BST 2023



Étienne Mollier pushed to branch master at Debian Med / python-pyspoa


Commits:
5c4890fd by Étienne Mollier at 2023-09-26T21:26:03+02:00
routine-update: New upstream version

- - - - -
ff5ea37e by Étienne Mollier at 2023-09-26T21:26:13+02:00
New upstream version 0.0.10
- - - - -
15b7814d by Étienne Mollier at 2023-09-26T21:26:14+02:00
Update upstream source from tag 'upstream/0.0.10'

Update to upstream version '0.0.10'
with Debian dir 36b9442f35a5b179ad799640ca17a20b9f4a387e
- - - - -
e3e1fac7 by Étienne Mollier at 2023-09-26T21:30:09+02:00
adjust-spoa-lib.patch: refresh.

- - - - -
dd12b1a5 by Étienne Mollier at 2023-09-26T21:36:11+02:00
ready to upload to unstable.

- - - - -


6 changed files:

- + .github/workflows/build-wheels.sh
- + .github/workflows/publish.yml
- + .github/workflows/test.yml
- debian/changelog
- debian/patches/adjust-spoa-lib.patch
- 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


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+python-pyspoa (0.0.10-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version 0.0.10
+  * adjust-spoa-lib.patch: refresh.
+
+ -- Étienne Mollier <emollier at debian.org>  Tue, 26 Sep 2023 21:31:46 +0200
+
 python-pyspoa (0.0.9-1) unstable; urgency=medium
 
   * New upstream version 0.0.9


=====================================
debian/patches/adjust-spoa-lib.patch
=====================================
@@ -2,30 +2,31 @@ Description: Make adjustmanets so as to use system's spoa library
 Author: Nilesh Patra <nilesh at debian.org>
 Forwarded: not-needed
 Last-Update: 2021-07-10
---- a/setup.py
-+++ b/setup.py
-@@ -58,10 +58,6 @@
-     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)
+--- python-pyspoa.orig/setup.py
++++ python-pyspoa/setup.py
+@@ -69,11 +69,6 @@
+             "-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)
  
  
-@@ -113,7 +109,7 @@
+@@ -126,7 +121,7 @@
          ],
          language='c++',
          extra_objects=[
--            'src/build/lib/libspoa.a'
+-            LIB_SPOA
 +            '/usr/lib/' + os.getenv('DEB_HOST_MULTIARCH') + '/libspoa.so'
          ],
  
      ),
---- a/pyspoa.cpp
-+++ b/pyspoa.cpp
+--- python-pyspoa.orig/pyspoa.cpp
++++ python-pyspoa/pyspoa.cpp
 @@ -1,4 +1,4 @@
 -#include "spoa.hpp"
 +#include "spoa/spoa.hpp"


=====================================
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/-/compare/1e0abd87506adc84a879b3d4c6aadf1fdeffadd1...dd12b1a5f1c0e470bd2f699b51c8e358e8c0e20e

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-pyspoa/-/compare/1e0abd87506adc84a879b3d4c6aadf1fdeffadd1...dd12b1a5f1c0e470bd2f699b51c8e358e8c0e20e
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/a014a133/attachment-0001.htm>


More information about the debian-med-commit mailing list