Skip to content

fixes #326; build with python -m build instead of deprecated python setup.py sdist bdist_wheel - #346

Merged
dave-doty merged 1 commit into
devfrom
326-use-python-m-build-instead-of-deprecated-setup-py
Aug 10, 2026
Merged

fixes #326; build with python -m build instead of deprecated python setup.py sdist bdist_wheel#346
dave-doty merged 1 commit into
devfrom
326-use-python-m-build-instead-of-deprecated-setup-py

Conversation

@dave-doty

Copy link
Copy Markdown
Member

Fixes #326.

check_pypi_packaging.yml built the package by invoking setup.py directly, which is deprecated. It works today, but on setuptools' schedule rather than ours: whenever the setup.py command interface is finally removed, the job starts failing.

python -m build is the standard PEP 517 front end and produces the same sdist and wheel in an isolated build environment. It is also what release.yml — the workflow that actually publishes to PyPI — already uses, so this makes the workflow that checks packaging build the same way as the one that performs it.

-          pip install setuptools wheel
+          pip install build
       - name: Build
-        run: python setup.py sdist bdist_wheel
+        run: python -m build

Verification

Ran python -m build in a clean virtualenv against the current setup.py: produces scadnano-0.21.1.tar.gz and scadnano-0.21.1-py3-none-any.whl, with the wheel containing __init__.py, scadnano.py, modifications.py and origami_rectangle.py.

Relationship to #344

#344 deletes setup.py entirely, so it must make this same change — this two-line diff is contained in that PR as well. Both branches change the same two lines to the same content, so they merge cleanly in either order, and merging #344 alone would also close #326.

This is here as the small, independently reviewable piece; take whichever path you prefer.

🤖 Generated with Claude Code

…n setup.py sdist bdist_wheel`

Invoking setup.py directly is deprecated, so this job was on a clock: whenever
setuptools removes the setup.py command interface, it starts failing on
setuptools' schedule rather than ours.

`python -m build` is the standard PEP 517 front end and produces the same sdist
and wheel in an isolated build environment. It is also what release.yml, the
workflow that actually publishes to PyPI, already uses; having the workflow
meant to *check* packaging build differently from the one that performs it
somewhat defeated the point of the check.

Verified locally in a clean virtualenv: `python -m build` against the current
setup.py produces scadnano-0.21.1.tar.gz and scadnano-0.21.1-py3-none-any.whl,
with the wheel containing __init__.py, scadnano.py, modifications.py and
origami_rectangle.py.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dave-doty
dave-doty merged commit 600771f into dev Aug 10, 2026
8 checks passed
@dave-doty
dave-doty deleted the 326-use-python-m-build-instead-of-deprecated-setup-py branch August 10, 2026 17:06
dave-doty added a commit that referenced this pull request Aug 10, 2026
…ject-toml

#346 landed the same switch to `python -m build` in check_pypi_packaging.yml that
this branch already contained. Those two lines merged cleanly; the conflict was
only that this branch appends the wheel smoke-test step immediately after them,
so the hunks overlapped. Resolved in favour of this branch, whose version of the
file is a superset: identical build step, plus the smoke test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant