.github/workflows/check_pypi_packaging.yml builds the package with:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: python setup.py sdist bdist_wheel
Invoking setup.py directly is deprecated. It still works today (I ran it in a clean venv on setuptools 83 and it does produce both scadnano-0.20.1.tar.gz and scadnano-0.20.1-py3-none-any.whl), but setuptools now warns:
SetuptoolsDeprecationWarning: setup.py install is deprecated.
This deprecation is overdue, please update your project and remove deprecated
calls to avoid build errors in the future.
So this workflow is on a clock: whenever setuptools finally removes the setup.py command interface, the job starts failing, and it will do so on setuptools' schedule rather than ours. This is the same failure mode as the stale action versions in #324 — nothing is wrong today, but nothing is watching it either.
The fix is to use the standard PEP 517 build front end, which is what release.yml already does:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build
run: python -m build
python -m build produces the same sdist + wheel, in an isolated build environment. This also makes the two workflows consistent: right now release.yml (the one that actually publishes to PyPI) builds differently from check_pypi_packaging.yml (the one meant to check that packaging works), which somewhat defeats the point of the check.
Noticed while doing #324.
Separately, and worth a look while in there: setup.py passes tests_require, which setuptools no longer recognizes and warns about (UserWarning: Unknown distribution option: 'tests_require').
.github/workflows/check_pypi_packaging.ymlbuilds the package with:Invoking
setup.pydirectly is deprecated. It still works today (I ran it in a clean venv on setuptools 83 and it does produce bothscadnano-0.20.1.tar.gzandscadnano-0.20.1-py3-none-any.whl), but setuptools now warns:So this workflow is on a clock: whenever setuptools finally removes the
setup.pycommand interface, the job starts failing, and it will do so on setuptools' schedule rather than ours. This is the same failure mode as the stale action versions in #324 — nothing is wrong today, but nothing is watching it either.The fix is to use the standard PEP 517 build front end, which is what
release.ymlalready does:python -m buildproduces the same sdist + wheel, in an isolated build environment. This also makes the two workflows consistent: right nowrelease.yml(the one that actually publishes to PyPI) builds differently fromcheck_pypi_packaging.yml(the one meant to check that packaging works), which somewhat defeats the point of the check.Noticed while doing #324.
Separately, and worth a look while in there:
setup.pypassestests_require, which setuptools no longer recognizes and warns about (UserWarning: Unknown distribution option: 'tests_require').