[Zope3-dev] More thoughts on packaging

Fred Drake fred at zope.com
Tue Feb 17 17:04:49 EST 2004


On Monday 16 February 2004 05:04 pm, Jeremy Hylton wrote:
 > I haven't noticed any problems using ZODB3's setup.py to hold metadata.
 > Did you have specific issues in mind?  Perhaps the metadata that is
 > currently in setup.py isn't that interesting -- a URL, email address,
 > description, and version number.

I thought I'd addressed this last week.  Specifically, when I make a change 
to a package that's included in several distributions (such as ZConfig), I 
need to change the setup.py for each distribution.  It's not that I need to 
change setup.py for ZODB, but that I need to change setup.py for ZODB, Zope 
2, Zope 3, and StandaloneZConfig.

 > Several people have griped about having to put metadata in a Python
 > script.  I think they confusing policy and mechanism.  If a distutils

Perhaps.  Using Python as a metadata language doesn't bode well, because it 
means we haven't defined the needed metadata carefully enough to express it 
in a more limited language.

 > command needs metadata to operate, it must be passed to the setup()
 > call.  There's no requirement that the data passed to it be stored in a
 > script called setup.py or in any Python script.  You could put the
 > metadata in a file and write a helper routine that loads metadata to be

And we end up with a similar situation of a 40-line boilerplate setup.py 
with just the code that all our setup.py scripts need to have updated when 
it changes.  Better than the current situation, but still tedious.

 > passed to setup.  (I'm not sure what the file format would be.  If I
 > have to write it by hand and my choices are Python and XML, I'll stick
 > with Python.)

I wouldn't choose either; something closer to plain text is best.  But I 
would choose XML over Python because XML can't be mistaken for a 
programming language, and Python is one.

Some sort of wrapper tool that generates setup.py, or actual improvements to 
distutils, seem like the reasonable possible approaches.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation




More information about the Zope3-dev mailing list