I'm running Mac OSX 10.7.5 with Pythons 2.5-2.7 installed. One of the dependencies of my app is newrelic 1.9.0.13 (which is located here). When I bootstrap and build for Python 2.6 or 2.7, everything works flawlessly; but not when I specify 2.5:
[buildout]
...
python = python
[python]
executable = /usr/bin/python2.5
With this configuration, running buildout fails with the following error:
Installing newrelic.
Getting distribution for 'newrelic==1.9.0.13'.
newrelic/lib/simplejson/_speedups.c: In function ‘encoder_listencode_obj’:
newrelic/lib/simplejson/_speedups.c:2263: warning: comparison of distinct pointer types lacks a cast
newrelic/lib/simplejson/_speedups.c:2263: warning: passing argument 2 of ‘PyType_IsSubtype’ from incompatible pointer type
zip_safe flag not set; analyzing archive contents...
newrelic.admin: module references __file__
newrelic.console: module references __file__
newrelic.bootstrap.sitecustomize: module references __file__
newrelic.core.environment: module references __file__
newrelic.core.thread_profiler: module references __file__
newrelic.lib.__init__: module references __path__
While:
Installing newrelic.
Getting distribution for 'newrelic==1.9.0.13'.
Error: Couldn't install: newrelic 1.9.0.13
easy_installing the tarball directly produces the same message, however the install succeeds. This is not specific to the newrelic package; if I remove that dependency, the same thing happens for PIL (again, only when using Python 2.5).
If I use distribute instead, I get a different error when running buildout:
Traceback (most recent call last):
File "./bin/buildout", line 17, in <module>
import zc.buildout.buildout
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py", line 40, in <module>
import zc.buildout.download
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/download.py", line 20, in <module>
from zc.buildout.easy_install import realpath
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/easy_install.py", line 75, in <module>
pkg_resources.Requirement.parse('setuptools')
AttributeError: 'NoneType' object has no attribute 'location'
(I'm not sure whether this is related; I include it in case it may be.)
Why is the package failing to install and how can I fix it?
A couple notes:
- The error occurs whether I include the package using a recipe (zc.recipe.egg) or list it in the
install_requires
list of my setup.py - The package is successfully downloaded; the error happens during installation.
- The same config works without changes in Python 2.6 and 2.7
Thanks!