
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
setuptools is causing me pain lately. Something's clearly broken, but setuptools is not helping me understand what, or how to fix it.
% /opt/local/bin/python2.5 setup.py develop -d staging running develop running egg_info creating mailman.egg-info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt writing manifest file 'mailman.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mailman.egg-info/SOURCES.txt' running build_ext error: /opt/local/lib/python2.5/site-packages/site.py: No such file or directory
% /opt/local/bin/python2.5 setup.py develop -d staging running develop running egg_info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt Traceback (most recent call last): File "setup.py", line 100, in <module> 'setuptools_bzr', File "/opt/local/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/opt/local/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/opt/local/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ develop.py", line 27, in run self.install_for_development() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ develop.py", line 85, in install_for_development self.run_command('egg_info') File "/opt/local/lib/python2.5/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/opt/local/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ egg_info.py", line 171, in run self.find_sources() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ egg_info.py", line 252, in find_sources mm.run() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ egg_info.py", line 306, in run self.add_defaults() File "/opt/local/lib/python2.5/site-packages/setuptools/command/ egg_info.py", line 333, in add_defaults rcfiles = list(walk_revctrl()) File "/opt/local/lib/python2.5/site-packages/setuptools/command/ sdist.py", line 45, in walk_revctrl for item in ep.load()(dirname): File "/opt/local/lib/python2.5/site-packages/pkg_resources.py", line 1911, in load if require: self.require(env, installer) File "/opt/local/lib/python2.5/site-packages/pkg_resources.py", line 1924, in require working_set.resolve(self.dist.requires(self.extras),env,installer)) File "/opt/local/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: zope.interface
% rm -rf mailman.egg-info % /opt/local/bin/python2.5 setup.py develop -d staging running develop running egg_info creating mailman.egg-info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt writing manifest file 'mailman.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mailman.egg-info/SOURCES.txt' running build_ext error: /opt/local/lib/python2.5/site-packages/site.py: No such file or directory
% rm -rf mailman.egg-info % /usr/local/bin/python2.5 setup.py develop -d staging running develop running egg_info creating mailman.egg-info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt writing manifest file 'mailman.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mailman.egg-info/SOURCES.txt' running build_ext Creating /Users/barry/projects/mailman/rules/staging/site.py Creating /Users/barry/projects/mailman/rules/staging/mailman.egg-link (link to .) Adding mailman 3.0.0a1 to easy-install.pth file Installing bin/disabled script to staging Installing bin/unshunt script to staging Installing bin/set_members script to staging Installing bin/leave script to staging Installing bin/withlist script to staging Installing bin/mailmanctl script to staging Installing bin/cleanarch script to staging Installing bin/owner script to staging Installing bin/config_list script to staging Installing bin/request script to staging Installing bin/make_instance script to staging Installing bin/show_qfiles script to staging Installing bin/export script to staging Installing bin/join script to staging Installing bin/bumpdigests script to staging Installing bin/nightly_gzip script to staging Installing bin/version script to staging Installing bin/genaliases script to staging Installing bin/inject script to staging Installing bin/check_perms script to staging Installing bin/confirm script to staging Installing bin/list_lists script to staging Installing bin/testall script to staging Installing bin/checkdbs script to staging Installing bin/qrunner script to staging Installing bin/find_member script to staging Installing bin/senddigests script to staging Installing bin/list_owners script to staging Installing bin/show_config script to staging Installing bin/rmlist script to staging Installing bin/add_members script to staging Installing bin/post script to staging Installing bin/arch script to staging Installing bin/newlist script to staging Installing bin/gate_news script to staging Installing bin/import script to staging Installing bin/list_members script to staging Installing bin/update script to staging Installing bin/mmsitepass script to staging Installing bin/change_pw script to staging Installing bin/dumpdb script to staging Installing bin/bounces script to staging
Installed /Users/barry/projects/mailman/rules Processing dependencies for mailman==3.0.0a1 Searching for zope.interface Reading http://cheeseshop.python.org/pypi/zope.interface/ Reading http://www.python.org/pypi/zope.interface Reading http://cheeseshop.python.org/pypi/zope.interface/3.4.1 Best match: zope.interface 3.4.1 Downloading http://pypi.python.org/packages/source/z/zope.interface/zope.interface-3.4.1... =b085f4a774adab688e037ad32fbbf08e Processing zope.interface-3.4.1.tar.gz Running zope.interface-3.4.1/setup.py -q bdist_egg --dist-dir /var/ folders/by/bycjwwYpGcm-aejnq3kFc++++TI/-Tmp-/easy_install-uav8Hc/ zope.interface-3.4.1/egg-dist-tmp-kA-1fu Adding zope.interface 3.4.1 to easy-install.pth file
Installed /Users/barry/projects/mailman/rules/staging/ zope.interface-3.4.1-py2.5-macosx-10.3-i386.egg Searching for storm Reading http://cheeseshop.python.org/pypi/storm/ Reading https://storm.canonical.com Reading https://launchpad.net/storm/+download Reading http://cheeseshop.python.org/pypi/storm/0.11 Best match: storm 0.11 Downloading https://launchpad.net/storm/trunk/0.11/+download/storm-0.11-py2.5.egg Processing storm-0.11-py2.5.egg creating /Users/barry/projects/mailman/rules/staging/storm-0.11- py2.5.egg Extracting storm-0.11-py2.5.egg to /Users/barry/projects/mailman/rules/ staging Adding storm 0.11 to easy-install.pth file
Installed /Users/barry/projects/mailman/rules/staging/storm-0.11- py2.5.egg Searching for munepy Reading http://cheeseshop.python.org/pypi/munepy/ Reading http://launchpad.net/munepy Reading http://cheeseshop.python.org/pypi/munepy/1.4 Best match: munepy 1.4 Downloading http://pypi.python.org/packages/2.5/m/munepy/munepy-1.4-py2.5.egg#md5 =6c56db2030c1748f329ba3be4340bb35 Processing munepy-1.4-py2.5.egg Moving munepy-1.4-py2.5.egg to /Users/barry/projects/mailman/rules/ staging Adding munepy 1.4 to easy-install.pth file
Installed /Users/barry/projects/mailman/rules/staging/munepy-1.4- py2.5.egg Searching for locknix Reading http://cheeseshop.python.org/pypi/locknix/ Reading https://launchpad.net/locknix Reading http://cheeseshop.python.org/pypi/locknix/1.0 Best match: locknix 1.0 Downloading http://pypi.python.org/packages/2.5/l/locknix/locknix-1.0-py2.5.egg#md5 =ebdba8d44cd6221f49580ca10d42dcb8 Processing locknix-1.0-py2.5.egg Moving locknix-1.0-py2.5.egg to /Users/barry/projects/mailman/rules/ staging Adding locknix 1.0 to easy-install.pth file
Installed /Users/barry/projects/mailman/rules/staging/locknix-1.0- py2.5.egg

