Python sync: Fix wheel build failure due to missing README.md #4931
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.
This PR fixes and reverts most changes made in PR #4714.
PR #4714 attempted to add description to pypi by dynamically reading
README.mdfrom the parent directory (./python) at module-level insetup.pysince no README exists directly in theglide-syncpackage directory. However, this approach fails when building from the sdist because:python3 dev.py build --client sync --wheel, the isolated build extracts the sdist to a temp directory whereROOT.parentno longer points to./pythonThis PR fixes it by -
pyproject.toml: Changed fromdynamic = ["version", "readme"]toreadme = "README.md", allowing setuptools to handle README loading at the correct build phasedev.pyto copypython/README.md→python/glide-sync/README.mdbefore building, ensuring the file exists at the expected location (this was added to the pypi-cd workflow already in the previous PR)setup.py: Removed module-levellong_descriptionread since metadata is now properly declared inpyproject.tomlAs can be seen in the pypi-cd run below, the tarball artifact produced includes
README.mdat the package root, and the generatedPKG-INFOmetadata file contains the full README content withDescription-Content-Type: text/markdown, confirming it will be properly displayed as the package description on PyPI.Issue link
This Pull Request is linked to issue: #4932
Checklist
Before submitting the PR make sure the following are checked: