Skip to content

fix: export editable local dependencies with relative paths - #3853

Closed
tunglambk wants to merge 5 commits into
pdm-project:mainfrom
tunglambk:fix/export-editable-relative-path
Closed

fix: export editable local dependencies with relative paths#3853
tunglambk wants to merge 5 commits into
pdm-project:mainfrom
tunglambk:fix/export-editable-relative-path

Conversation

@tunglambk

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

Fixes #3294.

Editable local dependencies are now exported using their relative project path instead of expanding file:///${PROJECT_ROOT} into an absolute file:// URL. This keeps generated requirements files portable across machines and checkout locations.

The change is limited to editable FileRequirement entries that have a local path. VCS, remote URLs, and non-editable requirements keep their existing formatting.

A regression test covers a monorepo-style ./packages/pkg-core editable dependency and verifies that the exported line stays relative.

Verification

  • Regression test added for the reported case.
  • Local test execution was not available in the current environment; CI is expected to validate the full suite.

@frostming frostming left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI is failing

@tunglambk tunglambk closed this Aug 20, 2026
@tunglambk

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I checked the CI failure and confirmed it comes from the regression test I added (Namespace(..., self=False, ...), which conflicts with Namespace.__init__). I’m going to close this PR for now rather than leave it in a broken state. Sorry for the noise, and thanks for taking the time to review it.

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.

Export editable subpackage to requirements.txt with relative path instead of full file url

2 participants