At 05:51 PM 12/23/2007 -0500, Barry Warsaw wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
setuptools is causing me pain lately. Something's clearly broken, but setuptools is not helping me understand what, or how to fix it.
% /opt/local/bin/python2.5 setup.py develop -d staging running develop running egg_info creating mailman.egg-info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt writing manifest file 'mailman.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mailman.egg-info/SOURCES.txt' running build_ext error: /opt/local/lib/python2.5/site-packages/site.py: No such file or directory
You have a broken setuptools installation in /opt, which is missing site.py. I'm afraid that setuptools isn't designed to gracefully handle the situation where random files are simply missing from the installation.
I'm going to guess that it's missing because it was installed using an RPM or some other package put together by someone who had the hubris to assume that I would actually include files in setuptools that aren't *necessary* for its operation, and that it would therefore be "better" for them to remove it. If this is the case, please educate them regarding the error of their ways -- it will be taken more seriously from an actual user bitten by it, than from me.
% rm -rf mailman.egg-info % /usr/local/bin/python2.5 setup.py develop -d staging
I notice here you're using /usr instead of opt, and this worked, so it appears you have two setuptools installations: one working and one not. Be sure to praise the originator of your working installation as much as you shame the culprit responsible for your broken one. :)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Phillip, thanks for the response.
On Dec 25, 2007, at 11:58 PM, Phillip J. Eby wrote:
At 05:51 PM 12/23/2007 -0500, Barry Warsaw wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
setuptools is causing me pain lately. Something's clearly broken, but setuptools is not helping me understand what, or how to fix it.
% /opt/local/bin/python2.5 setup.py develop -d staging running develop running egg_info creating mailman.egg-info writing requirements to mailman.egg-info/requires.txt writing mailman.egg-info/PKG-INFO writing top-level names to mailman.egg-info/top_level.txt writing dependency_links to mailman.egg-info/dependency_links.txt writing entry points to mailman.egg-info/entry_points.txt writing manifest file 'mailman.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mailman.egg-info/SOURCES.txt' running build_ext error: /opt/local/lib/python2.5/site-packages/site.py: No such file or directory
You have a broken setuptools installation in /opt, which is missing site.py. I'm afraid that setuptools isn't designed to gracefully handle the situation where random files are simply missing from the installation.
Would it be possible to just print the traceback? I haven't looked at the code, but a traceback at least would have helped me narrow down where setuptools was unhappy. The above error message really gives me no clue about where to go next, what to look for, or how to debug and fix the problem. Even a simple "Hey, your setuptools installation is broken, better reinstall it!" would have been very helpful.
I'm going to guess that it's missing because it was installed using an RPM or some other package put together by someone who had the hubris to assume that I would actually include files in setuptools that aren't *necessary* for its operation, and that it would therefore be "better" for them to remove it. If this is the case, please educate them regarding the error of their ways -- it will be taken more seriously from an actual user bitten by it, than from me.
This is the MacPorts version of Python, so I guess I have to shame them for busting setuptools. I ended up re-installing it manually to make it happy again. Your explanation about the root problem was helpful in understanding that this was probably the right course of action. :) Maybe I'll try to figure out why the MacPorts version broke.
% rm -rf mailman.egg-info % /usr/local/bin/python2.5 setup.py develop -d staging
I notice here you're using /usr instead of opt, and this worked, so it appears you have two setuptools installations: one working and one not. Be sure to praise the originator of your working installation as much as you shame the culprit responsible for your broken one. :)
Yes, /usr/local/bin/python2.5 is the one I built and installed from source, so I thank me for a working setuptools installation there! Way to go Barry! :)
The other thing I didn't understand is why I got a different error message after the first "setup.py develop" and why it took deleting mailman.egg-info to get the original error message back. Maybe I should look at the setuptools code more carefully. <wink>
Thanks, - -Barry

