Skip to content

Version 0.13: Python 3.13 compatibility and minor updates #436

Version 0.13: Python 3.13 compatibility and minor updates

Version 0.13: Python 3.13 compatibility and minor updates #436

Workflow file for this run

name: Python (CPython)
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
build-clang:
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install pip setuptools --upgrade
- name: Install package
run: |
CC=clang python -m pip install . --no-deps -vv
- name: Import package
run: |
python -c "import iteration_utilities"
- name: Install test dependencies
run: |
python -m pip install pytest
- name: Run tests
run: |
python -m pytest tests/
build-python-with-debug:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download Python
run: |
wget https://www.python.org/ftp/python/3.12.6/Python-3.12.6.tgz -q
python3 ci/verify_checksum.py Python-3.12.6.tgz c2f1dd5c8807ee50b778684b7958ee28
- name: Install Python
run: |
tar xzf Python-3.12.6.tgz
cd Python-3.12.6
./configure --with-pydebug
sudo make altinstall -s -j2
- name: Remove download
run: |
sudo python3.12 -c "import os; os.remove('./Python-3.12.6.tgz'); import shutil; shutil.rmtree('./Python-3.12.6/')"
- name: Install dependencies
run: |
python3.12 -m pip install pip setuptools wheel --upgrade --user --no-warn-script-location
- name: Create wheel
run: |
python3.12 -m pip wheel . --no-deps --wheel-dir=./wheelhouse/ -vv
- name: Install package
run: |
python3.12 -m pip install iteration_utilities --no-index --find-links=./wheelhouse/ --user -vv
- name: Import package
run: |
python3.12 -c "import iteration_utilities"
- name: Install test dependencies
run: |
python3.12 -m pip install pytest --user --no-warn-script-location
- name: Run tests
run: |
python3.12 -m pytest tests/
build-python3-13-with-debug:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download Python
run: |
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz -q
python3 ci/verify_checksum.py Python-3.13.0rc2.tgz ad7f44153649e27ec385e7633e853e03
- name: Install Python
run: |
tar xzf Python-3.13.0rc2.tgz
cd Python-3.13.0rc2
./configure --with-pydebug
sudo make altinstall -s -j2
- name: Remove download
run: |
sudo python3.13 -c "import os; os.remove('./Python-3.13.0rc2.tgz'); import shutil; shutil.rmtree('./Python-3.13.0rc2/')"
- name: Install dependencies
run: |
python3.13 -m pip install pip setuptools wheel --upgrade --user --no-warn-script-location
- name: Create wheel
run: |
python3.13 -m pip wheel . --no-deps --wheel-dir=./wheelhouse/ -vv
- name: Install package
run: |
python3.13 -m pip install iteration_utilities --no-index --find-links=./wheelhouse/ --user -vv
- name: Import package
run: |
python3.13 -c "import iteration_utilities"
- name: Install test dependencies
run: |
python3.13 -m pip install pytest --user --no-warn-script-location
- name: Run tests
run: |
python3.13 -m pytest tests/
build-sdist:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install pip setuptools wheel build --upgrade
- name: Create source distribution
run: |
python -m build
- name: Delete wheel
run: |
rm ./dist/*.whl
- name: Install package
run: |
python -m pip install ./dist/iteration_utilities-0.13.0.tar.gz -vv
- name: Import package
run: |
python -c "import iteration_utilities"
- name: Install test dependencies
run: |
python -m pip install pytest
- name: Run tests
run: |
python -m pytest tests/
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: py_sdist
path: ./dist/
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.1
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_TEST_COMMAND: >
python -c "import iteration_utilities" &&
pytest {package}/tests
CIBW_TEST_REQUIRES: pytest
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build-docs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install pip setuptools --upgrade
- name: Install package
run: |
python -m pip install . --no-deps -vv
- name: Install doc dependencies
run: |
python -m pip install sphinx numpydoc
- name: Build doc
run: |
sphinx-build -b html -W -a -n docs/ build/sphinx/html/
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: ./build/sphinx/html/