We provide a Python 27 version with some preinstalled packages with the rest of our application to the users by putting everything on a shared drive. We work in Windows environment.
We’d like another team to maintain a set of extra packages that can be added to our Python distribution without modifying it every time they add or remove a package or if they want to try a different set of packages they maintain. We also want the users to be able to easily use these additional set of packages with any other Python installation they might have installed on their computers locally.
I was thinking about it as an extra site-packages dir. Is there a way to point Python to an additional site-packages directory (without disabling the one in Python itself) location without modifying Python libs, like site.py so it works with any Python version? I’d like Python to look for the path configuration files (.pth) there to further extend sys.path.
I don’t want to add additional .pth files to site-packages under Python, because I’d like to extend Python with the additional set of packages without changing anything in the Python installation itself, so that different users of our shared Python could use different sets of extra packages.
Using PYTHONPATH is not ideal because Python doesn't look for the path configuration files (.pth) there, so you can't just point to a single location that would expand itself to the additional paths.
Just wanted to add that we work in a restricted environment where people can’t use pip to install external packages form the Internet.
A way for Python >= 2.7 would be ideal.