Skip to content

Commit 63ae691

Browse files
authored
fix setuptools_scm config by using "no-local-version" scheme; add check that wheel names do not contain "+" chars (otherwise PyPI fails to accept the upload) (#1477)
1 parent e8ed7c5 commit 63ae691

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.github/workflows/pypi.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232

3333
- run: pip install twine build
3434

35-
- run: |
35+
- name: run python -m build to generate wheel files, check for warnings
36+
run: |
37+
set -x
3638
unset CI
3739
cd ${{ matrix.packages-dir }}
3840
python -m build 2>&1 | tee build.log
@@ -41,7 +43,11 @@ jobs:
4143
| grep -v "version of {dist_name} already set" \
4244
| grep -v -E "UserWarning: version of PySDM(-examples)? already set" \
4345
| wc -l`
44-
twine check --strict dist/*
46+
- run: twine check --strict ${{ matrix.packages-dir }}/dist/*
47+
- name: check if version string does not contain PyPI-incompatible + char
48+
run: |
49+
set -x
50+
[ `ls ${{ matrix.packages-dir }}/dist | fgrep + | tee /dev/stderr | wc -l` -ne 0 ] && exit 1 || echo OK
4551
4652
- uses: actions/upload-artifact@v4
4753
with:

examples/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tool.setuptools_scm]
22
root = ".."
3+
local_scheme = "no-local-version"
4+
version_scheme = "post-release"
35

46
[build-system]
57
requires = ['setuptools==75.6.0', 'setuptools-scm==8.1.0']

examples/setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ def get_long_description():
2323
name="PySDM-examples",
2424
description="PySDM usage examples reproducing results from literature "
2525
"and depicting how to use PySDM from Python Jupyter notebooks",
26-
use_scm_version={
27-
"local_scheme": lambda _: "",
28-
"version_scheme": "post-release",
29-
},
3026
install_requires=[
3127
"PySDM",
3228
"PyMPDATA" + (">=1.0.15" if CI else ""),

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
profile = "black"
33

44
[tool.setuptools_scm]
5+
local_scheme = "no-local-version"
6+
version_scheme = "post-release"
57

68
[build-system]
79
requires = ['setuptools==75.3.0', 'setuptools-scm==8.1.0']

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def get_long_description():
2525
description="Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry"
2626
" cloud microphysics package with box, parcel & 1D/2D prescribed-flow"
2727
" examples in Python, Julia and Matlab",
28-
use_scm_version={"local_scheme": lambda _: "", "version_scheme": "post-release"},
2928
install_requires=[
3029
"ThrustRTC==0.3.20",
3130
"CURandRTC" + ("==0.1.6" if CI else ">=0.1.2"),

0 commit comments

Comments
 (0)