| |
340 |
A Note on .egg files and setuptools
|
| |
341 |
-----------------------------------
|
| |
342 |
`setuptools`_ is a distutils extensions which provide many benefits, including
|
| |
343 |
the ability to distribute the extension as ``egg`` files. Together with the
|
| |
344 |
nifty `easy_install`_ (a tool which automatically locates, downloads and
|
| |
345 |
installs Python extensions), ``egg`` files are becoming more and more
|
| |
346 |
widespread as a way for distributing Python extensions.
|
| |
347 |
|
| |
348 |
``egg`` files are actually ZIP files under the hood, and they rely on the fact
|
| |
349 |
that Python 2.4 is able to transparently import modules stored within ZIP
|
| |
350 |
files. PyInstaller is currently *not* able to import and extract modules
|
| |
351 |
within ZIP files, so code which uses extensions packaged as ``egg`` files
|
| |
352 |
cannot be packaged with PyInstaller.
|
| |
353 |
|
| |
354 |
The workaround is pretty easy: you can use ``easy_install -Z`` at installation
|
| |
355 |
time to ask ``easy_install`` to always decompress egg files. This will allow
|
| |
356 |
PyInstaller to see the files and make the package correctly. If you have already
|
| |
357 |
installed the modules, you can simply decompress them within a directory with
|
| |
358 |
the same name of the ``egg`` file (including also the extension).
|
| |
359 |
|
| |
360 |
Support for ``egg`` files is planned for a future release of PyInstaller.
|
| |
361 |
|
| |
362 |
.. _`setuptools`: http://peak.telecommunity.com/DevCenter/setuptools
|
| |
363 |
.. _`easy_install`: http://peak.telecommunity.com/DevCenter/EasyInstall
|
| |
364 |
|
| |
365 |
|
| |
366 |
|GOBACK|
|
| |
367 |
|