Skip to content

Commit

Permalink
Fix rez.system is_production_rez_install property to handle forward s…
Browse files Browse the repository at this point in the history
…lash 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 )
  • Loading branch information
michalfratczak committed Dec 23, 2024
1 parent cd02348 commit 75f685c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rez/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def rez_bin_path(self):
#
import rez
module_path = rez.__path__[0]
module_path = os.path.normpath(module_path)

parts = module_path.split(os.path.sep)
parts_lower = module_path.lower().split(os.path.sep)
Expand Down

0 comments on commit 75f685c

Please sign in to comment.