pip checkout svn、git 等,无需 setup.py
我知道可以使用 pip 从 svn 等安装包。 ala:
-e svn+http://django-grappelli.googlecode.com/svn/trunk/grappelli#egg=grappelli
但是,在这种情况下,grappelli 没有 setup.py,因此安装失败。
我怎样才能实现类似的目标:
svn co http://django-grappelli.googlecode.com/svn/trunk/grappelli ../pinax-env/lib/python2.6/site-packages/grappelli/
然而,将命令放入 pip 需求文件中,例如 project.txt 并运行
pip install -r requirements/project.txt
I understand that one can use pip to install packages from svn etc. ala:
-e svn+http://django-grappelli.googlecode.com/svn/trunk/grappelli#egg=grappelli
However, in this case, grappelli has no setup.py, so the installation fails.
How can I achieve something like:
svn co http://django-grappelli.googlecode.com/svn/trunk/grappelli ../pinax-env/lib/python2.6/site-packages/grappelli/
Yet, putting the command in a pip requirements file, such as project.txt and running
pip install -r requirements/project.txt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有存储有关 python 包的信息,则无法安装该包。 Pip 依赖 setup.py 来获取包的信息。
grappelli
项目中没有setup.py
,因此,不幸的是不可能通过pip/easy_install 安装它代码>.
PS:如果它对你来说真的很重要,请分叉该项目并添加一个 setup.py (或向他们发送一个 diff 补丁)。我相信它不仅会对您有帮助。也许你可以以
django_compressor
为例。There is no way to install a python package if there is no stored information about it. Pip relies on
setup.py
to get package's information.grappelli
has nosetup.py
in the project, so, unfortunately it is not possible to install it viapip/easy_install
.PS: It if it really important to you, fork the project and add a
setup.py
(or send them a diff patch). I am sure it will help not only you. Maybe you can takedjango_compressor
as an example.