Skip to content

feat: implement relative path normalization for external files in SdistBuilder - #309

Merged
frostming merged 4 commits into
mainfrom
fix/relative-paths
Jul 27, 2026
Merged

feat: implement relative path normalization for external files in SdistBuilder#309
frostming merged 4 commits into
mainfrom
fix/relative-paths

Conversation

@frostming

Copy link
Copy Markdown
Contributor

Signed-off-by: Frost Ming me@frostming.com

…stBuilder

Signed-off-by: Frost Ming <me@frostming.com>
@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for pdm-backend-docs ready!

Name Link
🔨 Latest commit 68bcf9a
🔍 Latest deploy log https://app.netlify.com/projects/pdm-backend-docs/deploys/6a66a6f4c375ae000800dd77
😎 Deploy Preview https://deploy-preview-309--pdm-backend-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…test_sdist_rewrites_project_files_outside_project_root

Signed-off-by: Frost Ming <me@frostming.com>
Comment thread src/pdm/backend/sdist.py Outdated
self._show_add_file(relpath, path)

pkg_info = str(self.config.validate().as_rfc822()).encode("utf-8")
pkg_info = str(self._metadata.as_rfc822()).encode("utf-8")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really leaving a full code review since you didn't ask, but this change (and setting _metadata from self.config above) doesn't immediately make sense to me, because "metadata" is used elsewhere to refer to just the project table (in Config).

But its a mild naming question, feel free to disregard

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is because the return value of config.validate() is a StandardMetadata, and this property is only for caching and not used elsewhere.

Signed-off-by: Frost Ming <me@frostming.com>
@frostming
frostming merged commit d9fab37 into main Jul 27, 2026
26 checks passed
@frostming
frostming deleted the fix/relative-paths branch July 27, 2026 00:41
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