[Distutils] nailed-down versions by having custom index
P.J. Eby
pje at telecommunity.com
Wed Feb 3 00:31:24 CET 2010
At 09:44 PM 2/2/2010 +0100, Reinout van Rees wrote:
>Question: how to maintain such a custom index?
Create an Apache-served folder structure such that for each project
you want to serve, indexroot/project/ is a directory listing of
downloadables. Alternately, make a indexroot/project/index.html for
that project, that that links directly to your download targets
(which you need not directly serve).
>But how to get the right collection of tarballs in there? Is that a
>by-hand approach? Can you automate it?
Presumably, if you have something particular in mind, you could write
a script to do it. Perhaps you could even use buildout to do it in
some fashion. ;-)
>Question 2: I thought you could only have one index. So installing
>something extra from pypi seems out.
You can always add a mod_rewrite rule in your index root, that checks
for the nonexistence of a projectname, and then automatically
redirects to the PyPI index for that page. easy_install will not be
confused by this - it will treat the PyPI page as if it had been
served by your index. (But of course it will correctly interpret any
relative links found as relative to the PyPI page, rather than as
relative to the URL it tried to fetch from your index. If you don't
understand any of this, don't worry... it Just Works.)
More information about the Distutils-SIG
mailing list