From 99786e67049c47857b84b745499798d14240dda9 Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Sat, 13 Mar 2021 15:27:50 +0100 Subject: [PATCH] Use portable file URLs when installing the root package (#299) 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. --- src/nox_poetry/sessions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nox_poetry/sessions.py b/src/nox_poetry/sessions.py index 545b6d56..d137bf2a 100644 --- a/src/nox_poetry/sessions.py +++ b/src/nox_poetry/sessions.py @@ -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}"