[Distutils] Re: Write distribution meta-data an XML file

Paul Prescod paulp@ActiveState.com
Sat Mar 10 00:58:01 2001


Amos Latteier wrote:
> 
> ...
> 
> 
> This format has the advantages of not requiring that
> meta-data names be legal XML element names. It also does not
> impose any particular meta-data schema. It just requires
> that meta-data consist of a sequence of name, value pairs.

It is kind of verbose and consequently somewhat hard to read. I also
think that defining a schema is one of the central goals. If everyone
chooses their own metadata item names then there is no value in having a
"standard" format. If everyone is supposed to use standard names then
why not use compact, friendly-named element types. That also offers the
possibility of DTD or schema validation, rich editing in XML editors
etc.

> If we adapt an existing format it will probably require
> changing the meta-data schema that the distutils currently
> use. My guess is that unless this buys us compatibility with
> some useful existing system it will not be worth it,
> considering how hard-coded the existing meta-data schema
> seems to be within the distutils code.

There isn't any requirement that the internal names and the XML names be
the same.

> > Programmer's Package Description (PPD) is defined here:
> >
> > http://velocity.activestate.com/docs/ActivePerl/site/lib/XML/PPD.html
> 
> This has some Perl specific stuff. 

There is something called "PERLCORE" (which isn't used in practice). We
would replace it with PYTHONCORE if we decided to use it.

> ...
> Meta-data schemas seem to be a contentious issue. I don't
> have any stong feelings on the matter. I just want to make
> meta-data easily available outside setup.py.

I feel the same way but I think we want to do it in a way that feels
natural as XML. Your model is really distutils metadata rendered as RFC:
822 which is in turn rendered as XML. And even if you were going to
render 822 as XML, it would be more traditional to use name and value
attributes and reduce the file size...

Your model might be better for proprietary extensions TO the metadata
format.

<package>
 <author>..</author>
 <version>...</version>
 <extra-metadata name=".." value=".."/>
</package>

-- 
Python:
    Programming the way
    Guido
    indented it.