Skip to content

Commit 483322b

Browse files
committed
Add Python 3.11 to the wheel matrix, remove 2.7 and 3.6
- tests are still done on 2.7 and 3.6 - update `actions/checkout` and `actions/setup-python` - use `pypa/cibuildwheel` for publishing
1 parent a8eb6eb commit 483322b

File tree

4 files changed

+72
-97
lines changed

4 files changed

+72
-97
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on: [push]
44

55
jobs:
66
build-linux:
7-
runs-on: ubuntu-18.04
7+
runs-on: ubuntu-20.04
88
strategy:
99
matrix:
10-
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
10+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v4
1515
with:
1616
python-version: ${{ matrix.python-version }}
1717
- name: Install dependencies
@@ -24,14 +24,14 @@ jobs:
2424
just script/unix/ci-test
2525
2626
build-macos:
27-
runs-on: macos-10.15
27+
runs-on: macos-11
2828
strategy:
2929
matrix:
30-
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
30+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
3131
steps:
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v3
3333
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v1
34+
uses: actions/setup-python@v4
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
- name: Install dependencies
@@ -47,11 +47,11 @@ jobs:
4747
runs-on: windows-2019
4848
strategy:
4949
matrix:
50-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
50+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
5151
steps:
52-
- uses: actions/checkout@v2
52+
- uses: actions/checkout@v3
5353
- name: Set up Python ${{ matrix.python-version }}
54-
uses: actions/setup-python@v1
54+
uses: actions/setup-python@v4
5555
with:
5656
python-version: ${{ matrix.python-version }}
5757
- name: Install dependencies
Lines changed: 55 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,66 @@
1-
name: Upload Python Package
1+
name: Build and upload to PyPI
22

33
on:
44
push:
55
release:
6-
types: [created]
6+
types: [published]
77

