Skip to content

Commit b4b685e

Browse files
Fix install script
Signed-off-by: Jean-Christophe Morin <[email protected]>
1 parent 68b546e commit b4b685e

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

.github/workflows/installation.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
- os: ubuntu-latest
4949
method: pip
50-
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin PYTHONPATH=${PYTHONPATH}:/opt/rez'
50+
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin/rez PYTHONPATH=${PYTHONPATH}:/opt/rez'
5151
REZ_INSTALL_COMMAND: |
5252
set -ex
5353
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
@@ -74,7 +74,7 @@ jobs:
7474
python ./install.py ~/rez
7575
- os: macos-latest
7676
method: pip
77-
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin" PYTHONPATH=$PYTHONPATH:$HOME/rez'
77+
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin/rez" PYTHONPATH=$PYTHONPATH:$HOME/rez'
7878
REZ_INSTALL_COMMAND: |
7979
set -ex
8080
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
@@ -94,7 +94,7 @@ jobs:
9494
python ./install.py C:\ProgramData\rez
9595
- os: windows-2019
9696
method: pip
97-
REZ_SET_PATH_COMMAND: '[System.Environment]::SetEnvironmentVariable("PATH","$env:PATH;C:\ProgramData\rez\bin"); $env:PYTHONPATH="$env:PYTHONPATH;C:\ProgramData\rez"'
97+
REZ_SET_PATH_COMMAND: '[System.Environment]::SetEnvironmentVariable("PATH","$env:PATH;C:\ProgramData\rez\bin\rez"); $env:PYTHONPATH="$env:PYTHONPATH;C:\ProgramData\rez"'
9898
REZ_INSTALL_COMMAND: |
9999
if ($env:MATRIX_PYTHON_VERSION -eq "2.7") {
100100
& 'C:\Miniconda\shell\condabin\conda-hook.ps1'

install.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,23 +156,23 @@ def install(dest_dir, print_welcome=False):
156156
install_rez_from_source(dest_dir)
157157

158158
# patch the rez binaries
159-
patch_rez_binaries(dest_dir)
159+
# patch_rez_binaries(dest_dir)
160160

161161
# copy completion scripts into virtualenv
162162
completion_path = copy_completion_scripts(dest_dir)
163163

164164
# mark virtualenv as production rez install. Do not remove - rez uses this!
165165
virtualenv_bin_dir = get_virtualenv_bin_dir(dest_dir)
166166
dest_bin_dir = os.path.join(virtualenv_bin_dir, "rez")
167-
validation_file = os.path.join(dest_bin_dir, ".rez_production_install")
168-
with open(validation_file, 'w') as f:
169-
f.write(_rez_version)
167+
# validation_file = os.path.join(dest_bin_dir, ".rez_production_install")
168+
# with open(validation_file, 'w') as f:
169+
# f.write(_rez_version)
170170

171171
# done
172172
if print_welcome:
173173
print()
174174
print("SUCCESS!")
175-
rez_exe = os.path.realpath(os.path.join(dest_bin_dir, "rez"))
175+
rez_exe = os.path.realpath(os.path.join(dest_bin_dir))
176176
print("Rez executable installed to: %s" % rez_exe)
177177

178178
try:

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def find_files(pattern, path=None, root="rez"):
6666
# Note that this is not done on Windows because the Windows launcher
6767
# already does this.
6868
if not sys.flags.ignore_environment and platform.system() != 'Windows':
69-
args = sys.orig_argv[:]
70-
args[0] = sys.executable
71-
args.insert(1, '-E')
69+
args = [sys.executable, '-E'] + sys.argv
7270
if os.getenv('REZ_LAUNCHER_DEBUG'):
7371
print('Launching:', ' '.join(args))
7472
os.execvp(sys.executable, args)
@@ -120,7 +118,7 @@ def run(self):
120118

121119
prod_install_path = os.path.join(tmpdir, ".rez_production_install")
122120
with open(prod_install_path, "w") as fd:
123-
fd.write("# Production install installed with pip")
121+
fd.write(_rez_version)
124122

125123
scripts.append(prod_install_path)
126124

src/rez/cli/_entry_points.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def check_production_install():
6565
@register("jctest")
6666
def run_jctest():
6767
print("argv:", sys.argv)
68-
print("orig_argv", sys.orig_argv)
6968
print("executable:", sys.executable)
7069
print("sys.flags:", sys.flags)
7170
return 0

0 commit comments

Comments
 (0)