AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
951 stars 340 forks source link

add 'path clean' feature #126

Open nerdvegas opened 9 years ago

nerdvegas commented 9 years ago

Add configurable list of environment variables that rez should 'clean' when a context is created. Cleaning involves removing duplicate paths (retaining first appeared path), and removing empty paths.

mstreatfield commented 9 years ago

I have some code which could be adapted to do this - we already go one further and actually flatten the path completely.

We ran into issues were our LD_LIBRARY_PATH is over 4096 which causes a hard crash in Maya. Now we 'flatten' configured variables into a temporary folder, reducing the variable to one item. It improves performance of the underlying applications (particularly Python as filesystem stats are greatly reduced ~50%) and inherently removes duplicates and empty paths.

It could easily be adapted to either flatten or just clean.