Skip to content

Commit 75f685c

Browse files
Fix rez.system is_production_rez_install property to handle forward slash paths under windows.
This allows to import rez module from paths with forward slashes. The following code printed "False" before the fix: import sys sys.path.append('C:/rez_test/Lib/site-packages') from rez.system import system print( 'is_production_rez_install', system.is_production_rez_install )
1 parent cd02348 commit 75f685c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rez/system.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def rez_bin_path(self):
207207
#
208208
import rez
209209
module_path = rez.__path__[0]
210+
module_path = os.path.normpath(module_path)
210211

211212
parts = module_path.split(os.path.sep)
212213
parts_lower = module_path.lower().split(os.path.sep)

0 commit comments

Comments
 (0)