如何使用pip从Bitbucket安装软件包?

时间:2012-04-24 16:52:33

标签: python pip bitbucket

我正在制作一个需要指向我的存储库的setup.py。

使用github我可以这样做:

dependency_links=['https://github.com/nathanborror/django-registration/tarball/master#egg=django-registration']

我如何对bitbucket项目做同样的事情?

例如此网址:

https://bitbucket.org/abraneo/django-registration

感谢。

2 个答案:

答案 0 :(得分:21)

您的Github链接看起来指向一个gzip压缩文件。尝试为您的Bitbucket托管项目做同样的事情 - https://bitbucket.org/abraneo/django-registration/get/tip.tar.gz

答案 1 :(得分:7)

可以使用dependency_links中的以下网址添加BitBucket Mercurial(hg)存储库:

'https://bitbucket.org/zzzeek/alembic/get/tip.zip#egg=alembic-0.6.0'

在这种情况下,它会安装Alembic软件包的开发版本(0.6),在编写本文时尚未在PyPI中。

请注意,BitBucket支持Mercurial和git。如果repo是Mercurial,则网址必须引用tip.zip,但如果是git,则网址必须引用master.zip

相关问题