Remove an inactive check for source distribution builds#222
Merged
avalentino merged 1 commit intoliberfa:mainfrom Apr 7, 2026
Merged
Remove an inactive check for source distribution builds#222avalentino merged 1 commit intoliberfa:mainfrom
avalentino merged 1 commit intoliberfa:mainfrom
Conversation
`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
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setup.pyis meant to raise aRuntimeErrorif apyerfasource distribution is being built andliberfaconfig.his not present and cannot be created, but the checkis for the deprecated
command. The modern command for building only a source distribution is
which would allow checking for
but a source distribution can also built together with a wheel by the
command, and checking for
would also detect
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.