At 01:49 PM 12/28/2007 -0500, Barry Warsaw wrote:
Would it be possible to just print the traceback?
You can set the DISTUTILS_DEBUG environment variable to get tracebacks from distutils or setuptools.
This is the MacPorts version of Python, so I guess I have to shame them for busting setuptools. I ended up re-installing it manually to make it happy again. Your explanation about the root problem was helpful in understanding that this was probably the right course of action. :) Maybe I'll try to figure out why the MacPorts version broke.
They took out the 'site.py' file. It's not optional.
The other thing I didn't understand is why I got a different error message after the first "setup.py develop" and why it took deleting mailman.egg-info to get the original error message back. Maybe I should look at the setuptools code more carefully. <wink>
I'm guessing that your setup.py includes a source-finding entry point. When the .egg-info already exists, the entry point would get called during the egg_info source manifest generation, and it's apparently hitting a missing requirement. When the .egg-info doesn't exist, the entry point wouldn't get called.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Dec 28, 2007, at 2:42 PM, Phillip J. Eby wrote:
At 01:49 PM 12/28/2007 -0500, Barry Warsaw wrote:
Would it be possible to just print the traceback?
You can set the DISTUTILS_DEBUG environment variable to get tracebacks from distutils or setuptools.
Good to know, thanks.
This is the MacPorts version of Python, so I guess I have to shame them for busting setuptools. I ended up re-installing it manually to make it happy again. Your explanation about the root problem was helpful in understanding that this was probably the right course of action. :) Maybe I'll try to figure out why the MacPorts version broke.
They took out the 'site.py' file. It's not optional.
The other thing I didn't understand is why I got a different error message after the first "setup.py develop" and why it took deleting mailman.egg-info to get the original error message back. Maybe I should look at the setuptools code more carefully. <wink>
I'm guessing that your setup.py includes a source-finding entry point. When the .egg-info already exists, the entry point would get called during the egg_info source manifest generation, and it's apparently hitting a missing requirement. When the .egg-info doesn't exist, the entry point wouldn't get called.
Yep, thanks again. - -Barry
participants (2)
-
Barry Warsaw
-
Phillip J. Eby