Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow relative paths and environment variables in all editable representations #1000

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jan 19, 2024

Summary

I don't know if this is actually a good change, but it tries to make the editable install experience more consistent. Specifically, we now support...

# Use a relative path with a `file://` prefix.
# Prior to this PR, we supported `file:../foo`, but not `file://../foo`, which felt inconsistent.
-e file://../foo

# Use environment variables with paths, not just URLs.
# Prior to this PR, we supported `file://${PROJECT_ROOT}/../foo`, but not the below.
-e ${PROJECT_ROOT}/../foo

Importantly, -e file://../foo is actually not supported by pip... -e file:../foo is supported though. We support both, as of this PR. Open to feedback.

@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Jan 19, 2024
Path(String),
Url(VerbatimUrl),
}
pub struct ParsedEditableRequirement(String);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is now just a string.

return Err(RequirementsTxtParserError::UnsupportedUrl(
given.to_string(),
));
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is janky.

@charliermarsh charliermarsh marked this pull request as draft January 19, 2024 04:41
@charliermarsh charliermarsh force-pushed the charlie/verbatim branch 4 times, most recently from 0266bf7 to eafff0b Compare January 19, 2024 04:51
@charliermarsh charliermarsh marked this pull request as ready for review January 19, 2024 04:58
@charliermarsh charliermarsh merged commit 5adb08a into main Jan 19, 2024
3 checks passed
@charliermarsh charliermarsh deleted the charlie/verbatim branch January 19, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants