stopping setup.py from installing as egg

前端 未结 2 1952
野性不改
野性不改 2020-12-13 16:49

How do I stop setup.py from installing a package as an egg? Or even better, how do I easy_install from installing a package as an egg

2条回答
  •  一向
    一向 (楼主)
    2020-12-13 17:44

    Years later, same problem, not satisfied with the accepted answer. Found this in Google groups:

    pushd /path/to/my/package/ 
    python setup.py sdist 
    popd 
    pip install /path/to/my/package/dist/package-1.0.tar.gz
    

    Explanation: python setup.py sdist creates a source distribution which naturally is not an *.egg! The resulting archive (.tar.gz in unix, .zip in windows) can be installed like any remote module with pip. It doesn't even require additional parameters! This results in the desired fully browsable module.

提交回复
热议问题