From 3b057c3b625786f6c027103179cf3a7e1c9efe9c Mon Sep 17 00:00:00 2001 From: David Lai Date: Fri, 22 Jan 2021 16:22:00 +0800 Subject: [PATCH 1/2] fix py executable path --- install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.py b/install.py index 83cb13723..9c507f2e0 100644 --- a/install.py +++ b/install.py @@ -219,13 +219,14 @@ def install_as_rez_package(repo_path): # do a temp production (virtualenv-based) rez install tmpdir = mkdtemp(prefix="rez-install-") install(tmpdir) + _, py_executable = get_virtualenv_py_executable(tmpdir) try: # This extracts a rez package from the installation. See # rez.utils.installer.install_as_rez_package for more details. # args = ( - os.path.join(tmpdir, "bin", "python"), "-E", "-c", + py_executable, "-E", "-c", r"from rez.utils.installer import install_as_rez_package;" r"install_as_rez_package('%s')" % repo_path ) From 1fe3d372ed4e5103aca68534e9049d1a43fc9e8c Mon Sep 17 00:00:00 2001 From: David Lai Date: Fri, 22 Jan 2021 16:23:29 +0800 Subject: [PATCH 2/2] format path string with repr() --- install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.py b/install.py index 9c507f2e0..5a3a63dc5 100644 --- a/install.py +++ b/install.py @@ -228,7 +228,7 @@ def install_as_rez_package(repo_path): args = ( py_executable, "-E", "-c", r"from rez.utils.installer import install_as_rez_package;" - r"install_as_rez_package('%s')" % repo_path + r"install_as_rez_package(%r)" % repo_path ) print(subprocess.check_output(args))