Comment 15 for bug 409269

Revision history for this message
Alexis Roche (alexis-roche) wrote : Re: [Bug 409269] [NEW] setup fails on mingw32

Well, my fix was working (probably because it had no effect beside
bypassing the bug). But, you're right, it was rubbish. I just
substituted with yours.

You mean:

if 'libraries' in info

rather than:

if libraries in info

Don't you?

Alexis

On Thu, Aug 6, 2009 at 2:53 AM, Matthew Brett<email address hidden> wrote:
> Hi,
>
> On Wed, Aug 5, 2009 at 5:03 PM, Alexis Roche<email address hidden> wrote:
>> The problem appears as of revision 1768. Revision 1767 is the last one
>> to build with my old site.cfg file.
>>
>> Revision 1768 affected several setup files including setup.py and
>> nipy/setup.py. Any ideas? I'll have a look tomorrow.
>
> Does your committed fix work?  It looks like it should result in ['g',
> '2', 'c'] for a string 'g2c'.
>
> Do you mean:
>
> if libraries in info and isinstance(info['libraries'], basestring):
>    info['libraries'] = [info['libraries']]
>
> See you,
>
> Matthew
>
> --
> setup fails on mingw32
> https://bugs.launchpad.net/bugs/409269
> You received this bug notification because you are a member of nipy-
> developers, which is the registrant for NIPY.
>
> Status in Neuroimaging in Python: New
>
> Bug description:
> Since my last pull (revision 1772), "python setup.py config" fails on my mingw32 system with an AttributeError: 'str' object has no attribute 'extend' (see Traceback below). This seems to result from a modification in a recent revision because revision 1770 was building fine with the same configuration, specifically:
> - MinGW 5.1.4
> - Python 2.5
> - Numpy 3.0
> - Scipy 0.7.1
>
> Note that the same error occurs when substituting stable numpy and scipy releases with the latest development versions (numpy 1.4.0 dev 7282 and scipy 0.8.0 dev 5891).
>
>
>  Traceback (most recent call last):
>  File "setup.py", line 107, in <module>
>    main(**extra_setuptools_args)
>  File "setup.py", line 103, in main
>    **extra_args)
>  File "c:\Python25\Lib\site-packages\numpy\distutils\core.py", line 152, in setup
>    config = configuration()
>  File "setup.py", line 22, in configuration
>    config.add_subpackage('nipy', 'nipy')
>  File "c:\Python25\Lib\site-packages\numpy\distutils\misc_util.py", line 890, in add_subpackage
>    caller_level = 2)
>  File "c:\Python25\Lib\site-packages\numpy\distutils\misc_util.py", line 859, in get_subpackage
>    caller_level = caller_level + 1)
>  File "c:\Python25\Lib\site-packages\numpy\distutils\misc_util.py", line 796, in _get_configuration_from_setup_py
>    config = setup_module.configuration(*args)
>  File "nipy\setup.py", line 61, in configuration
>    nipy_info().set_info(**get_nipy_info())
>  File "c:\Python25\Lib\site-packages\numpy\distutils\system_info.py", line 433, in set_info
>    dict_append(info,**lib_info)
>  File "c:\Python25\Lib\site-packages\numpy\distutils\system_info.py", line 1945, in dict_append
>    d[k].extend(v)
> AttributeError: 'str' object has no attribute 'extend'
>

--
Alexis Roche, PhD
Researcher, CEA, Neurospin, Paris, France
Academic Guest, ETHZ, Computer Vision Lab, Zurich, Switzerland
http://alexis.roche.googlepages.com