Commit 994505df by Sébastien Eustace

Update get-poetry.py script

parent 8e3692cd
...@@ -231,6 +231,7 @@ class Installer: ...@@ -231,6 +231,7 @@ class Installer:
# Homebrew Python and possible other installations # Homebrew Python and possible other installations
# We workaround this issue by temporarily changing # We workaround this issue by temporarily changing
# the --user directory # the --user directory
original_user = os.getenv("PYTHONUSERBASE")
os.environ["PYTHONUSERBASE"] = dir os.environ["PYTHONUSERBASE"] = dir
self.call( self.call(
self.CURRENT_PYTHON, self.CURRENT_PYTHON,
...@@ -242,6 +243,11 @@ class Installer: ...@@ -242,6 +243,11 @@ class Installer:
"--ignore-installed", "--ignore-installed",
) )
if original_user is not None:
os.environ["PYTHONUSERBASE"] = original_user
else:
del os.environ["PYTHONUSERBASE"]
# Finding site-package directory # Finding site-package directory
lib = os.path.join(dir, "lib") lib = os.path.join(dir, "lib")
lib_python = list(glob(os.path.join(lib, "python*")))[0] lib_python = list(glob(os.path.join(lib, "python*")))[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment