Skip to content

Commit

Permalink
Fix #1258
Browse files Browse the repository at this point in the history
  • Loading branch information
instinct-vfx committed Mar 24, 2022
1 parent ad12105 commit 4047b9d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
from rez.utils._version import _rez_version # noqa: E402
from rez.utils.which import which # noqa: E402
from rez.utils.platform_ import platform_ # noqa: E402
from rez.cli._entry_points import get_specifications # noqa: E402
from rez.vendor.distlib.scripts import ScriptMaker # noqa: E402

Expand Down Expand Up @@ -84,10 +85,21 @@ def patch_rez_binaries(dest_dir):
specs = get_specifications()

# delete rez bin files written into virtualenv
for name in specs.keys():
filepath = os.path.join(virtualenv_bin_path, name)
if os.path.isfile(filepath):
os.remove(filepath)
if not platform_.os.startswith("windows"):
for name in specs.keys():
filepath = os.path.join(virtualenv_bin_path, name)
if os.path.isfile(filepath):
os.remove(filepath)
else:
for name in specs.keys():
filepaths = [
os.path.join(virtualenv_bin_path, name) + "-script.py",
os.path.join(virtualenv_bin_path, name) + ".exe"
]
if os.path.isfile(filepaths[0]):
os.remove(filepaths[0])
if os.path.isfile(filepaths[1]):
os.remove(filepaths[1])

# write patched bins instead. These go into 'bin/rez' subdirectory, which
# gives us a bin dir containing only rez binaries. This is what we want -
Expand Down

0 comments on commit 4047b9d

Please sign in to comment.