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

Ensure local_sdist recipes use a valid URI for the source URL #578

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

dihm
Copy link
Contributor

@dihm dihm commented Nov 12, 2024

Description

Fixes #448

Hard-coded URI conversion in the pypi strategy is not valid for local sdist recipes on windows.
This uses Path().as_uri() to convert the provided path to the sdist tarball into the proper, machine-dependent URI.

@dihm dihm requested a review from a team as a code owner November 12, 2024 21:47
@@ -794,7 +794,7 @@ def get_sdist_metadata(
metadata["source"] = {"url": sdist_url, "sha256": sha256_checksum(path_pkg)}
if config.from_local_sdist:
metadata["source"] = {
"url": f"file://{path_pkg}",
"url": Path(path_pkg).as_uri(),
Copy link
Member

Choose a reason for hiding this comment

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

that is indeed better, thank you!

@marcelotrevisani marcelotrevisani merged commit e1292cb into conda:main Nov 13, 2024
7 of 8 checks passed
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.

[BUG] File URL on Windows
2 participants