Skip to content

Remove an inactive check for source distribution builds#222

Merged
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:rm-sdist-build-check
Apr 7, 2026
Merged

Remove an inactive check for source distribution builds#222
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:rm-sdist-build-check

Conversation

@eerovaher
Copy link
Copy Markdown
Contributor

setup.py is meant to raise a RuntimeError if a pyerfa source distribution is being built and liberfa config.h is not present and cannot be created, but the check

"sdist" in sys.argv

is for the deprecated

python setup.py sdist

command. The modern command for building only a source distribution is

python -m build --sdist

which would allow checking for

"--sdist" in sys.argv

but a source distribution can also built together with a wheel by the

python -m build

command, and checking for

"build" in sys.argv

would also detect

python -m build --wheel

which has nothing to do with source distributions. Given that nobody has noticed the check in question becoming inactive it should be safe to remove entirely.

`setup.py` was meant to raise a `RuntimeError` if a `pyerfa` source
distribution was being built and `liberfa` `config.h` was not present
and could not be created, but the check `"sdist" in sys.argv` was for
the deprecated `python setup.py sdist` command. The modern command for
building only a source distribution is `python -m build --sdist`, which
would allow checking for `"--sdist" in sys.argv`, but a source
distribution can also built together with a wheel by the
`python -m build` command, and checking for `"build" in sys.argv` would
also detect `python -m build --wheel`, which has nothing to do with
source distributions. Given that nobody has noticed the check in
question becoming inactive it should be safe to remove entirely.
@avalentino avalentino merged commit 4633fb9 into liberfa:main Apr 7, 2026
28 checks passed
@eerovaher eerovaher deleted the rm-sdist-build-check branch April 7, 2026 10:12
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.

2 participants