88
jobs:
9-
deploy-linux:
10-
runs-on: ubuntu-18.04
11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v1
15-
with:
16-
python-version: '3.x'
17-
- name: Update submodules
18-
run: |
19-
git submodule update --init
20-
- name: Build manylinux Python wheels
21-
uses: RalfG/python-wheels-manylinux-build@v0.3.4-manylinux2010_x86_64
22-
with:
23-
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
24-
build-requirements: 'cython'
25-
system-packages: 'patchelf'
26-
- name: Publish wheels to PyPI
27-
if: github.event_name == 'release'
28-
env:
29-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31-
run: |
32-
python -m pip install twine
33-
twine upload --skip-existing dist/*-manylinux*.whl
34-
35-
deploy-macos:
36-
runs-on: macos-10.15
9+
build_wheels:
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
3712
strategy:
3813
matrix:
39-
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
14+
os: [ubuntu-20.04, windows-2019, macos-11]
4015
steps:
41-
- uses: actions/checkout@v2
42-
- name: Set up Python ${{ matrix.python-version }}
43-
uses: actions/setup-python@v1
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
- name: Install dependencies
47-
run: |
48-
curl -L https://github.com/casey/just/releases/download/v0.5.8/just-v0.5.8-x86_64-apple-darwin.tar.gz | tar -vzx just
49-
sudo mv just /usr/local/bin
50-
just script/unix/ci-bootstrap
51-
- name: Build wheels
52-
run: |
53-
just script/unix/ci-dist
54-
- name: Publish wheels to PyPI
55-
if: github.event_name == 'release'
56-
env:
57-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
58-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
59-
run: |
60-
python -m pip install twine
61-
twine upload --skip-existing dist/*.whl dist/*.tar.gz
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: true
6219

63-
deploy-windows:
64-
runs-on: windows-2019
65-
strategy:
66-
matrix:
67-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
20+
- name: Build wheels
21+
uses: pypa/cibuildwheel@v2.11.2
22+
env:
23+
CIBW_BUILD_VERBOSITY: 1
24+
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
25+
CIBW_SKIP: "pp* *-musllinux* *_aarch64 *_ppc64le *_s390x *_i686 *_universal2"
26+
27+
- uses: actions/upload-artifact@v3
28+
with:
29+
path: ./wheelhouse/*.whl
30+
31+
build_sdist:
32+
name: Build source distribution
33+
runs-on: ubuntu-latest
6834
steps:
69-
- uses: actions/checkout@v2
70-
- name: Set up Python ${{ matrix.python-version }}
71-
uses: actions/setup-python@v1
72-
with:
73-
python-version: ${{ matrix.python-version }}
74-
- name: Install dependencies
75-
run: |
76-
$JustVersion = "v0.5.8"
77-
Invoke-WebRequest -Uri https://github.com/casey/just/releases/download/$JustVersion/just-$JustVersion-x86_64-pc-windows-msvc.zip -OutFile just-$JustVersion-x86_64-pc-windows-msvc.zip
78-
Expand-Archive .\just-$JustVersion-x86_64-pc-windows-msvc.zip unzipped
79-
$Env:Path = (Join-Path (Get-Location) "unzipped") + ";" + $Env:Path
80-
just script/windows/ci-bootstrap
81-
- name: Build wheels
82-
run: |
83-
$Env:Path = (Join-Path (Get-Location) "unzipped") + ";" + $Env:Path
84-
just script/windows/ci-dist
85-
- name: Publish wheels to PyPI
86-
if: github.event_name == 'release'
87-
env:
88-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
89-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
90-
run: |
91-
python -m pip install twine
92-
twine upload --skip-existing dist/*.whl
35+
- uses: actions/checkout@v3
36+
with:
37+
submodules: true
38+
39+
- name: Build sdist
40+
run: pipx run build --sdist
41+
42+
- uses: actions/upload-artifact@v3
43+
with:
44+
path: dist/*.tar.gz
45+
46+
upload_pypi:
47+
needs: [build_wheels, build_sdist]
48+
runs-on: ubuntu-latest
49+
# upload to PyPI on every tag starting with 'v'
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
51+
# alternatively, to publish when a GitHub Release is created, use the following rule:
52+
# if: github.event_name == 'release' && github.event.action == 'published'
53+
steps:
54+
- uses: actions/download-artifact@v3
55+
with:
56+
# unpacks default artifact into dist/
57+
# if `name: artifact` is omitted, the action will create extra parent dir
58+
name: artifact
59+
path: dist
60+
61+
- uses: pypa/gh-action-pypi-publish@v1.5.0
62+
with:
63+
skip_existing: true
64+
user: ${{ secrets.PYPI_USERNAME }}
65+
password: ${{ secrets.PYPI_PASSWORD }}
66+
# To test: repository_url: https://test.pypi.org/legacy/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Given the C API works modifying a buffer in-place, the wrapper offers:
1414
the buffer in-place.
1515

1616
## Release notes
17+
18+
- 1.0.4rc1 (Oct 24, 2022)
19+
- add Python 3.11 to the matrix, remove Python 2.7 and 3.6
20+
- **1.0.3** (Feb 22, 2022)
21+
- Final release with Python 3.10
1722
- 1.0.3rc1 (Nov 4, 2021):
1823
- add Python 3.10 to the matrix
1924
- **1.0.2** (Nov 4, 2021):

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
description="tiny-AES-c wrapper in Cython",
3131
long_description=long_description,
3232
long_description_content_type="text/markdown",
33-
version="1.0.3",
33+
version="1.0.4rc1",
3434
author="Matteo Bertini",
3535
author_email="naufraghi@develer.com",
3636
url="https://github.com/naufraghi/tinyaes-py",
@@ -60,10 +60,6 @@
6060
# that you indicate whether you support Python 2, Python 3 or both.
6161
"Programming Language :: Python :: 2.7",
6262
"Programming Language :: Python :: 3",
63-
"Programming Language :: Python :: 3.6",
64-
"Programming Language :: Python :: 3.7",
65-
"Programming Language :: Python :: 3.8",
66-
"Programming Language :: Python :: 3.9",
6763
# Source language
6864
"Programming Language :: Cython",
6965
],

0 commit comments

Comments
 (0)