[Distutils] [Catalog-sig] Specification for package indexes?

Jim Fulton jim at zope.com
Fri Jul 7 22:45:59 CEST 2006


On Jul 7, 2006, at 4:20 PM, Phillip J. Eby wrote:

> At 02:52 PM 7/7/2006 -0400, Jim Fulton wrote:
...
>> Perhaps someone should propose an API and we'll see. :)
>
> I thought I already did.  :)  Here it is again:
>
> baseURL/ should return a page containing href links to projects
> baseURL/projectname should return a page containing href links to  
> version pages
> baseURL/projectname/version should return a page with download  
> links (ideally with MD5 info)
> Links are found via href="" attributes
> URLs' trailing path components are used to identify distributions.

Hm. I hadn't seen this before. Perhaps I'm missing some messages from  
this thread.

By "download links", do you mean links to distributions? Or to links  
to pages containing links to distributions.

Can the links to projects, links to version pages, or download links
point off site?

Can any of these pages contain other links?


> This is a sufficient API to allow querying packages for downloading  
> purposes, as long as all download links are found in the index's  
> pages.  Additional information is only needed to allow following  
> external links to *other index pages*.

so, for example:

   http://www.python.org/pypi/ZODB3/3.6.0

Has a link to http://www.zope.org/Products/ZODB3.6.
Is this a download link? Or an off-site index link. I'm having a  
little trouble
following the jargon.


>> setuptools has a notion of an index.  That notion is not at all well
>> defined.
>
> It's mostly operationally defined in terms of what PyPI did when it  
> was written.

Right, not well defined.  :)

I'm not criticizing. What it does was great as a prototype,
but it would be good move beyond this.

>> Currently, the index has linkes that are followed to find package
>> links elsewhere.
>> This seems reasonably useful.  I dunno.  I'm not sure I care.  What I
>> do care
>> about is that the index API should be well defined so that we can
>> implement
>> alternate indexes and alternate tools to read indexes.  I'm not
>> looking to
>> satisfy use cases beyond what we have now.
>
> Sure.  I'm just saying we only need something beyond href="" links  
> if they are intended to be followed by tools looking for package  
> links.
>
> The reason this is necessary, is that it's not sufficient to just  
> follow links that point outside the package index; PyPI has links  
> on its pages that go to other parts of python.org, so there needs  
> to be something that distinguishes "links that might help find  
> downloads".  Links that *are* downloads are detected via URL content.

Right. That's why I think the hrefs we care about should be marked  
with class
attributes or some such.

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Distutils-SIG mailing list