New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
When I do "easy_install Nevow" on my Mac OS 10.4 on PowerPC, I get the following:
Searching for Nevow
Reading http://pypi.python.org/simple/Nevow/
Reading http://divmod.org/trac/wiki/DivmodNevow
Reading http://divmod.org/projects/nevow
Reading http://www.divmod.org/
Best match: Nevow 0.9.31
Downloading
http://divmod.org/trac/attachment/wiki/SoftwareReleases/Nevow-0.9.31.tar.gz…
Processing Nevow-0.9.31.tar.gz
Running Nevow-0.9.31/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-_xanA9/Nevow-0.9.31/egg-dist-tmp-3qYEDS
/tmp/easy_install-_xanA9/Nevow-0.9.31/nevow/context.py:37: Warning: 'with' will
become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/bin/easy_install",
line 8, in <module>
load_entry_point('setuptools==0.6c8', 'console_scripts', 'easy_install')()
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 1671, in main
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 1659, in with_ei_usage
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 1675, in <lambda>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py",
line 151, in setup
dist.run_commands()
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 974, in run_commands
self.run_command(cmd)
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 994, in run_command
cmd_obj.run()
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 211, in run
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 446, in easy_install
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 476, in install_item
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 655, in install_eggs
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 930, in build_and_install
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 919, in run_setup
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 27, in run_setup
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 63, in run
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 29, in <lambda>
File "setup.py", line 8, in <module>
#
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/setupcommon.py", line 2, in <module>
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/nevow/__init__.py", line 143, in
<module>
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/nevow/__init__.py", line 29, in load
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/nevow/util.py", line 183, in
_namedAnyWithBuiltinTranslation
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/python/reflect.py",
line 426, in namedAny
topLevelPackage = _importAndCheckStack(trialname)
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/python/reflect.py",
line 377, in _importAndCheckStack
return __import__(importName)
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/formless/webform.py", line 24, in
<module>
File "/tmp/easy_install-_xanA9/Nevow-0.9.31/nevow/static.py", line 18, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/web/error.py",
line 11, in <module>
from twisted.web import http
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/web/http.py",
line 36, in <module>
from twisted.internet import interfaces, reactor, protocol, address
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/internet/reactor.py",
line 11, in <module>
from twisted.internet import selectreactor
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/internet/selectreactor.py",
line 21, in <module>
from twisted.internet import posixbase
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/internet/posixbase.py",
line 25, in <module>
from twisted.internet import tcp, udp
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.3-fat.egg/twisted/internet/tcp.py",
line 29, in <module>
from OpenSSL import SSL
File "build/bdist.macosx-10.3-fat/egg/OpenSSL/__init__.py", line 11, in <module>
File "build/bdist.macosx-10.3-fat/egg/OpenSSL/rand.py", line 7, in <module>
File "build/bdist.macosx-10.3-fat/egg/OpenSSL/rand.py", line 4, in __bootstrap__
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 841, in resource_filename
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 1311, in get_resource_filename
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 1332, in _extract_resource
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 921, in get_cache_path
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 887, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
SandboxViolation: mkdir('/Users/zooko/.python-eggs', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
The Python egg cache directory is currently set to:
/Users/zooko/.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
----------
messages: 44
nosy: zooko
priority: bug
status: unread
title: SandboxViolation: mkdir('/Users/zooko/.python-eggs', 511) {}
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue23>
_______________________________________________
Folks:
I just added this note to the bug tracker, but I'm not sure if anyone
who has the ability to commit fixes to setuptools is reading all
updates to all tickets on that tracker, so I wanted to draw attention
to it here:
http://bugs.python.org/setuptools/issue20 # package required at build
time seems to be not fully present at install time?
"""
Okay Brian Warner and I just tracked this issue down a bit, since it
is blocking
the release of the next version of the Tahoe Least-Authority Filesystem.
It turns out that when setuptools builds Twisted from source in a
"setuptools
sandbox", that this causes the import of a few things including
"twisted" and
"twisted._version". These get added to sys.modules, and then this
side-effect
on sys.modules is not undone after Twisted has been built and
installed, so in a
sense changes to sys.modules can "leak" out of the sandbox.
Nevow's build process then tries to import twisted.components, which
was not
imported by Twisted's build process, so it isn't already in
sys.modules, but
also cannot be imported from the newly installed Twisted, because
"twisted" is
already in sys.modules (with a directory location of ".", which
refers to a
temporary directory when it was being built which has since been
deleted).
This is why Nevow cannot be installed in the same setuptools process
as Twisted was.
A good way to improve this would be to make the setuptools sandbox
"tighter" --
make it so that the act of building and installing one distribution
doesn't have
side-effects on the sys.modules which effect the attempt to later
build another
distribution. A good way to do this is to use a subprocess. If you
don't want
the code that you are about to execute to have side-effects on your
Python
state, then execute that code in a subprocess. Another way to fix
this would be
to figure out which names had been added to sys.modules during the
"build in a
sandbox" and clean them out afterward.
"""
Hello,
Motivation:
Imagine that you've written a script that uses several libraries, some of
which you've written and some you've downloaded and installed (for example
PyYAML). You want to distribute the script to your friends and co-workers,
who already have Python installed with all the standard library. But your
script won't run on their machines, because they have neither your personal
libraries, nor PyYAML installed. So what can you do ?
* You can ask them to install PyYAML and other libraries your script uses,
and send them your own libraries. This is a lengthy and inconvenient
process.
* You can use a tool like py2exe to package your delivery. This has a
downside, however. py2exe produces large files (several MBs) and you may
not want that.
* You can painstakingly collect the libraries into a directory where your
script can find them, and package the directory together with the script.
I've written libcollect - a module that allows you to easily do the
third option. The full docstring of libcollect is pasted in the bottom
of this email. The module is downloadable from
http://eli.thegreenplace.net/files/prog_code/libcollect.py.txt
I wanted to ask this list:
1) Is there something similar already and I've reimplemented the wheel ?
2) If not, then am I the only one who finds such a utility useful ?
3) If it looks useful to others, doesn't it belong with distutils ?
Its operation is in many ways similar to py2exe - it does a subset of
py2exe's work, really.
Thanks in advance
Eli
"""
libcollect.py
Provides the LibCollect class, used for collecting the various libraries
your script uses for delivery as a self-contained distribution package.
Author: Eli Bendersky (http://eli.thegreenplace.net)
License: Same as Python
Motivation:
Imagine that you've written a script that uses several libraries, some of
which you've written and some you've downloaded and installed (for example
PyYAML). You want to distribute the script to your friends and co-workers,
who already have Python installed with all the standard library. But your
script won't run on their machines, because they have neither your personal
libraries, nor PyYAML installed. So what can you do ?
* You can ask them to install PyYAML and other libraries your script uses,
and send them your own libraries. This is a lengthy and inconvenient
process.
* You can use a tool like py2exe to package your delivery. This has a
downside, however. py2exe produces large files (several MBs) and you may
not want that.
* You can painstakingly collect the libraries into a directory where your
script can find them, and package the directory together with the script.
LibCollect makes the third option trivial, by doing all the dirty work
for you.
Example:
Suppose your script is named script.py, and is located in directory $DIR
(although I'm using Unix-y notation here, it is for convenience only.
LibCollect works similarly well on Windows platforms). Follow these steps
to prepare a self-contained distribution with LibCollect:
Create a distribution setup script in the same directory. Lets assume
you call it distrib_script.py. You can easily place it in any directory
you like, I'm using the same one to make the example simpler.
Add the following to distrib_script.py (assuming that libcollect.py is
in your sys.path):
**************************************************************
import libcollect
# Create a LibCollect object
lc = libcollect.LibCollect()
# Prepare arguments for do_collect
#
# Path to the script (can be absolute or relative)
scriptname = 'script.py'
# Ask the resulting distribution to be placed in
# directory distrib
targetdir = 'distrib'
# Specify which libraries to exclude from the
# distribution (because you know they're installed
# on the target machine)
excludes = ["wx",
"pywin",
"win32api",
"win32com"]
# Zip the libraries used by the script to reduce
# clutter and save space
zip_lib = True
# This does the actual work
lc.do_collect( scriptname,
targetdir,
excludes,
zip_lib=zip_lib)
**************************************************************
Now run distrib_script.py.
When it finishes running, you will see that the distrib directory
has been created in $DIR. In $DIR/distrib you will see two files,
script.py and distlib.zip
* script.py is a loader that replaces your original script.py - this
is the program your users should run. All it does (look at the
code, it's short!) is prepare the sys.path to include the
packaged libraries, and runs your own script.py that was also
packaged into the .zip file
* distlib.zip is the distribution library, containing all the code
your script needs to run on any machine with Python installed,
and nothing else (except the modules you specified in the exclusion
list). You may choose to pass on the zip file creation and leave
your distribution library as a directory by providing False
to the zip_lib argument of LibCollect.do_collect (take a look at
its documentation, there are some other options there)
How to use LibCollect:
* It is most convenient to use LibCollect in the way demonstrated
in the example above. You may want to update your application from
time to time, and having a distribution script handy will turn
the preparation of a new distribution into a 5-second process.
* If you don't want to create a distribution script, you can use
a more direct method of invoking libcollect.py as a program on
your script. Call it without arguments and it will print
a usage string that will explain what you need to do.
How it works:
* LibCollect uses the standard modulefinder module to find out which
libraries are used by your script. It categorizes them into two
types: standard libraries that came with Python, and non-standard
libraries you've installed or written.
* Only libraries of the second type are included in the distribution
(bar the libraries you've explicitly asked to exclude).
* It then builds a directory with all the included libraries, in a
way that your script will be able to find them. The script itself
is also packaged into the same place.
* On request, this directory can be zipped into a single file, to
employ Python's built-in zip import facility.
* In the distribution directory, a new file with the name of your
script is created. It is a simple loader that uses the runpy module
to transparently load your script from the distribution library.
This way your script is not being modified (sys.path is rigged
from the loader).
Compatibility:
Python 2.5
Tested on Windows and Linux, but should work on other platforms
where the standard Python distribution works.
Version history:
1.0 (2008.06.07): initial release
"""
New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
There was a time, last November, when, if I understand it correctly, setuptools
on the standard Python that comes with Mac OS X wouldn't accept fat eggs for Mac
OS X 10.4 or higher.
Here is the pythonmac-sig discussion:
http://www.nabble.com/does-pkg_resources-think-that-%22macosx-10.3%22-is-in…
Ronald Oussoren has committed the fix for the comparison of Mac OS X version
numbers from '<' to '>=', so as of Python 2.5.2 that problem is fixed. However,
he mentioned other problems which I didn't understand:
"""the config/Makefile in
Apple's Python.framework isn't configured for building universal
binaries.
And to make matters even worse: I'm pretty sure that setuptools used
to know that 'fat' builds are compatible with 'i386' and 'ppc'
architectures (at least on OSX), but that code no longer seems to be
there.
"""
What is the status of this issue now?
----------
messages: 33
nosy: zooko
priority: bug
status: unread
title: Will setuptools on Mac Python accept fat eggs?
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue19>
_______________________________________________
New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
There is a bug which manifests itself if you combine Twisted v8.1.0 with
pyOpenSSL v0.7. It doesn't happen with pyOpenSSL v0.6. However, the bug is a
bug in Twisted, not in pyOpenSSL. Future releases of Twisted will probably fix
the bug. Future releases of pyOpenSSL will probably be unchanged with respect
to this issue.
So the right way for the foolscap project to express its dependency on Twisted
and pyOpenSSL should probably be something like:
(Twisted < 8.2 && pyOpenSSL == 0.6) || (Twisted >= 8.2 && pyOpenSSL >= 0.7)
Since setuptools doesn't currently support expression of such requirements, the
foolscap author is going to write:
['Twisted', 'pyOpenSSL == 0.6']
Thus preventing people from using a newer version of pyOpenSSL with foolscap
until Twisted is fixed, then the author of foolscap learns that Twisted is
fixed, then he changes his requirements to ['Twisted >= $FIXED_VER', 'pyOpenSSL
>= 0.6'], then he releases a new release of foolscap, then people upgrade to it.
So this wishlist item is for setuptools to develop the ability to express
requirements on combinations of packages so that the correct dependency (the
first one listed above) can be expressed.
----------
messages: 39
nosy: zooko
priority: wish
status: unread
title: wish: more expressive requirements
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue22>
_______________________________________________
Hello
Right now when people write tests with zc.buildout, to try out their
buildout they roughly do:
>>> from zc.buildout.testing import system
>>> system('bin/buildout -c my-config.cfg')
...
usual output
...
The problem is, the system() function uses os.popen to call the buildout
script, making it hard to debug.
For instance, you are not able to put a pdb and trace as you would do in the
same program, which is painful
What about adding in zc.buildout.testing a new function called "buildout"
that could be used to run
a buildout in the tests/doctests the same way :
>>> from zc.buildout.testing import buildout
>>> buildout('my-config.cfg')
...
usual output
...
I could do a branch for that but if everyone agrees, I guess I can push that
extra function into the trunk
++
Tarek
--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
New submission from chris <cdcasey(a)gmail.com>:
There is currently no uninstall feature in setuptools. Here is a proposed
implementation:
* By default, use easy_install's --record option and place the resulting file
list in the project's EGG-INFO directory, whether the project is zip-safe or
not. Use the list for determining which files should be uninstalled.
* Do a back-check of dependencies on all currently installed projects, and warn
the user how uninstalling a project could affect other projects.
* Provide option of uninstalling dependencies that are no longer needed by the
project being uninstalled (or other installed projects).
* Remove entry from easy_install.pth
----------
messages: 38
nosy: ccasey
priority: feature
status: chatting
title: adding uninstall feature to easy_install
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue21>
_______________________________________________
New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
On my Mac:
$ ./ez_setup.py
bash: ./ez_setup.py: python: bad interpreter: No such file or directory
On Cygwin I get the same sort of error. Replacing the shebang line "#!python"
with "#!/usr/bin/env python" fixes this problem. I've tested this fix on Mac,
Linux, Solaris, Cygwin, and Windows.
----------
messages: 18
nosy: zooko
priority: bug
status: unread
title: Executing "./ez_setup.py" fails.
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue14>
_______________________________________________
New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
If you try to install this minimal project:
"""
import setuptools
setuptools.setup(name="minproj_that_needs_nevow", install_requires=["Nevow"]
"""
You'll get a reasonable-looking traceback that ends with an ImportError in which
Nevow tried to import Twisted at install time. (Note that Nevow does not
declare its install-time dependency on Twisted -- see
http://divmod.org/trac/ticket/2629 .)
"""
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 427, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 478, in install_item
self.process_distribution(spec, dist, deps)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 519, in process_distribution
[requirement], self.local_index, self.easy_install
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 522, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 758, in best_match
return self.obtain(req, installer) # try and download/install
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 770, in obtain
return installer(requirement)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 655, in install_eggs
return self.build_and_install(setup_script, setup_base)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 930, in build_and_install
self.run_setup(setup_script, setup_base, args)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 919, in run_setup
run_setup(setup_script, args)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 27, in run_setup
lambda: execfile(
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 63, in run
return func()
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 29, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 8, in <module>
File "/tmp/easy_install-1aI_wu/Nevow-0.9.31/setupcommon.py", line 2, in <module>
File "/tmp/easy_install-1aI_wu/Nevow-0.9.31/nevow/__init__.py", line 5, in
<module>
File "/tmp/easy_install-1aI_wu/Nevow-0.9.31/nevow/_version.py", line 2, in
<module>
ImportError: No module named twisted.python
"""
This is the same behavior as if you had simply executed "easy_install Nevow".
The _version.py file in question is visible here:
http://divmod.org/trac/browser/trunk/Nevow/nevow/_version.py?rev=14968
However, if you try to install this minimal project:
"""
import setuptools
setuptools.setup(name="minproj_that_needs_nevow", setup_requires=["Twisted"],
install_requires=["Nevow"]
"""
You'll get a slightly strange error message which suggests that Nevow got
further in its attempt to use Twisted, but not far enough:
"""
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 478, in install_item
self.process_distribution(spec, dist, deps)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 519, in process_distribution
[requirement], self.local_index, self.easy_install
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 522, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 758, in best_match
return self.obtain(req, installer) # try and download/install
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 770, in obtain
return installer(requirement)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 655, in install_eggs
return self.build_and_install(setup_script, setup_base)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 930, in build_and_install
self.run_setup(setup_script, setup_base, args)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py",
line 919, in run_setup
run_setup(setup_script, args)
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 27, in run_setup
lambda: execfile(
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 63, in run
return func()
File
"/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py",
line 29, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 8, in <module>
File "/tmp/easy_install-Nib-SJ/Nevow-0.9.31/setupcommon.py", line 2, in <module>
File "/tmp/easy_install-Nib-SJ/Nevow-0.9.31/nevow/__init__.py", line 10, in
<module>
ImportError: No module named components
"""
The __init__.py file in question is here:
http://divmod.org/trac/browser/trunk/Nevow/nevow/__init__.py?rev=14968
Now if you try to install the actual project -- allmydata.org Tahoe -- from
which this minimal project was extracted:
http://allmydata.org/trac/tahoe/browser/setup.py
You'll get a bizarre error message that takes the name of PIL in vain:
"""
File
"/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 27, in run_setup
File
"/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 63, in run
File
"/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 29, in <lambda>
File "setup.py", line 8, in <module>
#
File "/tmp/easy_install-fqJkNC/Nevow-0.9.18/setupcommon.py", line 2,
in <module>
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 10, in <module>
#
ImportError: No module named components
"""
Note that allmydata.org Tahoe does not use PIL in any way. There are no hits
for "grep -r PIL ." in the Tahoe source tree.
Going back to the minimal projects, we can tell that this effect has something
to do with the presence or absence of a Twisted*.egg in the current working
directory when "./setup.py install" is invoked. That is:
If this minimal project is invoked in an empty directory (and also when no
Twisted, Nevow, or zope.interface installed in the system), then we get the
weird error about failure to import components even though the earlier "from
twisted.python import versions" succeeded. This will leave a Twisted .egg in
the CWD.
If it is invoked in an otherwise empty directory that has a Twisted egg, then it
will succeed (and leave a Twisted .egg in the CWD). (Hm. Actually now that I
look in the target install directory, I see that it installed Nevow into there
but not Twisted or zope.interface (which Twisted requires). It seems like that
is a problem, but it is probably a separate problem from this ticket.)
----------
messages: 35
nosy: zooko
priority: bug
status: unread
title: package required at build time seems to be not fully present at install time?
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue20>
_______________________________________________
New submission from Zooko O'Whielacronx <zooko(a)zooko.com>:
http://sourceforge.net/tracker/index.php?func=detail&aid=1799934&group_id=7…
Tells how {{{easy_install pywin32}}} fails. I believe that this has been fixed
in setuptools trunk by PJE:
http://mail.python.org/pipermail/distutils-sig/2007-July/007823.html
but that fix (if it is a fix) isn't in a released version of setuptools yet.
I'm making the status of this ticket be "in-progress" in order to indicate that
a fix has been created but not yet released.
----------
messages: 31
nosy: zooko
priority: bug
status: in-progress
title: can't install pywin32
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue18>
_______________________________________________