Project

General

Profile

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.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Build System
Target version:
Start date:
13 December 2011
Due date:
% Done:

100%

Estimated time:
Workflow:
Closed

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.

#1

Updated by Rogers, Chris almost 12 years ago

Better way - use Adam Dobb's external third party support...

#2

Updated by Tunnell, Christopher almost 12 years ago

it in the trunk?

#3

Updated by Rogers, Chris over 11 years ago

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...

#4

Updated by Rogers, Chris over 11 years ago

Same problem with nosetests i.e. easy_install hard codes path into the nosetests script

#5

Updated by Rogers, Chris over 11 years ago

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

#6

Updated by Rogers, Chris over 11 years ago

integration tests report no errors

#7

Updated by Rogers, Chris over 11 years ago

  • Assignee changed from Tunnell, Christopher to Rogers, Chris
#8

Updated by Rogers, Chris over 11 years ago

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.

#9

Updated by Rogers, Chris over 11 years ago

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.

#10

Updated by Rogers, Chris over 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
#11

Updated by Rogers, Chris over 11 years ago

  • Target version changed from Future MAUS release to MAUS-v0.2.3

Also available in: Atom PDF