[Distutils] distribute doesn't use pip?

Robert Kern robert.kern at gmail.com
Sat Jan 30 00:27:37 CET 2010


On 2010-01-29 17:08 PM, Tom Davis wrote:
> Tested; failed with the following:
>
>        File
>     "/tmp/easy_install-cmuJYo/numpy/numpy/distutils/command/build_src.py",
>     line 385, in generate_sources
>        File "/deploy/repo/setup.py", line 390, in generate_config_h
>        File "/deploy/repo/setup.py", line 41, in check_types
>        File "/deploy/repo/setup.py", line 255, in check_types
>     SystemError: Cannot compiler 'Python.h'. Perhaps you need to install
>     python-dev|python-devel.

> I'm not sure if the former is an issue with numpy or something else
> (issue with Python.h). Although i am positive my dev headers are
> installed (and numpy still installs fine with pip), I don't know if
> distutils is having trouble finding them for some unrelated-to-numpy
> reason. I can't think of another package offhand that requires the
> headers or I'd test that theory.

Try this patch to see some more output about the failed compile. It will be the 
second piece of code dumped. You should see something like the following:


Generating build/src.macosx-10.3-i386-2.5/numpy/core/include/numpy/config.h
compiling '_configtest.c':
#include <Python.h>

/* we need a dummy line to make distutils happy */
C compiler: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic -DNDEBUG -g -O3

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core 
-Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath 
-Inumpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c'
gcc: _configtest.c
success!


Please verify that Python.h exists in one of the -I locations. It is possible 
that we are passing something weird.


Index: numpy/distutils/misc_util.py
===================================================================
--- numpy/distutils/misc_util.py        (revision 8081)
+++ numpy/distutils/misc_util.py        (working copy)
@@ -1733,8 +1733,8 @@
          """
          cmd = get_cmd('config')
          cmd.ensure_finalized()
-        cmd.dump_source = 0
-        cmd.noisy = 0
+        cmd.dump_source = 1
+        cmd.noisy = 1
          old_path = os.environ.get('PATH')
          if old_path:
              path = os.pathsep.join(['.',old_path])

You may want to join us over numpy-discussion until we identify real issues with 
Distribute or pip.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the Distutils-SIG mailing list