Search code examples
pythonsetuptoolsegg

`setup.py develop` installs zipped eggs. How to avoid this?


I realized that if you do this for my_pony_project

setup.py develop

installs zipped eggs of install_requires packages (example fancy_lib_of_someone_else). I want to avoid this.

How can I force a normal (not zipped) installation?

My setup.py looks like this:

import setuptools

setuptools.setup(
    name='foo',
    packages=setuptools.find_packages(),
    install_requires=['fancy_lib_of_someone_else>=1.2']

Background

I want to avoid zipped eggs, since pip seems to install packages twice if zipped eggs are used. One time zipped, one time flat :-(


Solution

  • Answer to my own question:

    On the system where the packages get installed create this file:

    ~/.distutils.cfg:

    [easy_install]
    zip_ok = False
    

    Yes, this is a XY problem.

    Upgrading to a new pip version should avoid duplicate installs. At the moment we still use version 1.5.6.