setuptools: zip_safe as command line option ?

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Is it possible to tell setuptools to not zip the egg when installing ? I can't seem to find any option regarding this in the command line help... Thanks, Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Remi - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJM/0c/AAoJEBdvyODiyJI4EXAH/2EVqqAFIBqmiZLMPyQ6Ibd1 CBLZlT12lm9oQ3+HvGIpow+UlWJCC+IRq/MsbUrrlLk1lSQ1lHt+gnjtiinixi5s XfH81ykaEhD0biWKVPHamU6LKjzkUl9UVIji3kUcznkl5clhXXuim7sCYfHYUVrH PyhJgWygK4r7c3bmrpd8VRDPmpRDLb2kFokhNQ+oe3JiX6UGWzVSLG2ohzy7CeDj AIWdadYc6i5QIHXpra5i8TkX2XLRvtYV5Yb5P3znArjc61Gjd7RRQUm83nug9/xV ZMsvPE8KtQsbHXKQHQ9npan+YF2p4LJW/4t/7SZw3pY3UHroTFa6Tyb6tXoSjsE= =GxiC -----END PGP SIGNATURE-----

On Wed, Dec 08, 2010 at 09:52:15AM +0100, Martin Raspaud wrote:
Is it possible to tell setuptools to not zip the egg when installing ? I can't seem to find any option regarding this in the command line help...
Setuptools has no command-line. If you mean easy_install, it's -Z (--always-unzip). If you use pip, I believe it does the sane thing and never zips. I believe there's a config file to tell setuptools to never zip eggs; I don't remember the specifics. Have you tried google? Marius Gedminas -- Look! Before our very eyes, the future is becoming the past.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 2010-12-08 17:34, Marius Gedminas skrev:
On Wed, Dec 08, 2010 at 09:52:15AM +0100, Martin Raspaud wrote:
Is it possible to tell setuptools to not zip the egg when installing ? I can't seem to find any option regarding this in the command line help...
Setuptools has no command-line.
If you mean easy_install, it's -Z (--always-unzip).
Ok, I meant on the "python setup.py install" line. But seeing your answer and the next one, I guess setuptools is not the best tool to use anymore ? Thanks, Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Remi - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJM/+JsAAoJEBdvyODiyJI44lgIAJ/coGpoQrXQxRSI2kjnt4Pf XUplHGUn8KcSZf2YJRl6FWgD6T8C58Eja82p84PL+xJEZMgk5emNTw0MeTtvkZce wa40694Y9sPiNAE8xjAfKGLpdn1jqdOluIGfSayjkuqrLRODY10g1TuKT3da78Dm QA+C0VUyLFJBG4P2JFWG5PvxQN/Sb5fy86f7xz5Src/jsEAUO8+HhKsYe2FKpRU9 qJ66TZ0D8xskUQXJwpT1yXDZcAZdLmUAg2b+olarKz2N68hVXfAXWXhxI6/VuAKb /TJnoEO4MTWijTcDVHKaN4AlCgje40ZtmzB5N0xmhfqvx0vcqlZFfZ5QykJWMPA= =PsGG -----END PGP SIGNATURE-----

At 08:54 PM 12/8/2010 +0100, Martin Raspaud wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
2010-12-08 17:34, Marius Gedminas skrev:
On Wed, Dec 08, 2010 at 09:52:15AM +0100, Martin Raspaud wrote:
Is it possible to tell setuptools to not zip the egg when installing ? I can't seem to find any option regarding this in the command line help...
Setuptools has no command-line.
If you mean easy_install, it's -Z (--always-unzip).
Ok, I meant on the "python setup.py install" line.
If you're using "python setup.py install" and want it to install in the old-style (distutils) way, you can use "setup.py install --single-version-externally-managed". This will install it in a way similar to pip, but without the uninstall capability. (You should not use this unless that's *really* what you want, and it probably isn't!) However, if you want to do the equivalent of "easy_install -Z" from a setup.py, use: python setup.py easy_install -Z . Which is roughly like "python setup.py install", but with .egg directory installation in place of a zipped .egg file. Also, as Benji pointed out, you can put this: [easy_install] zip_ok = 0 in your project's setup.cfg or your user or global distutils.cfg file to force this to happen automatically, even if you use "python setup.py install". For that matter, you can put 'zip_safe=False' in your setup() call in your setup.py to make that one specific project always install unzipped, even when somebody else installs it from an .egg file. There are many ways to do it -- so use whichever is most convenient for what you are trying to accomplish. (All of the above answers are valid for setuptools-based projects.)
participants (4)
-
Benji York
-
Marius Gedminas
-
Martin Raspaud
-
P.J. Eby