构建忽略 github `find-links` 参考
我正在尝试进行构建以使用特定的分叉&从我的 github 帐户调整了包,但它似乎完全忽略了参考,而是选择了标准 PyPi 模块。
这是我的构建配置:
[buildout]
parts = foo
find-links = http://github.com/me/themodule/tarball/version#egg=themodule-version
versions = versions
eggs = ...
[versions]
themodule=version
[foo]
eggs =
${buildout:eggs}
themodule
我正在使用 pypi 的最新 zc.buildout
版本 1.5.2。
我尝试过使用 http
和 https
作为链接(因为最近的 github 更改)。该链接处于活动状态并且可以直接工作,因此我猜测这是我的配置。我错过了什么吗?
I'm trying to get buildout to use a specific, forked & tweaked package from my github account, however it seems to be completely ignoring the reference and instead opting for the standard PyPi module.
Here's my buildout config:
[buildout]
parts = foo
find-links = http://github.com/me/themodule/tarball/version#egg=themodule-version
versions = versions
eggs = ...
[versions]
themodule=version
[foo]
eggs =
${buildout:eggs}
themodule
I'm using the latest zc.buildout
from pypi, version 1.5.2.
I've tried with both http
and https
for the link (because of the recent github change). The link is active and works directly, so I'm guessing it's my configuration. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您的版本号是唯一的;如果您在
find-links
URL 中使用与 PyPI 上列出的软件包相同的版本号,setuptools 会很高兴地获取 PyPI 上找到的版本号,而不是find-links
指示的版本号代码>.我们使用
{company}{counter}
模式进行私有修改,因此使用我们的更改重新打包的版本1.2.5
变为1.2.5acme1
。随后的修订会更新计数器(acme2
、acme3
等),直到分叉包版本本身发生更改。可能有必要在 setup.py 中设置它,并且其他工具可能会查询包本身的版本。Make sure your version number is unique; if you use the same version number in your
find-links
URL as the package listed on PyPI, setuptools will happily grab the one found on PyPI instead of the one indicated byfind-links
.We use a
{company}{counter}
pattern for private modifications, so a version1.2.5
repackaged with our changes becomes1.2.5acme1
. Later revisions then update the counter (acme2
,acme3
, etc.) until the forked-package version itself changes. It may well be necessary to set this in setup.py as well as other tools may be querying the package itself for it's version.或者,如果您只想使用分叉包(并且可能在开发主包的同时在本地重新调整它),我建议您使用令人惊叹的构建扩展 mr.developer。
您可以稍微修改
buildout.cfg
以在./bin/buildout
时检查您的分叉扩展。如果您愿意,您还可以指定要签出的特定标签(请仔细检查 PyPI 上的用户指南以获取更多详细信息)。这是您的特定设置的框架:Optionally, if you just want to use the forked package (and maybe re-tweak it locally at the same time you develop your main package), I'd suggest you use the amazing buildout extension mr.developer.
You can slightly modify your
buildout.cfg
to checkout your forked extension as you./bin/buildout
. You can also specify a specific tag to checkout, if you wish to do so (double-check the user guide on PyPI for more details). Here is the skeleton for your particular setup: