-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rez pip_install_remaps need to escape sep #1409
Comments
Thanks for the report. As a side note: I am not a fan of how |
Sorry if that seemed like rambling, I was trying to type it all up before the end of the work day. I agree, it's a bit confusing and (in this case) specific to one problematic package. In this case, it's docs examples, which is great, but unnecessary. Unfortunately there was no way to disable or skip that step, so I had to use the remap feature. Again, it worked fine on linux, just not windows because of the backslashes. Instead of adding package-specific logic to global configs, I think the option to ignore those errors would suffice for most things. Aside from the built-in bin relocation, most of the troublesome packages include docs that aren't 100% necessary. So being able to tell rez to skip that part would be fine for me. Of course this would need to be addressed per package, since the user will need to determine if the extra files are needed or not. |
Ah no problem. I just wanted to double down and state that i am generally not a fan :) |
This ticket was mentioned in the TSC meeting and I also expressed that Also, as a side note, I think that generally speaking, packages that install stuff outside the |
I agree 100%. |
+1 as something I'm still coming across. On Windows Rez breaks with issues with escaped characters. Also, +1 to the concept of seeing what exactly is causing the remapping to be necessary, and for an option to skip it if it's not important. |
This will be gone in the new rez-pip. |
The pip_install_remaps feature works great for things on linux, but I'm running into an issue on windows that seems to be due to the backslash directory separator. When you rez-pip install networkx, it comes with a bunch of docs and examples. I've remapped them to copy to a "docs" directory next to the "python" directory. However, this doesn't work on windows due to os.sep being confused for a matching group in regex.
Environment
To Reproduce
rez-pip -i networkx
Expected behavior
networkx should install and the docs should be remapped
Actual behavior
An error occurs during the install process.
In rez/pip.py above line 515, I added extra logging to see what
path
,remap['pip_install']
, andrel_src
are:Notice on the 2nd line, the backslashes are not escaped, so regex thinks that
\d
is a matching group.As a test, I opened up rez/config.py and changed line 143 to:
That way the pip_install and rez_install values in the pip_install_remaps have their os.sep escaped and the remap works.
The text was updated successfully, but these errors were encountered: