7

I used to run python setup.py install in a python project, it will just move the source to site-packages, but sometimes it will mv an egg file to site-packages?

#!/usr/bin/env python
# encoding: utf-8

from setuptools import setup,find_packages

setup(
    name = "ipin_rpc_gen_vector",
    version = "0.0.2",
    packages = find_packages("src"),
    package_dir={"":"src"},
    install_requires=[

    ],
)

So what is the difference behind this? When will it install source, when will it just install egg file? How can I force install source instead of egg file?

5

1 Answer 1

10

You have to set the zip_safe flag to False if you want to avoid the zip (egg) behaviour.

You can read more about it at https://setuptools.readthedocs.io/en/latest/userguide/miscellaneous.html#setting-the-zip-safe-flag.

Also check out https://setuptools.readthedocs.io/en/latest/userguide/keywords.html#new-and-changed-setup-keywords and the *_package_data flags (also at: https://setuptools.readthedocs.io/en/latest/references/keywords.html).

Sign up to request clarification or add additional context in comments.

1 Comment

Numpy uses this python instruction to install : setup(**metadata) so I added zip_safe= False, in the metadata dict and ran python setup install but it still produced an egg file instead of installing the module files in /usr/local/lib/python2.7/site-packages/numpy/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.