[Git][debian-gis-team/pykdtree][master] 7 commits: Use <!nocheck> marker

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Sep 23 17:11:41 BST 2023



Antonio Valentino pushed to branch master at Debian GIS Project / pykdtree


Commits:
f369e2ac by Antonio Valentino at 2023-09-23T15:32:43+00:00
Use <!nocheck> marker

- - - - -
d665e916 by Antonio Valentino at 2023-09-23T15:36:37+00:00
Switch to autopkgtest-pkg-pybuild

- - - - -
76c75b32 by Antonio Valentino at 2023-09-23T15:38:20+00:00
New upstream version 1.3.9+ds
- - - - -
f6683fbf by Antonio Valentino at 2023-09-23T15:38:20+00:00
Update upstream source from tag 'upstream/1.3.9+ds'

Update to upstream version '1.3.9+ds'
with Debian dir ac57f6a75adc62fafaff4fd973e04b4518d0c129
- - - - -
9745c5f6 by Antonio Valentino at 2023-09-23T15:42:37+00:00
New usptream release

- - - - -
715f189e by Antonio Valentino at 2023-09-23T15:50:33+00:00
Build-depend on pybuild-plugin-pyproject

- - - - -
9cc2fba3 by Antonio Valentino at 2023-09-23T16:09:35+00:00
New d/python3-pykdtree.lintian-overrides file

- - - - -


13 changed files:

- .github/workflows/deploy-wheels.yml
- + .gitignore
- + CHANGELOG.md
- README.rst
- debian/changelog
- debian/control
- debian/rules
- − debian/tests/control
- − debian/tests/python3
- pykdtree/kdtree.pyx
- + pyproject.toml
- − scripts/build-manylinux-wheels.sh
- setup.py


Changes:

=====================================
.github/workflows/deploy-wheels.yml
=====================================
@@ -1,5 +1,5 @@
 ---
-name: Build Test Deploy
+name: Build sdist and wheels
 
 on:
   push:
@@ -12,7 +12,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout source
-        uses: actions/checkout at v3
+        uses: actions/checkout at v4
 
       - name: Create sdist
         shell: bash -l {0}
