Skip to content

Commit

Permalink
feat: add support to python 3.12 (#37)
Browse files Browse the repository at this point in the history
* feat: add support to python 3.12

Signed-off-by: Timon Wong <timon86.wang@gmail.com>

* version bump

Signed-off-by: Timon Wong <timon86.wang@gmail.com>

* fix pipeline

Signed-off-by: Timon Wong <timon86.wang@gmail.com>

---------

Signed-off-by: Timon Wong <timon86.wang@gmail.com>
  • Loading branch information
timonwong authored Sep 25, 2024
1 parent 624ad66 commit 59b7d54
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 145 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ jobs:
default: ""

machine:
image: ubuntu-2004:2022.04.1
image: ubuntu-2204:2023.07.1
resource_class: arm.medium

environment:
CIBW_SKIP: "<< parameters.skip >>"
CIBW_SKIP: "<< parameters.skip >> pp*" # skip building pypy wheels since broken (pypa/cibuildwheel#2015)
CIBW_BUILD: "<< parameters.build >>"
CIBW_PRERELEASE_PYTHONS: "1"

steps:
- checkout
Expand Down
78 changes: 49 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,95 @@ on:
push:
branches:
- master
pull_request: {}
pull_request:
workflow_dispatch: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: "1"
# only affects Windows, but easiest to set here for now
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 20

strategy:
fail-fast: false
fail-fast: true
matrix:
include:
- os: macos-11
- os: macos-13
python: "3.7"

- os: macos-11
python: "3.10"

- os: macos-11
python: pypy-3.8
- os: macos-14
python: "3.12"

- os: ubuntu-18.04
python: "3.7"
- os: macos-14
python: "3.13"

- os: ubuntu-20.04
python: pypy-3.8
#- os: macos-13
# python: pypy-3.9

- os: ubuntu-20.04
python: pypy-3.7
python: "3.7"

# - os: ubuntu-20.04
# python: "3.7"
#- os: ubuntu-22.04
# python: pypy-3.9

# - os: ubuntu-20.04
# python: "3.8"
#- os: ubuntu-22.04
# python: pypy-3.7

# - os: ubuntu-20.04
# python: "3.9"
- os: ubuntu-22.04
python: "3.9"

# - os: ubuntu-20.04
# python: "3.10"
- os: ubuntu-22.04
python: "3.10"

- os: ubuntu-20.04
- os: ubuntu-22.04
python: "3.11"

- os: windows-2019
- os: ubuntu-22.04
python: "3.8"

- os: ubuntu-22.04
python: "3.12"

- os: ubuntu-22.04
python: "3.13"

- os: ubuntu-22.04
python: "3.13"

- os: windows-2022
python: "3.7"
arch: x86

- os: windows-2019
- os: windows-2022
python: "3.9"
arch: x64

- os: windows-2019
python: "3.10"
- os: windows-2022
python: "3.13"
arch: x64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch || 'x64' }}
allow-prereleases: true
cache: pip

- name: install dependencies
run: |
pip install --upgrade pip wheel
pip install --upgrade pip wheel setuptools
pip install -r test-requirements.txt
- name: show environment
Expand Down
101 changes: 60 additions & 41 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,38 @@ on:
- .github/workflows/wheels.yml
workflow_dispatch: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
TWINE_NONINTERACTIVE: "1"

jobs:
sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"
cache: pip

- name: install dependencies
run: |
pip install --upgrade pip build
pip install --upgrade pip build pytest setuptools
pip install -r tools/wheel-requirements.txt
- name: build sdist
run: |
python setup.py build --with-cython
python -m build --sdist .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sdist
path: "dist/*.tar.gz"
Expand All @@ -87,81 +93,94 @@ jobs:
twine upload --skip-existing dist/*.tar.gz
wheel:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}

env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: "pytest -v {package}/tests"
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
# Skip building on CPython 3.6 on all platforms
CIBW_SKIP: "cp36-* *-manylinux_i686 *-musllinux_i686 ${{ matrix.cibw.skip || '' }}"
CIBW_ARCHS_LINUX: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_ARCHS_MACOS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_SKIP: "${{ matrix.cibw.skip || '' }} pp*" # skip building pypy wheels since broken (pypa/cibuildwheel#2015)
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}"

strategy:
fail-fast: false
matrix:
include:
- os: macos-11
- os: macos-12
name: mac-cpython
cibw:
build: "cp*"

- os: macos-11
name: mac-pypy
cibw:
build: "pp*"
# - os: macos-12
# name: mac-pypy
# cibw:
# build: "pp*"

- os: macos-11
- os: macos-14
name: mac-arm
cibw:
arch: universal2
build: "cp*"

- os: ubuntu-20.04
name: manylinux-x86_64
- name: manylinux-x86_64
cibw:
arch: x86_64
build: "*manylinux*"

# - os: ubuntu-20.04
# name: manylinux-aarch64
# skip due to time_t restrictions
# - name: manylinux-i686
# cibw:
# arch: aarch64
# arch: i686
# build: "*manylinux*"

- os: ubuntu-20.04
name: musllinux
# additional manylinux variants, not specified in pyproject.toml:
# build with newer 2_28 for cpython >= 3.10, pypy 3.9
- name: manylinux-x86_64-2_28
cibw:
build: "*musllinux*"
arch: x86_64
build: "cp31*-manylinux* pp39-manylinux*"
manylinux_x86_64_image: manylinux_2_28

# - os: ubuntu-20.04
# name: musllinux-arrch64
# cibw:
# arch: aarch64
# build: "*musllinux*"
- name: musllinux
cibw:
build: "*musllinux*"
skip: "*_i686"

- os: windows-2019
name: win32
- name: win32
os: windows-2019
architecture: x86
cibw:
build: "cp*win32"
# free-threaded doesn't seem to work on Windows
skip: "*t-win*"

- os: windows-2019
name: win-pypy
architecture: x64
cibw:
build: "pp*win_amd64"
# - os: windows-2019
# name: win-pypy
# architecture: x64
# cibw:
# build: "pp*win_amd64"

- os: windows-2019
name: win_amd64
architecture: x64
cibw:
build: "cp*win_amd64"
# free-threaded doesn't seem to work on Windows
skip: "*t-win*"

- os: windows-2022
name: win_arm64
architecture: x64
cibw:
arch: ARM64
# free-threaded doesn't seem to work on Windows
skip: "cp37* *t-win*"


steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# - name: Set up qemu
# id: qemu
Expand All @@ -171,9 +190,9 @@ jobs:
# platforms: arm64

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"
architecture: ${{ matrix.architecture }}

- name: customize mac-arm-64
Expand Down Expand Up @@ -207,7 +226,7 @@ jobs:
run: |
python -m cibuildwheel .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.name }}
path: "wheelhouse/*"
Expand Down
2 changes: 1 addition & 1 deletion cyksuid/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "2.0.2"
__version__: str = "2.1.0"
Loading

0 comments on commit 59b7d54

Please sign in to comment.