我是Python的新手,我只是想了解它的包是如何工作的.据推测,"鸡蛋"是某种包装机制,但是它们可以快速概述它们扮演的角色,也可能是一些关于它们为什么有用以及如何创建它们的信息?
有人可以解释egg-info目录如何与各自的模块绑定?例如,我有以下内容:
/usr/local/lib/python2.5/site-packages/quodlibet/
/usr/local/lib/python2.5/site-packages/quodlibet-2.0.egg-info/
Run Code Online (Sandbox Code Playgroud)
我假设egg-info目录是使相应的模块对setuptools(easy_install)可见,对吧?如果是这样,setuptools如何将egg-info目录绑定到模块目录?
假设我在正确的轨道上,例如着想......如果我想让矿setuptools的可见现有的包,我可能只是符号链接模块目录和卵子信息目录的位点包目录?我本来只是尝试这样做我自己,但我不知道如何测试,如果包是setuptools的可见.如果你还可以告诉我如何测试这个奖励积分:)
我想了解这一切的主要原因是因为我想符号链接我的一些模块到站点包,这样我可以对其进行更改,并有改变使用它们,而无需重新安装脚本可见每次更换后,来自PyPI的鸡蛋.
当我运行python setup.py installdjango时,它会生成一个egg文件.
Python egg文件的用处是什么?
我遭受了奇怪的pip行为.调用
pip install git+https://github.com/username/repo
Run Code Online (Sandbox Code Playgroud)
通常可以工作,但在某些软件包上,它会以异常方式失败
Downloading/unpacking git+git://github.com/artscoop/django-inplaceedit
Cloning git://github.com/artscoop/django-inplaceedit to /tmp/pip-rl1_7G-build
Running setup.py egg_info for package from git+git://github.com/artscoop/django-inplaceedit
Installing collected packages: django-inplaceedit
Running setup.py install for django-inplaceedit
error: Error: setup script specifies an absolute path:
/tmp/pip-rl1_7G-build/AUTHORS.rst
setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.
Complete output from command /home/steve/virtualenv/project/bin/python -c "import setuptools;__file__='/tmp/pip-rl1_7G-build/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vVDBRe-record/install-record.txt --single-version-externally-managed --install-headers /home/steve/virtualenv/project/include/site/python2.7:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/inplaceeditform …Run Code Online (Sandbox Code Playgroud)