@@ -27,64 +27,46 @@ jobs:
           path: dist/*.tar.gz
 
   build_wheels:
+    name: "Build wheels on ${{ matrix.os }} ${{ matrix.cibw_archs }}"
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
       matrix:
-        os: [windows-latest, macos-latest]
-        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
         include:
-          # Using pythons inside a docker image to provide all the Linux
-          # python-versions permutations.
-          - name: manylinux_2_24 64-bit
-            os: ubuntu-latest
-            python-version: 3.8
-            docker-image: manylinux_2_24_x86_64
-          - name: manylinux_2_24 32-bit
-            os: ubuntu-latest
-            python-version: 3.8
-            docker-image: manylinux_2_24_i686
+          - os: windows-2019
+            cibw_archs: "AMD64 ARM64"
+          - os: macos-11
+            cibw_archs: "x86_64 arm64"
+          - os: "ubuntu-20.04"
+            cibw_archs: "aarch64"
+          - os: "ubuntu-20.04"
+            cibw_archs: "x86_64"
 
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v4
       - run: |
           git fetch --prune --unshallow
 
-      - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python at v4
+      - name: Set up QEMU
+        if: runner.os == 'Linux'
+        uses: docker/setup-qemu-action at v3
         with:
-          python-version: "${{ matrix.python-version }}"
+          platforms: all
 
-      - name: Install dependencies
-        run: |
-          python -m pip install -U -q pip pytest wheel setuptools twine numpy
-
-      - name: Build and install macOS/Windows wheel
-        if: matrix.os != 'ubuntu-latest'
-        run: |
-          python setup.py -q bdist_wheel
-          pip install --find-links=./dist/ pykdtree
-
-      - name: Test
-        if: matrix.os != 'ubuntu-latest'
-        run: |
-          pytest -v --pyargs pykdtree
-
-      - name: Build Linux wheels inside docker
-        if: matrix.os == 'ubuntu-latest'
-        run: |
-          docker run \
-            -e PLAT=${{ matrix.docker-image }} \
-            -e USE_OMP=1 \
-            -v `pwd`:/io \
-            quay.io/pypa/${{ matrix.docker-image }} \
-            /io/scripts/build-manylinux-wheels.sh
+      - name: Build wheels
+        uses: pypa/cibuildwheel at v2.16.0
+        env:
+          CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *i686 *-musllinux_aarch64"
+          CIBW_ARCHS: "${{ matrix.cibw_archs }}"
+          CIBW_TEST_COMMAND: "pytest -v --pyargs pykdtree"
+          CIBW_TEST_REQUIRES: "pytest"
+          CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
 
       - name: Upload wheel(s) as build artifacts
         uses: actions/upload-artifact at v3
         with:
           name: wheels
-          path: dist/*.whl
+          path: ./wheelhouse/*.whl
 
   upload_pypi:
     needs: [build_sdist, build_wheels]
@@ -102,7 +84,7 @@ jobs:
           path: dist
       - name: Publish package to PyPI
         if: github.event.action == 'published'
-        uses: pypa/gh-action-pypi-publish at v1.7.1
+        uses: pypa/gh-action-pypi-publish at v1.8.10
         with:
           user: ${{ secrets.pypi_username }}
           password: ${{ secrets.pypi_password }}


=====================================
.gitignore
=====================================
@@ -0,0 +1,59 @@
+### PYTHON IGNORES ###
+*.py[cod]
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+doc/build
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+lib
+lib64
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+nosetests.xml
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+
+### C IGNORES ###
+# Object files
+*.o
+
+# Libraries
+*.lib
+*.a
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+
+# Others
+*~
+# PyCharm Settings
+.idea
+
+# don't include Cython C extensions
+pykdtree/kdtree.c
\ No newline at end of file


=====================================
CHANGELOG.md
=====================================
@@ -0,0 +1,76 @@
+## Version 1.3.9 (2023/09/22)
+
+
+### Pull Requests Merged
+
+#### Features added
+
+* [PR 98](https://github.com/storpipfugl/pykdtree/pull/98) - Switch to cibuildwheel for wheel building
+
+In this release 1 pull request was closed.
+
+
+## Version 1.3.8 (2023/09/21)
+
+
+## v1.3.6
+
+Fix Python 3.11 compatibility and build Python 3.11 wheels
+
+## v1.3.5
+
+Build Python 3.10 wheels and other CI updates
+
+## v1.3.4
+
+Fix Python 3.9 wheels not being built for linux
+
+## v1.3.3
+
+Add compatibility to python 3.9
+
+## v1.3.2
+
+Change OSX installation to not use OpenMP without conda interpreter
+
+## v1.3.1
+
+Fix masking in the "query" method introduced in 1.3.0
+
+## v1.3.0
+
+Keyword argument "mask" added to "query" method. OpenMP compilation now works for MS Visual Studio compiler
+
+## v1.2.2
+
+Build process fixes
+
+## v1.2.1Fixed OpenMP thread safety issue introduced in v1.2.0
+
+## v1.2.0
+
+64 and 32 bit MSVC Windows support added
+
+## v1.1.1
+
+Same as v1.1 release due to incorrect pypi release
+
+## v1.1
+
+Build process improvements. Add data attribute to kdtree class for scipy interface compatibility
+
+## v1.0
+
+Switched license from GPLv3 to LGPLv3
+
+## v0.3
+
+Avoid zipping of installed egg
+
+## v0.2
+
+Reduced memory footprint. Can now handle single precision data internally avoiding copy conversion to double precision. Default leafsize changed from 10 to 16 as this reduces the memory footprint and makes it a cache line multiplum (negligible if any query performance observed in benchmarks). Reduced memory allocation for leaf nodes. Applied patch for building on OS X.
+
+## v0.1
+
+Initial version.


=====================================
README.rst
=====================================
@@ -183,37 +183,3 @@ turned off by adding the following to `appveyor.yml` in the
       global:
         # Don't build with openmp because it isn't supported in appveyor's compilers
         USE_OMP: "0"
-
-Changelog
----------
-v1.3.6 : Fix Python 3.11 compatibility and build Python 3.11 wheels
-
-v1.3.5 : Build Python 3.10 wheels and other CI updates
-
-v1.3.4 : Fix Python 3.9 wheels not being built for linux
-
-v1.3.3 : Add compatibility to python 3.9
-
-v1.3.2 : Change OSX installation to not use OpenMP without conda interpreter
-
-v1.3.1 : Fix masking in the "query" method introduced in 1.3.0
-
-v1.3.0 : Keyword argument "mask" added to "query" method. OpenMP compilation now works for MS Visual Studio compiler
-
-v1.2.2 : Build process fixes
-
-v1.2.1 : Fixed OpenMP thread safety issue introduced in v1.2.0
-
-v1.2.0 : 64 and 32 bit MSVC Windows support added
-
-v1.1.1 : Same as v1.1 release due to incorrect pypi release
-
-v1.1 : Build process improvements. Add data attribute to kdtree class for scipy interface compatibility
-
-v1.0 : Switched license from GPLv3 to LGPLv3
-
-v0.3 : Avoid zipping of installed egg
-
-v0.2 : Reduced memory footprint. Can now handle single precision data internally avoiding copy conversion to double precision. Default leafsize changed from 10 to 16 as this reduces the memory footprint and makes it a cache line multiplum (negligible if any query performance observed in benchmarks). Reduced memory allocation for leaf nodes. Applied patch for building on OS X.
-
-v0.1 : Initial version.


=====================================
debian/changelog
=====================================
@@ -1,9 +1,19 @@
-pykdtree (1.3.7+ds-2) UNRELEASED; urgency=medium
+pykdtree (1.3.9+ds-1) UNRELEASED; urgency=medium
 
+  [ Bas Couwenberg ]
   * Team upload.
   * Remove generated files in clean target.
   * Switch to dh-sequence-*.
 
+  [ Antonio Valentino ]
+  * New upstream release.
+  * debian/control:
+    - Use <!nocheck> marker.
+    - Buold-depend on pybuild-plugin-pyproject.
+  * Switch to autopkgtest-pkg-pybuild and drop the
+    no longer needed d/tests folder.
+  * New d/python3-pykdtree.lintian-overrides file.
+
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 13 Aug 2023 10:29:11 +0200
 
 pykdtree (1.3.7+ds-1) unstable; urgency=medium


=====================================
debian/control
=====================================
@@ -4,15 +4,16 @@ Uploaders: Antonio Valentino <antonio.valentino at tiscali.it>
 Section: python
 Priority: optional
 Rules-Requires-Root: no
-Testsuite: autopkgtest-pkg-python
+Testsuite: autopkgtest-pkg-pybuild
 Build-Depends: debhelper-compat (= 13),
                dh-python,
                dh-sequence-numpy3,
                dh-sequence-python3,
                cython3,
+               pybuild-plugin-pyproject,
                python3-all-dev,
                python3-mako,
-               python3-pytest,
+               python3-pytest <!nocheck>,
                python3-numpy,
                python3-setuptools
 Standards-Version: 4.6.2


=====================================
debian/rules
=====================================
@@ -8,6 +8,7 @@
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 export PYBUILD_NAME=pykdtree
+export PYBUILD_TEST_ARGS=--pyargs ${PYBUILD_NAME}
 
 %:
 	dh $@ --buildsystem=pybuild


=====================================
debian/tests/control deleted
=====================================
@@ -1,2 +0,0 @@
-Tests: python3
-Depends: python3-pykdtree, python3-all, python3-pytest


=====================================
debian/tests/python3 deleted
=====================================
@@ -1,12 +0,0 @@
-#!/bin/sh
-set -efu
-
-PYS=${PYS:-"$(py3versions -s 2>/dev/null)"}
-TESTPKG=${TESTPKG:-pykdtree}
-
-cd "$AUTOPKGTEST_TMP"
-
-for py in $PYS; do
-    echo "=== $py ==="
-    $py -m pytest -v --pyargs pykdtree 2>&1
-done


=====================================
pykdtree/kdtree.pyx
=====================================
@@ -267,7 +267,7 @@ cdef class KDTree:
             else:
                 idx_out = (closest_dists_res >= dub_double)
 
-            closest_dists_res[idx_out] = np.Inf
+            closest_dists_res[idx_out] = np.inf
             closest_idxs_res[idx_out] = self.n
 
         if not sqr_dists: # Return actual cartesian distances


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


=====================================
scripts/build-manylinux-wheels.sh deleted
=====================================
@@ -1,48 +0,0 @@
-#!/bin/bash
-set -e -x
-
-# This is to be run by Docker inside a Docker image.
-# You can test it locally on a Linux machine by installing docker and running from this repo's root:
-# $ docker run -e PLAT=manylinux2010_x86_64 -v `pwd`:/io quay.io/pypa/manylinux2010_x86_64 /io/scripts/build-manylinux-wheels.sh
-
-# * The -e just defines an environment variable PLAT=[docker name] inside the
-#    docker - auditwheel can't detect the docker name automatically.
-# * The -v gives a directory alias for passing files in and out of the docker
-#    (/io is arbitrary). E.g the `setup.py` script would be accessed in the
-#    docker via `/io/setup.py`.
-# * quay.io/pypa/manylinux2010_x86_64 is the full docker image name. Docker
-#    downloads it automatically.
-# * The last argument is a shell command that the Docker will execute.
-#    Filenames must be from the Docker's perspective.
-
-# Wheels are initially generated as you would usually, but put in a temp
-# directory temp-wheels. The pip-cache is optional but can speed up local builds
-# having a real permanent pip-cache dir.
-mkdir -p /io/pip-cache
-mkdir -p /io/temp-wheels
-
-# Clean out any old existing wheels.
-find /io/temp-wheels/ -type f -delete
-
-# Iterate through available pythons.
-for PY in cp3{7,8,9,10,11}; do
-    for PYBIN in /opt/python/"${PY}"*/bin; do
-        "${PYBIN}/pip" install -q -U setuptools wheel pytest build --cache-dir /io/pip-cache
-        # Run the following in root of this repo.
-        pushd /io/
-        USE_OMP=$USE_OMP "${PYBIN}/pip" install -q .
-        USE_OMP=$USE_OMP "${PYBIN}/pytest" --pyargs pykdtree
-        USE_OMP=$USE_OMP "${PYBIN}/python" -m build -w -o /io/temp-wheels
-        popd
-    done
-done
-
-"$PYBIN/pip" install -q auditwheel
-
-# Wheels aren't considered manylinux unless they have been through
-# auditwheel. Audited wheels go in /io/dist/.
-mkdir -p /io/dist/
-
-for whl in /io/temp-wheels/*.whl; do
-    auditwheel repair "$whl" --plat "$PLAT" -w /io/dist/
-done


=====================================
setup.py
=====================================
@@ -18,6 +18,9 @@
 import os
 import sys
 import re
+
+import numpy as np
+from Cython.Build import cythonize
 from setuptools import setup, Extension
 from setuptools.command.build_ext import build_ext
 
@@ -45,14 +48,9 @@ OMP_LINK_ARGS = {
     'msvc': []
 }
 
-def set_builtin(name, value):
-    if isinstance(__builtins__, dict):
-        __builtins__[name] = value
-    else:
-        setattr(__builtins__, name, value)
-
 
 class build_ext_subclass(build_ext):
+    """Custom extension building to have platform and compiler specific flags."""
 
     def build_extensions(self):
         comp = self.compiler.compiler_type
@@ -71,18 +69,6 @@ class build_ext_subclass(build_ext):
         self.extensions[0].extra_link_args = extra_link_args
         build_ext.build_extensions(self)
 
-    def finalize_options(self):
-        '''
-        In order to avoid premature import of numpy before it gets installed as a dependency
-        get numpy include directories during the extensions building process
-        http://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py
-        '''
-        build_ext.finalize_options(self)
-        # Prevent numpy from thinking it is still in its setup process:
-        set_builtin('__NUMPY_SETUP__', False)
-        import numpy
-        self.include_dirs.append(numpy.get_include())
-
 
 def _omp_compile_link_args(compiler):
     # Get OpenMP setting from environment
@@ -199,22 +185,26 @@ def _compile_link_paths_from_manifest(cmd):
 with open('README.rst', 'r') as readme_file:
     readme = readme_file.read()
 
+extensions = [
+    Extension('pykdtree.kdtree', sources=['pykdtree/kdtree.pyx', 'pykdtree/_kdtree_core.c'],
+              include_dirs=[np.get_include()],
+              ),
+]
+
 setup(
     name='pykdtree',
-    version='1.3.7',
+    version='1.3.9',
     url="https://github.com/storpipfugl/pykdtree",
     description='Fast kd-tree implementation with OpenMP-enabled queries',
     long_description=readme,
     author='Esben S. Nielsen',
     author_email='storpipfugl at gmail.com',
     packages=['pykdtree'],
-    python_requires='>=3.7',
+    python_requires='>=3.9',
     install_requires=['numpy'],
-    setup_requires=['numpy'],
     tests_require=['pytest'],
     zip_safe=False,
-    ext_modules=[Extension('pykdtree.kdtree',
-                           ['pykdtree/kdtree.c', 'pykdtree/_kdtree_core.c'])],
+    ext_modules=cythonize(extensions),
     cmdclass={'build_ext': build_ext_subclass},
     classifiers=[
       'Development Status :: 5 - Production/Stable',



View it on GitLab: https://salsa.debian.org/debian-gis-team/pykdtree/-/compare/748fca56b15c89523d8c919d25cb35de94143904...9cc2fba39360a22cdec43062337cbf9d92162f51

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pykdtree/-/compare/748fca56b15c89523d8c919d25cb35de94143904...9cc2fba39360a22cdec43062337cbf9d92162f51
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/pkg-grass-devel/attachments/20230923/cee33213/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list