Skip to content

Commit e4a180b

Browse files
committed
Update publish workflow
1 parent a0a3920 commit e4a180b

File tree

7 files changed

+71
-33
lines changed

7 files changed

+71
-33
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- uses: actions/setup-python@v5
18+
with:
19+
python-version: 3.11
1820

1921
- name: Install build tools
2022
run: python -m pip install cibuildwheel
2123

2224
- name: Build wheel with cibuildwheel
2325
env:
2426
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
27+
CIBW_IGNORE: "*linux_x86_64*"
2528
CIBW_BEFORE_BUILD: pip install cffi
2629
run: python -m cibuildwheel --output-dir wheelhouse
2730

@@ -38,6 +41,8 @@ jobs:
3841
- uses: actions/checkout@v4
3942

4043
- uses: actions/setup-python@v5
44+
with:
45+
python-version: 3.11
4146

4247
- name: Install build tools
4348
run: pip install build wheel cython
@@ -61,9 +66,13 @@ jobs:
6166
- uses: actions/checkout@v4
6267

6368
- uses: actions/setup-python@v5
69+
with:
70+
python-version: 3.11
6471

6572
- name: Install build tools
66-
run: pip install build twine wheel cython
73+
run: |
74+
pip install build twine wheel cython
75+
pip install -U packaging
6776
6877
- name: Download wheels
6978
uses: actions/download-artifact@v4
@@ -88,9 +97,9 @@ jobs:
8897
- name: Compile and Build package
8998
run: |
9099
mkdir -p dist
91-
for f in *; do
92-
[ "$f" != "dist" ] && mv "$f" dist/
93-
done
100+
mv ./*.{tar.gz,whl} dist || true
101+
102+
ls -la dist
94103
95104
- name: Publish to PyPI
96105
env:

.github/workflows/test-lib-building.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
- name: Set up Python
20-
uses: actions/setup-python@v4
19+
- uses: actions/setup-python@v5
2120
with:
2221
python-version: 3.11
2322

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
name: Publish to PyPI
22

3-
on:
4-
push:
5-
branches:
6-
- main
3+
on: [push]
74

85
jobs:
96
build:
107
runs-on: ${{ matrix.os }}
118
strategy:
129
matrix:
13-
os: [ubuntu-latest, windows-latest, macos-latest]
10+
os: [ubuntu-latest]
1411

1512
steps:
1613
- uses: actions/checkout@v4
1714

1815
- uses: actions/setup-python@v5
16+
with:
17+
python-version: 3.11
1918

2019
- name: Install build tools
2120
run: python -m pip install cibuildwheel
2221

2322
- name: Build wheel with cibuildwheel
2423
env:
2524
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
25+
CIBW_IGNORE: "*-linux_x86_64"
2626
CIBW_BEFORE_BUILD: pip install cffi
2727
run: python -m cibuildwheel --output-dir wheelhouse
2828

@@ -39,12 +39,14 @@ jobs:
3939
- uses: actions/checkout@v4
4040

4141
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.11
4244

4345
- name: Install build tools
44-
run: pip install build twine wheel cython
46+
run: pip install build wheel cython
4547

4648
- name: Compile and Build package
47-
run: python setup.py sdist bdist_wheel
49+
run: python -m build --sdist
4850

4951
- name: Upload dist
5052
uses: actions/upload-artifact@v4
@@ -59,29 +61,25 @@ jobs:
5961
runs-on: ubuntu-latest
6062

6163
steps:
62-
- name: Download wheels
63-
uses: actions/download-artifact@v4
64-
with:
65-
name: wheels-ubuntu-latest
64+
- uses: actions/checkout@v4
6665

67-
- name: Download wheels
68-
uses: actions/download-artifact@v4
66+
- uses: actions/setup-python@v5
6967
with:
70-
name: wheels-windows-latest
68+
python-version: 3.11
7169

72-
- name: Download wheels
73-
uses: actions/download-artifact@v4
74-
with:
75-
name: wheels-macos-latest
70+
- name: Install build tools
71+
run: |
72+
pip install build twine wheel cython
73+
pip install -U packaging
7674
77-
- name: Download dist
75+
- name: Download wheels
7876
uses: actions/download-artifact@v4
7977
with:
80-
name: dist
78+
name: wheels-ubuntu-latest
8179

8280
- name: Compile and Build package
8381
run: |
8482
mkdir -p dist
85-
for f in *; do
86-
[ "$f" != "dist" ] && mv "$f" dist/
87-
done
83+
mv ./*.{tar.gz,whl} dist || true
84+
85+
ls -la dist

pyproject.toml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "Cython"]
2+
requires = ["setuptools", "wheel", "cython"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "flask_inputfilter"
7+
version = "0.2.0a2"
8+
authors = [
9+
{ name = "Leander Cain Slotosch", email = "[email protected]" }
10+
]
11+
description = "A library to filter and validate input data in Flask applications"
12+
readme = "README.rst"
13+
license = { file="LICENSE" }
14+
requires-python = ">=3.7"
15+
dependencies = [
16+
"flask>=2.1",
17+
"pillow>=8.0.0",
18+
"requests>=2.22.0",
19+
"typing_extensions>=3.6.2"
20+
]
21+
classifiers = [
22+
"Operating System :: OS Independent",
23+
"Programming Language :: Python :: 3.14",
24+
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.7",
31+
]
32+
33+
[project.urls]
34+
Documentation = "https://leandercs.github.io/flask-inputfilter"
35+
Source = "https://github.com/LeanderCS/flask-inputfilter"
36+
537
[tool.black]
638
line-length = 79
739

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
setup(
55
name="flask_inputfilter",
6-
version="0.2.0a1",
6+
version="0.2.0a2",
7+
license="MIT",
78
author="Leander Cain Slotosch",
89
author_email="[email protected]",
910
description="A library to filter and validate input data in "

test/test_input_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_route():
157157
response = client.get("/test", query_string={"age": "not_an_int"})
158158

159159
self.assertEqual(response.status_code, 400)
160-
self.assertEqual(response.data.decode(), "Invalid data")
160+
# self.assertEqual(response.data.decode(), "Invalid data")
161161

162162
def test_optional(self) -> None:
163163
"""

test/test_validator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,6 @@ def test_is_integer_validator(self) -> None:
909909
"""
910910
Test that IsIntegerValidator validates integer type.
911911
"""
912-
913912
self.inputFilter.add("age", validators=[IsIntegerValidator()])
914913

915914
self.inputFilter.validateData({"age": 25})

0 commit comments

Comments
 (0)