sitetools - WesternX’s Python Setup¶
Tools for setting up WesternX’s Python execution environment at runtime. Generally useful for extending one Python prefix (or virtualenv) with another.
sitetools._startup is imported (by
sitecustomize in our environment),
this will take a few automatic actions:
- The standard library logging will be setup.
- All directories and virtualenvs listed within
KS_SITESwill be added to
sys.path, in a similar manner as site-packages (via
sitetools.sites.add_site_dir()), but extended to support multi-platform builts and self-describing tools.
- Variables previously frozen via
sitetools.environ.freeze()will be restored.
os.chflags()to not error on our NFS (by ignoring the error) for Python2.6.
Be extremely careful while modifying this package and test it very thoroughly, since being able to locate any other packages is dependent on it running successfully.
Additionally, there are a set of scripts to assist in local development.
- Development Scripts
- Pseudo Site-Packages
- Environment Variables
- How to Find the