Buildout ignoring github `find-links` reference
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 opti开发者_如何学运维ng 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?
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.
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 git@github.com:me/themodule
[foo]
eggs = ${buildout:eggs}
themodule
精彩评论