Repository navigation
Conversation
data_files places README.md, CHANGES.md and LICENSE in get_python_lib(), which is evaluated when the package is built. When a wheel is built in an isolated environment, that is the temporary build environment's site-packages, so the wheel stores the files under its absolute path (for example tmp/build-env-XXXXXXXX/lib/python3.12/ site-packages/README.md) and installs them under site-packages/tmp/. Skip data_files when building a wheel. The wheel still carries LICENSE in its .dist-info, and setup.py install is unchanged. Signed-off-by: Robert Cope <robert@copesystems.com>
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.
data_filesplaces README.md, CHANGES.md and LICENSE inget_python_lib(), which is evaluated at build time. When a wheel is built in an isolated environment, the files end up in the wheel under the build environment's absolute path, andpip installputs them undersite-packages/tmp/....This change skips
data_fileswhen building a wheel (bdist_wheel). Everything else is unchanged:LICENSEin its.dist-infometadata (ibm_db-*.dist-info/licenses/with current setuptools).python setup.py installstill copies the three files to site-packages, as added in New test cases and copying README, LICENSE and CHANGES to ibm_db install location #384.Closes #1090
Verification (Linux x86_64, Python 3.13), wheels built with
pip wheel .andpython -m build:Before:
After: