[med-svn] [Git][med-team/python-pyspoa][upstream] New upstream version 0.0.9

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Thu Jun 15 17:07:26 BST 2023



Nilesh Patra pushed to branch upstream at Debian Med / python-pyspoa


Commits:
0762d5f8 by Nilesh Patra at 2023-06-15T21:28:05+05:30
New upstream version 0.0.9
- - - - -


9 changed files:

- − .github/workflows/build-wheels.sh
- − .github/workflows/publish.yml
- − .github/workflows/test.yml
- Makefile
- README.md
- + build.py
- + pyproject.toml
- − requirements.txt
- setup.py


Changes:

=====================================
.github/workflows/build-wheels.sh deleted
=====================================
@@ -1,18 +0,0 @@
-#!/bin/bash
-set -e -x
-
-for PYBIN in /opt/python/cp3[6789]*/bin; do
-    rm -rf venv3
-    "${PYBIN}/python3" -m venv venv3
-    source venv3/bin/activate
-    python3 -m pip install cmake==3.18.4
-    python3 -m pip install -r requirements.txt
-    make test
-    "${PYBIN}/python3" setup.py bdist_wheel
-    make clean
-    deactivate
-done
-
-for wheel in dist/*.whl; do
-    auditwheel repair "${wheel}"
-done


=====================================
.github/workflows/publish.yml deleted
=====================================
@@ -1,45 +0,0 @@
-name: publish-pyspao
-
-on:
-  push:
-    tags:
-       - 'v*'
-
-jobs:
-
-  linux-wheels:
-    runs-on: ubuntu-latest
-    container: quay.io/pypa/manylinux2010_x86_64
-    steps:
-     - uses: actions/checkout at v1
-     - name: Build wheels
-       run: |
-         git submodule update --init --recursive
-         bash .github/workflows/build-wheels.sh
-     - uses: actions/upload-artifact at v1
-       with:
-         name: linux-wheels
-         path: wheelhouse/
-
-  osx-wheels:
-    runs-on: macos-latest
-    strategy:
-      matrix:
-        python-version: [3.6, 3.7, 3.8, 3.9]
-    steps:
-     - uses: actions/checkout at v1
-     - uses: actions/setup-python at v1
-       with:
-         python-version: ${{ matrix.python-version }}
-     - name: Build wheels
-       run: |
-         git submodule update --init --recursive
-         python3 -m venv venv3
-         source venv3/bin/activate
-         python3 -m pip install -r requirements.txt
-         make test
-         python3 setup.py bdist_wheel
-     - uses: actions/upload-artifact at v1
-       with:
-         name: osx-${{ matrix.python-version }}-wheel
-         path: dist/


=====================================
.github/workflows/test.yml deleted
=====================================
@@ -1,52 +0,0 @@
-name: test-pyspoa
-
-on: [push]
-
-jobs:
-
-  test:
-    strategy:
-      matrix:
-        os: [ubuntu-latest, macos-latest]
-    runs-on: ${{ matrix.os }}
-    steps:
-      - uses: actions/checkout at v1
-      - uses: actions/setup-python at v1
-        with:
-          python-version: '3.9'
-      - name: Test ${{ matrix.os }} binding
-        run: |
-          git submodule update --init --recursive
-          python3 -m venv venv3
-          source venv3/bin/activate
-          python3 -m pip install -r requirements.txt
-          make test
-
-  linux-wheels:
-    runs-on: ubuntu-latest
-    container: quay.io/pypa/manylinux2010_x86_64
-    steps:
-     - uses: actions/checkout at v1
-     - name: Build wheels
-       run: |
-         git submodule update --init --recursive
-         bash .github/workflows/build-wheels.sh
-
-  osx-wheels:
-    runs-on: macos-latest
-    strategy:
-      matrix:
-        python-version: [3.6, 3.7, 3.8, 3.9]
-    steps:
-     - uses: actions/checkout at v1
-     - uses: actions/setup-python at v1
-       with:
-         python-version: ${{ matrix.python-version }}
-     - name: Build wheels
-       run: |
-         git submodule update --init --recursive
-         python3 -m venv venv3
-         source venv3/bin/activate
-         python3 -m pip install -r requirements.txt
-         make test
-         python3 setup.py bdist_wheel


=====================================
Makefile
=====================================
@@ -1,9 +1,13 @@
 build:
-	python3 setup.py develop
+	pip wheel . -w dist
 
-test: build
+install: build
+	pip install dist/pyspoa*.whl
+
+test: install
 	python3 tests/test_pyspoa.py
 
 clean:
-	rm -rf src/build build tmp *~
+	rm -rf src/build build tmp var *~ *.whl __pycache__
 	python setup.py clean
+	pip uninstall -y pyspoa


=====================================
README.md
=====================================
@@ -33,7 +33,6 @@ $ git clone --recursive https://github.com/nanoporetech/pyspoa.git
 $ cd pyspoa
 $ python3 -m venv pyspoa
 $ source pyspoa/bin/activate
-(pyspoa) $ pip install -r requirements.txt
 (pyspoa) $ make build
 ```
 


=====================================
build.py
=====================================
@@ -0,0 +1,13 @@
+import os
+from shutil import rmtree
+from subprocess import run
+
+if __name__ == "__main__":
+    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)
+    run("make", cwd=bdir)


=====================================
pyproject.toml
=====================================
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["cmake", "pybind11", "setuptools", "wheel", "scikit-build"]
+build-backend = "setuptools.build_meta"


=====================================
requirements.txt deleted
=====================================
@@ -1,5 +0,0 @@
-wheel>=0.34.1
-pybind11>=2.4
-auditwheel>=3.1.0
-scikit-build==0.11.1
-


=====================================
setup.py
=====================================
@@ -1,12 +1,12 @@
 import os
 import sys
-import setuptools
 from shutil import rmtree
 from subprocess import run
-from setuptools import setup, Extension
-from setuptools.command.build_ext import build_ext
 
+import setuptools
+from setuptools import setup, Extension
 from setuptools.command.install import install
+from setuptools.command.build_ext import build_ext
 
 
 class get_pybind_include(object):
@@ -54,6 +54,17 @@ def cpp_flag(compiler):
     raise RuntimeError('Unsupported compiler -- at least C++11 support is needed!')
 
 
+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)
+    run("make", cwd=bdir)
+
+
 class BuildExt(build_ext):
     """
     A custom build extension for adding compiler-specific options.
@@ -73,6 +84,7 @@ class BuildExt(build_ext):
         l_opts['unix'] += darwin_opts
 
     def build_extensions(self):
+        build_spoa()
         ct = self.compiler.compiler_type
         opts = self.c_opts.get(ct, [])
         link_opts = self.l_opts.get(ct, [])
@@ -112,22 +124,10 @@ with open('README.md', encoding='utf-8') as f:
     long_description = f.read()
 
 
-class build_spoa(install):
-    def run(self):
-        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)
-        run("make", cwd=bdir)
-        install.run(self)
-
 
 setup(
     name='pyspoa',
-    version='0.0.8',
+    version='0.0.9',
     author='Oxford Nanoporetech Technologies, Ltd.',
     author_email='support at nanoporetech.com',
     url='https://github.com/nanoporetech/pyspoa',
@@ -135,12 +135,8 @@ setup(
     long_description=long_description,
     long_description_content_type='text/markdown',
     ext_modules=ext_modules,
-    install_requires=['pybind11>=2.4', 'cmake==3.18.4'],
-    setup_requires=['pybind11>=2.4', 'cmake==3.18.4'],
     cmdclass={
         'build_ext': BuildExt,
-        'develop': build_spoa,
-        'install': build_spoa,
     },
     zip_safe=False,
 )



View it on GitLab: https://salsa.debian.org/med-team/python-pyspoa/-/commit/0762d5f8932f71ef16e15391caa4d83b6bbd924c

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-pyspoa/-/commit/0762d5f8932f71ef16e15391caa4d83b6bbd924c
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/20230615/0dbc8378/attachment-0001.htm>


More information about the debian-med-commit mailing list