New issue 265: Pass through LD_LIBRARY_PATH environment variable by default
https://bitbucket.org/hpk42/tox/issues/265/pass-through-ld_library_path-environment

David Riddle:

I develop on RHEL6 using Python 2.7.8. I am having trouble using tox. When I run

$ tox -e py27

I receive the following error message:

sqlparse-0.1.14/.tox/py27/bin/python2: error while loading shared libraries: 
libpython2.7.so.1.0: cannot open shared object file: No such file or directory

The reason for this error is because the environment variable LD_LIBRARY_PATH 
is not being passed. I can work around this by passing it in tox.ini which does 
work. The reason I bring this up is that this variable is of fundamental 
importance to how RedHat Software Collections work and I think this variable 
should be passed by default on Unix systems. In the next paragraph I will 
briefly describe what Software Collections are and how they work.

RedHat installs alternative versions of Python, distinct from the system 
version, in what they call [Software 
Collections](https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/2/html/Software_Collections_Guide/index.html)
 (SCLs). These software collections are separate self-contained trees of 
software that are installed in /opt. There are SCLs for Python27, Python33, and 
Python34. The default python interpreter for RHEL6 is Python26. These 
alternative interpreters can be enabled by the user either individually or 
collectively using a command line script called scl. This script works simply 
by setting the users PATH and LD_LIBRARY_PATH, among other environment 
variables.

When tox -e py27 runs it will find the python27 interpreter on the PATH but the 
interpreter will fail because it can not find its necessary libraries because 
LD_LIBRARY_PATH is not being properly set by tox. If this environment variable 
is not set any software on the PATH that is in an SCL will fail if it has a 
library dependency installed in an SCL. I would recommend that you add 
LD_LIBRARY_PATH as a default environment variable to be passed by tox. You may 
also want to consider the following which are also set by SCLs:

MANPATH, PKG_CONFIG_PATH, XDG_DATA_DIRS


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to