[Distutils] [PATCH] Write distribution meta-data an XML file

Paul Prescod paulp@ActiveState.com
Sat Mar 10 13:56:27 2001


Amos Latteier wrote:
> 
> You make some good points about the DTD. Ultimately I don't
> care what the DTD looks like. The only use case I am
> considering is that of the catalog parsing a meta-data file
> to get information about a distribution. The requirements
> for this are that distutils provide a standard way to read
> and write meta-data to a file, that all distribtions include
> this meta-data file, and that it is safe to read an
> untrusted meta-data file. Do you have other use cases that
> we should consider?

I think that behind the word "standard" we need a more formal list of
what is and isn't required, what is and isn't allowed and so forth. I
don't think that this is a valid meta-data file:

<metadata>
</metadata>

One of my use cases is mirroring the repository and building
sub-repositories based on license. Therefore I would like to see license
be a mandatory tag. Probably you could type <other/> but at least you
will have made a choice (there is a ton of Python code out there with no
clear license at all!).

I would also like "name" to be required (it isn't in distutils). If
someone uploads a file to a catalog with no name,
"UNKNOWN-0.10.2.win32.zip", what are we supposed to do with that?

> To repeat, though, I think the only important decision is
> whether or not to change the distutils meta-data schema.
> From your suggested list of DTDs I gather that you are
> considering changing the meta-data schema. That's fine, but
> if we decide to do that I'd like to know why.

I don't know exactly what you mean when you talk about changing the
metadata schema. If we serialize author as Author, have we changed the
schema? If we serialize author as Creator, have we changed the schema?
In general you need a mapping between the internal form of the
information and the serialized form. As you see above, I would like to
rethink which parts of the metadata are required and optional. So yes, I
guess this implies some internal schema change insofar as I am asking
for the schema to be a little bit more prescriptive.

> BTW, can you summarize what was decided at the conference?

We primarily decided that we needed to come up with an XML format and
that someone would implement a tool that generated the XML after we had
decided on the format. I promised to forward some example formats that
we could use as starting points.
-- 
Python:
    Programming the way
    Guido
    indented it.