构建忽略 github `find-links` 参考

发布于 2024-10-30 05:19:26 字数 507 浏览 1 评论 0原文

我正在尝试进行构建以使用特定的分叉&从我的 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。

我尝试过使用 httphttps 作为链接(因为最近的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半世蒼涼 2024-11-06 05:19:26

确保您的版本号是唯一的;如果您在 find-links URL 中使用与 PyPI 上列出的软件包相同的版本号,setuptools 会很高兴地获取 PyPI 上找到的版本号,而不是 find-links 指示的版本号代码>.

我们使用 {company}{counter} 模式进行私有修改,因此使用我们的更改重新打包的版本 1.2.5 变为 1.2.5acme1。随后的修订会更新计数器(acme2acme3 等),直到分叉包版本本身发生更改。可能有必要在 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 by find-links.

We use a {company}{counter} pattern for private modifications, so a version 1.2.5 repackaged with our changes becomes 1.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.

水溶 2024-11-06 05:19:26

或者,如果您只想使用分叉包(并且可能在开发主包的同时在本地重新调整它),我建议您使用令人惊叹的构建扩展 mr.developer

您可以稍微修改 buildout.cfg 以在 ./bin/buildout 时检查您的分叉扩展。如果您愿意,您还可以指定要签出的特定标签(请仔细检查 PyPI 上的用户指南以获取更多详细信息)。这是您的特定设置的框架:

[buildout]
parts = foo
extensions = mr.developer
auto-checkout = *
eggs = ...

[sources]
themodule = git [email protected]:me/themodule

[foo]
eggs = ${buildout:eggs}
       themodule

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:

[buildout]
parts = foo
extensions = mr.developer
auto-checkout = *
eggs = ...

[sources]
themodule = git [email protected]:me/themodule

[foo]
eggs = ${buildout:eggs}
       themodule
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文