Bug #819
Copy pasting third_party means Python can't use site-packages
Added by Tunnell, Christopher almost 12 years ago.
Updated over 11 years ago.
Start date:
13 December 2011
Description
To repeat, copy over third_party. Then easy_install magickwand. Then try to import magickwand.
Notice that:
from distutils.sysconfig import get_python_lib
print get_python_lib()
gives the wrong directory.
Better way - use Adam Dobb's external third party support...
So doing a bit of digging
scons hard codes the python installation into its driver script - so third_party/bin/scons looks like
#!/home/rogers/maus/third_party/install/bin/python2.7
# EASY-INSTALL-SCRIPT: 'scons==2.1.0.alpha.20110323','scons'
__requires__ = 'scons==2.1.0.alpha.20110323'
import pkg_resources
pkg_resources.run_script('scons==2.1.0.alpha.20110323', 'scons')
swig binary file hard codes the location of the sources like std_string.i into the SWIG binary file so this really needs to be rebuilt
Still digging...
Same problem with nosetests i.e. easy_install hard codes path into the nosetests script
test script returns errors that can't find mongodb or couchdb library plus some style guide errors that might be correct - I was using my development copy for testing
integration tests report no errors
- Assignee changed from Tunnell, Christopher to Rogers, Chris
I checked out a clean copy of the code and redid the build; then copied this to a new location and moved away the original copy.
Then copying from one place to another without trying to build goes like:
./configure
edit third_party/bin/nosetests to use python from environment
In fact, anything that is placed in the bin directory by easy_install needs to have it's python version changed. Still have to rerun swig, but this is probably only true in the case that we want the compile to work (and in fact, scons is only necessary for the build step).
Probably there is a way to tell easy_install to reinstall using local egg files... in which case it should fix the python location problem.
Even better - I enforce python version by calling nosetests directly in the test scripts. A more thorough solution would be to reinstall all of the stuff from easy_install.
- Status changed from Open to Closed
- % Done changed from 0 to 100
- Target version changed from Future MAUS release to MAUS-v0.2.3
Also available in: Atom
PDF