Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/999 on 2009-02-05 by trac user mjwakefield, assigned to @dmcooke.

When NumPy is listed as a dependency for another package automatic installation of NumPy fails.

easy_install numpy works successfully

Best match: numpy 1.2.1

Downloading http://downloads.sourceforge.net/numpy/numpy-1.2.1.tar.gz?modtime=1225265011&big_mirror=0

Processing numpy-1.2.1.tar.gz

Running numpy-1.2.1/setup.py -q bdist_egg --dist-dir /var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/egg-dist-tmp-H5FSHT

Running from numpy source directory.

Warning: distutils distribution has been initialized, it may be too late to add a subpackage command

Warning: distutils distribution has been initialized, it may be too late to add a subpackage fcompiler

non-existing path in '/private/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils': 'site.cfg'

Warning: distutils distribution has been initialized, it may be too late to add a subpackage distutils

Warning: distutils distribution has been initialized, it may be too late to add a subpackage testing

/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py:1343: DeprecationWarning: os.popen4 is deprecated. Use the subprocess module.

sin, sout = os.popen4('svnversion')

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/Current/bin/easy_install", line 8, in

load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup

dist.run_commands()

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands

self.run_command(cmd)

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command

cmd_obj.run()

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 211, in run

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 427, in easy_install

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 478, in install_item

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 519, in process_distribution

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 522, in resolve

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 758, in best_match

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 770, in obtain

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 27, in run_setup

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 63, in run

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 29, in

File "setup.py", line 96, in

File "setup.py", line 89, in setup_package

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/core.py", line 150, in setup

File "setup.py", line 56, in configuration

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 851, in add_subpackage

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 834, in get_subpackage

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 781, in _get_configuration_from_setup_py

File "numpy/setup.py", line 8, in configuration

import os

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 851, in add_subpackage

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 834, in get_subpackage

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 781, in _get_configuration_from_setup_py

File "/private/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/f2py/setup.py", line 81, in configuration

File "/var/folders/Kg/KgodBp6HFYaMgVoWCkGln+++mNU/-Tmp-/easy_install-p3img4/numpy-1.2.1/numpy/distutils/misc_util.py", line 1239, in add_scripts

AttributeError: 'NoneType' object has no attribute 'extend'

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/860 on 2008-07-24 by trac user phsilva, assigned to @dmcooke.

Numpy 1.1.0 works well with easy_install if called from command line, like:

easy_install numpy==1.1.0

BUT, if I declare numpy==1.1.0 as a dependency in my setup.py setup() function, then I got this error (actually I get the same errors with Numpy 1.0.4):

Traceback (most recent call last):

File "setup.py", line 116, in

platforms = chimera_platform)

File "/usr/lib/python2.5/distutils/core.py", line 151, in setup

dist.run_commands()

File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands

self.run_command(cmd)

File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command

cmd_obj.run()

File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/develop.py", line 27, in run

File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/develop.py", line 102, in install_for_development

File "/usr/lib/python2.5/site-packages/easy_install.py", line 519, in process_distribution

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 522, in resolve

dist = best[req.key] = env.best_match(req, self, installer)

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 758, in best_match

return self.obtain(req, installer) # try and download/install

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 770, in obtain

return installer(requirement)

File "/usr/lib/python2.5/site-packages/easy_install.py", line 446, in easy_install

File "/usr/lib/python2.5/site-packages/easy_install.py", line 476, in install_item

File "/usr/lib/python2.5/site-packages/easy_install.py", line 655, in install_eggs

File "/usr/lib/python2.5/site-packages/easy_install.py", line 930, in build_and_install

File "/usr/lib/python2.5/site-packages/easy_install.py", line 919, in run_setup

File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 27, in run_setup

File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 63, in run

File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 29, in

File "setup.py", line 96, in

"numpy == 1.1.0",

File "setup.py", line 89, in setup_package

"Elixir >= 0.5.2",

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/core.py", line 150, in setup

File "setup.py", line 56, in configuration

# setup

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 839, in add_subpackage

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 822, in get_subpackage

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 769, in _get_configuration_from_setup_py

File "/home/henrique/work/chimera/chimera/setup.py", line 9, in configuration

# as published by the Free Software Foundation; either version 2

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 839, in add_subpackage

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 822, in get_subpackage

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 769, in _get_configuration_from_setup_py

File "/home/henrique/work/chimera/chimera/setup.py", line 223, in configuration

File "/tmp/easy_install-kOtWpP/numpy-1.1.0/numpy/distutils/misc_util.py", line 1039, in add_include_dirs

AttributeError: 'NoneType' object has no attribute 'extend'

This seems similar to issue #679. Numpy distutils was expecting something which setuptools distutils (only in dependency mode) overrides and throw away.

Follows a patch/hack against 1.1.0 that worked to me (for 1.0.4 it's just the same hack on different chunck).

What the plan for distutils based installers (like setuptools) when numscons became the default? I'm not going to integrate my package in distribution yet, so I'm using easy_install which seems to be the easiest solution available. Any other idea about how to distribute Numpy? I was thinking about try to create an egg, but then I'll need to have one for each different setup (distro/arch) that I would like to use, right?

Thanks a lot, and congrats for the great work with Numpy!