Skip to content

Commit 17bab85

Browse files
committed
BUILD: Add support for Python 3.13 and drop 3.9.
This adds python 3.13 to build process and drops support for 3.9
1 parent 3d81a7f commit 17bab85

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [ ubuntu-20.04, macOS-12, windows-2019 ]
22-
python-version: [ '3.9', 'pypy3.9', '3.10', '3.11', '3.12' ]
22+
python-version: [ '3.10', 'pypy3.10', '3.11', '3.12', '3.13' ]
2323
fail-fast: false
2424

2525
name: Python version - ${{ matrix.python-version }} - ${{ matrix.os }}
@@ -49,12 +49,13 @@ jobs:
4949
env:
5050
BUILD_WITH_COVERAGE: true
5151
run: |
52-
cythonize polyagamma/*.pyx -X linetrace=${{ contains(fromJSON('["3.12", "pypy3.9"]'), matrix.python-version) && 'False' || 'True' }}
52+
cythonize polyagamma/*.pyx -X linetrace=${{ contains(fromJSON('["pypy3.10"]'), matrix.python-version) && 'False' || 'True' }}
5353
python3 -m pip install -e .
5454
pytest -v --cov-branch --cov=polyagamma tests/ --cov-report=xml
5555
5656
- name: Upload coverage to Codecov
57-
uses: codecov/codecov-action@v3
57+
uses: codecov/codecov-action@v4
5858
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
5960
files: ./coverage.xml
6061
fail_ci_if_error: false

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Python
3636
uses: actions/setup-python@v5
3737
with:
38-
python-version: '3.9'
38+
python-version: '3.10'
3939

4040
- name: Cythonize C-extensions
4141
run: |
@@ -44,7 +44,7 @@ jobs:
4444
cythonize polyagamma/*.pyx
4545
4646
- name: Build wheels
47-
uses: pypa/cibuildwheel@v2.19.2
47+
uses: pypa/cibuildwheel@v2.21.3
4848
with:
4949
package-dir: .
5050
output-dir: wheelhouse

pyproject.toml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ requires = [
33
"wheel",
44
"setuptools>=61.0.0",
55
"setuptools-scm",
6-
# Here we build the project using the earliest numpy version supported by
7-
# the used version of python. This does not affect required numpy version at
8-
# installation time; `project.dependencies` is most relevant for required numpy
9-
# when installtng at user level.
10-
"numpy==2.0.0; python_version=='3.12' and platform_python_implementation!='PyPy'",
11-
"numpy==2.0.0; python_version=='3.11' and platform_python_implementation!='PyPy'",
12-
"numpy==2.0.0; python_version=='3.10' and platform_python_implementation!='PyPy'",
13-
"numpy==2.0.0; python_version=='3.9' and platform_python_implementation!='PyPy'",
6+
"numpy==2.1.3; python_version>='3.10' and platform_python_implementation!='PyPy'",
147
# PyPy specific requirements
15-
"numpy==2.0.0; python_version=='3.9' and platform_python_implementation=='PyPy'",
8+
"numpy==2.1.3; python_version=='3.10' and platform_python_implementation=='PyPy'",
169
]
1710
build-backend = "setuptools.build_meta"
1811

@@ -25,7 +18,7 @@ authors = [
2518
description = "Efficiently generate samples from the Polya-Gamma distribution using a NumPy/SciPy compatible interface."
2619
readme = "README.md"
2720
dynamic = ["version"]
28-
requires-python = ">=3.9"
21+
requires-python = ">=3.10"
2922
dependencies = ["numpy >= 1.19.0"]
3023
license = {text = "BSD 3-Clause License"}
3124
keywords = ['polya-gamma distribution', 'polya-gamma random sampling']

requirements-dev.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cython==3.0.*
2-
numpy==2.0.0
3-
pre-commit==3.4.0
4-
pytest==7.4.0
5-
pytest-cov==4.1.0
6-
setuptools==70.3.0
1+
cython==3.0.11
2+
numpy==2.1.3
3+
pre-commit==4.0.1
4+
pytest==8.3.3
5+
pytest-cov==6.0.0
6+
setuptools==75.3.0

0 commit comments

Comments
 (0)