Skip to content

Commit

Permalink
Use portable file URLs when installing the root package (#299)
Browse files Browse the repository at this point in the history
Use Path.as_uri() to construct package URLs in a robust and portable way. The
pathlib implementation deals with a variety of issues on POSIX and especially on
Windows that aren't taken care of using our current method.
  • Loading branch information
cjolowicz authored Mar 13, 2021
1 parent a8a1112 commit 99786e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nox_poetry/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def build_package(
The file URL for the distribution package.
"""
wheel = Path("dist") / self.poetry.build(format=distribution_format)
url = f"file://{wheel.resolve().as_posix()}"
url = wheel.resolve().as_uri()

if DistributionFormat(distribution_format) is DistributionFormat.SDIST:
url += f"#egg={self.poetry.config.name}"
Expand Down

0 comments on commit 99786e6

Please sign in to comment.