21

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

使用 github 我可以做到这一点:

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

我怎样才能对 bitbucket 项目做同样的事情?

例如这个网址:

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

谢谢。

4

2 回答 2

21

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

于 2012-04-24T16:57:58.863 回答
7

可以使用以下 URL 添加 BitBucket Mercurial (hg) 存储库dependency_links

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

在这种情况下,它会安装 Alembic 包的开发版本(0.6),在撰写本文时,它还没有在 PyPI 中。

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

于 2013-04-26T12:54:47.000 回答