I am trying to build the cvs weave on my machine, but get the following error: root@markov:/usr/src/weave# python setup.py build dep: ['scipy_distutils', 'scipy_test', 'scipy_base'] Traceback (most recent call last): File "setup.py", line 44, in ? stand_alone_package(with_dependencies) File "setup.py", line 23, in stand_alone_package config_dict = package_config(primary,dependencies) File "/usr/lib/python2.2/site-packages/scipy_distutils/misc_util.py", line 269, in package_config config.extend([get_package_config(x) for x in dependencies]) File "/usr/lib/python2.2/site-packages/scipy_distutils/misc_util.py", line 255, in get_package_config mod = __import__('setup_'+package_name) ImportError: No module named setup_scipy_distutils However, looking in /usr/lib/python2.2/site-packages/scipy_distutils I see that setup_scipy_distutils.py is there. How can it see misc_util.py, and not setup_scipy_distutils.py when they are in the same directory? Thanks, Chris Fonnesbeck -- Christopher J. Fonnesbeck GA Coop. Fish & Wildlife Research Unit chris at fonnesbeck.org University of Georgia
On 27 Nov 2002, Christopher Fonnesbeck wrote:
I am trying to build the cvs weave on my machine, but get the following error:
root@markov:/usr/src/weave# python setup.py build dep: ['scipy_distutils', 'scipy_test', 'scipy_base'] Traceback (most recent call last): File "setup.py", line 44, in ? stand_alone_package(with_dependencies) File "setup.py", line 23, in stand_alone_package config_dict = package_config(primary,dependencies) File "/usr/lib/python2.2/site-packages/scipy_distutils/misc_util.py", line 269, in package_config config.extend([get_package_config(x) for x in dependencies]) File "/usr/lib/python2.2/site-packages/scipy_distutils/misc_util.py", line 255, in get_package_config mod = __import__('setup_'+package_name) ImportError: No module named setup_scipy_distutils
However, looking in /usr/lib/python2.2/site-packages/scipy_distutils I see that setup_scipy_distutils.py is there. How can it see misc_util.py, and not setup_scipy_distutils.py when they are in the same directory?
get_package_config looks for setup_scipy_distutils module in ../scipy_distutils, in your case in /usr/src/scipy_distutils. It seems that /usr/src/scipy_distutils does not exist. Since you have scipy_distutils already installed, you can either use python setup_weave.py build or python setup.py build --without-dependencies Eric: Have you already thought about removing setup.py in favor of setup_weave.py? When distributing f2py or weave or chaco separately, they tend to have very similar issues with respect to depending on scipy_distutils, scipy_tests, etc. Recent f2py from its CVS has a possible solution for solving such dependency issues. Basically, when I create a f2py tar-ball, its dependencies, currently scipy_distutils only, are downloaded to the f2py2e directory other/ (in your case, since weave lives in scipy CVS, you can just copy it from the parent directory, of course). And when users install f2py, its setup script checks what is the existing version of scipy_distutils. If it is too 'old' or does not exist, then other/scipy_distutils/ will be installed. Otherwise, just the f2py2e package is installed. It seems that weave could also use a similar approach. If you have better ideas, let me know, I'll try them out. Pearu
participants (2)
-
Christopher Fonnesbeck -
Pearu Peterson