From 950b5aa307afc2dd9d1ed042c74b0c3362914696 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Mon, 25 Apr 2022 17:04:14 +0200 Subject: [PATCH 1/3] DEP: Fix dependencies for numpy 1.21 --- pyproject.toml | 21 +++++++++++++-------- requirements.txt | 5 +++-- setup.py | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3644314..0a7c3c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,21 +2,26 @@ name = 'pylandau' version = '2.2.0' description = 'A Landau PDF definition to be used in Python.' -repository = 'https://github.com/SiLab-Bonn/pyLandau' -license = 'LGPL-2.1-only' -python = '^3.8' +license = {file = 'LICENSE'} +requires-python = '>=3.7' readme = 'README.md' -authors = 'David-Leon Pohl, Christian Bespin' -maintainers ='David-Leon Pohl, Christian Bespin' -author_email = 'pohl@physik.uni-bonn.de, bespin@physik.uni-bonn.de' -maintainer_email = 'pohl@physik.uni-bonn.de, bespin@physik.uni-bonn.de' +authors = [ + {name = 'David-Leon Pohl', email = 'pohl@physik.uni-bonn.de'}, + {name = 'Christian Bespin', email = 'bespin@physik.uni-bonn.de'} +] +maintainers = [ + {name = 'Christian Bespin', email = 'bespin@physik.uni-bonn.de'} +] + +[project.urls] +repository = 'https://github.com/SiLab-Bonn/pyLandau' [build-system] # Minimum requirements for the build system to execute. requires = [ "setuptools", "wheel", - "numpy>=1.22", + "numpy>=1.21", "cython>=0.29", ] # PEP 508 specifications build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 54184ab..bb9d7be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -numpy>=1.22 -scipy>=1.8 +cython>=0.29 +numpy>=1.21 +scipy>=1.7 \ No newline at end of file diff --git a/setup.py b/setup.py index ffd9c88..b585ad2 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ def finalize_options(self): sources=['pyLandau/cpp/pylandau.cpp'], language="c++")] -install_requires = ['numpy>=1.22', 'scipy>=1.8'] +install_requires = ['cython>=0.29', 'numpy>=1.21'] setup( cmdclass={'build_ext': build_ext}, From 3cf37dcbecd042deb29a50214b3211724ba1ebd0 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Mon, 25 Apr 2022 17:18:23 +0200 Subject: [PATCH 2/3] CI: Add testing of compiled wheels --- .github/workflows/tests.yml | 4 ++-- .github/workflows/wheels.yml | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 519145c..6a47ecf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,9 +25,9 @@ jobs: with: python-version: ${{matrix.python-version}} cache: 'pip' - - name: Install dependencies - run: pip install cython numpy scipy hypothesis pytest - name: Install package run: pip install -e . + - name: Install test dependencies + run: pip install hypothesis pytest - name: Run tests run: pytest diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8143449..b7cee81 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -20,12 +20,14 @@ jobs: env: CIBW_ARCHS: auto64 # Build 64bit versions only CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014" - CIBW_BUILD: "cp38-* cp39-* cp310-*" # Build on CPython 3.8 - 3.10 only + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 + CIBW_BUILD: cp38-* cp39-* cp310-* # Build on CPython 3.8 - 3.10 only CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" CIBW_SKIP: "*-manylinux_i686 *_ppc64le *_s390x *-musllinux*" CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_TEST_COMMAND: "echo Wheel installed" + CIBW_TEST_REQUIRES: hypothesis pytest + CIBW_TEST_COMMAND: pytest {package}/tests + CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64" - uses: actions/upload-artifact@v2 with: From a8f9dc8bc72c5d3d4906141c2926de9b86a6fd04 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Mon, 25 Apr 2022 17:29:14 +0200 Subject: [PATCH 3/3] DEP: Add dependencies to pyproject.toml --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0a7c3c0..be521dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = 'pylandau' version = '2.2.0' description = 'A Landau PDF definition to be used in Python.' license = {file = 'LICENSE'} -requires-python = '>=3.7' +requires-python = '>=3.8' readme = 'README.md' authors = [ {name = 'David-Leon Pohl', email = 'pohl@physik.uni-bonn.de'}, @@ -12,6 +12,11 @@ authors = [ maintainers = [ {name = 'Christian Bespin', email = 'bespin@physik.uni-bonn.de'} ] +dependencies = [ + "cython>=0.29", + "numpy>=1.21", + "scipy>=1.7", +] [project.urls] repository = 'https://github.com/SiLab-Bonn/pyLandau'