Skip to content

Commit

Permalink
Add missing as_posix() calls
Browse files Browse the repository at this point in the history
As PR python-poetry#2398 changed package.root_dir from str to Path, we need to call
as_posix() to it convert to str before passing to os.path.join.
  • Loading branch information
msakai committed Jun 19, 2020
1 parent 65e5068 commit e354791
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions poetry/installation/pip_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def requirement(self, package, formatted=False):

if package.source_type in ["file", "directory"]:
if package.root_dir:
req = os.path.join(package.root_dir, package.source_url)
req = os.path.join(package.root_dir.as_posix(), package.source_url)
else:
req = os.path.realpath(package.source_url)

Expand Down Expand Up @@ -184,7 +184,7 @@ def install_directory(self, package):
from poetry.utils.toml_file import TomlFile

if package.root_dir:
req = os.path.join(package.root_dir, package.source_url)
req = os.path.join(package.root_dir.as_posix(), package.source_url)
else:
req = os.path.realpath(package.source_url)

Expand Down

0 comments on commit e354791

Please sign in to comment.