Skip to content

Commit 0a787b6

Browse files
authored
Merge pull request #50 from LeanderCS/47
47 | Use cibuildwheel to generate linux wheels
2 parents e904ad3 + 2393bb4 commit 0a787b6

File tree

4 files changed

+29
-44
lines changed

4 files changed

+29
-44
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,30 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
os: [ windows-latest, macos-latest ] #ubuntu-latest,
18-
python: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
19-
exclude:
20-
- os: windows-latest
21-
python: "3.14"
22-
- os: macos-latest
23-
python: "3.8"
24-
- os: macos-latest
25-
python: "3.7"
26-
#- os: ubuntu-latest
27-
# python: "3.7"
17+
os: [ ubuntu-latest, windows-latest, macos-latest ]
2818

2919
steps:
3020
- uses: actions/checkout@v4
3121

32-
- name: Install Python 3.14 with pyenv (if needed)
33-
if: ${{ matrix.python == '3.14' }}
34-
run: |
35-
curl https://pyenv.run | bash
36-
export PATH="$HOME/.pyenv/bin:$PATH"
37-
eval "$(pyenv init --path)"
38-
eval "$(pyenv init -)"
39-
pyenv install 3.14-dev
40-
pyenv global 3.14-dev
41-
42-
- name: Setup Python
43-
if: ${{ matrix.python != '3.14' }}
44-
uses: actions/setup-python@v5
22+
- uses: actions/setup-python@v5
4523
with:
46-
python-version: ${{ matrix.python }}
24+
python-version: 3.11
4725

4826
- name: Install build tools
49-
run: pip install build twine wheel auditwheel
27+
run: python -m pip install cibuildwheel
5028

51-
- name: Build wheel
52-
run: python -m build --wheel
29+
- name: Build wheel with cibuildwheel
30+
env:
31+
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
32+
CIBW_IGNORE: "*linux_x86_64*"
33+
CIBW_BEFORE_BUILD: pip install cffi
34+
run: python -m cibuildwheel --output-dir dist
5335

54-
- name: Repair the wheel for manylinux compatibility
55-
if: ${{ runner.os == 'Linux' }}
56-
run: auditwheel repair dist/*.whl -w dist/
57-
58-
- name: Upload built packages
36+
- name: Upload wheels
5937
uses: actions/upload-artifact@v4
6038
with:
61-
name: pkg-${{ matrix.os }}-${{ matrix.python }}-${{ strategy.job-index }}
62-
path: |
63-
./dist/*.whl
39+
name: pkg-${{ matrix.os }}-${{ strategy.job-index }}
40+
path: ./dist/*.whl
6441

6542
build-sdist:
6643
runs-on: ubuntu-latest
@@ -73,17 +50,16 @@ jobs:
7350
python-version: 3.11
7451

7552
- name: Install build tools
76-
run: pip install build twine wheel
53+
run: pip install build cython
7754

78-
- name: Build source distribution
55+
- name: Compile and Build package
7956
run: python -m build --sdist
8057

81-
- name: Upload built packages
58+
- name: Upload dist
8259
uses: actions/upload-artifact@v4
8360
with:
8461
name: pkg-sdist
85-
path: |
86-
./dist/*.tar.gz
62+
path: ./dist/*.tar.gz
8763

8864
publish:
8965
needs: [build-whl, build-sdist]
@@ -103,5 +79,7 @@ jobs:
10379
path: dist
10480
merge-multiple: true
10581

82+
- run: ls -la dist
83+
10684
- name: Publish package to PyPI
10785
uses: pypa/gh-action-pypi-publish@release/v1

docs/source/changelog.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ Changelog
33

44
All notable changes to this project will be documented in this file.
55

6+
[0.4.3a1] - 2025-04-26
7+
----------------------
8+
9+
Added
10+
- whl generation for linux too.
11+
12+
613
[0.4.2] - 2025-04-25
714
--------------------
815

916
Added
1017
^^^^^
11-
- .whl generation for all major versions and envs.
18+
- whl generation for all major versions and envs.
1219

1320

1421
[0.4.1] - 2025-04-24

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project = "flask-inputfilter"
22
copyright = "2025, Leander Cain Slotosch"
33
author = "Leander Cain Slotosch"
4-
release = "0.4.2"
4+
release = "0.4.3a1"
55

66
extensions = ["sphinx_rtd_theme", "sphinx_design"]
77

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "flask_inputfilter"
7-
version = "0.4.2"
7+
version = "0.4.3a1"
88
description = "A library to easily filter and validate input data in Flask applications"
99
readme = "README.rst"
1010
requires-python = ">=3.7"

0 commit comments

Comments
 (0)