[Zope3-dev] More thoughts on packaging

Jim Fulton jim at zope.com
Fri Feb 13 17:18:55 EST 2004


Phillip J. Eby wrote:
> At 01:30 PM 2/13/04 -0500, Jim Fulton wrote:
> 
>> There seems to be a possible consensus emerging that we should
>> use a packaging system.  I suggest that we should use an existing
>> system (or systems) such as RPM or the debian system and
>> provide the ability to generate course-grained distributions
>> from these systems for those systems (e.g. windows) that either
>> don't have package systems or don't have package systems that
>> we support.
> 
> 
> I haven't been following the packaging discussion that closely, so I may 
> be projecting the following from a different set of requirements in mind 
> than what you have.  So, apologies in advance if this is completely 
> off-base from where you're heading...

I'd say that you are on target.

> Suppose that we put dependency metadata in package directories as an 
> extra file, and then we wrote a 'package.py' script that generates a 
> custom 'setup.py' from the metadata, based on an intended target.  E.g. 
> 'package.py sometarget'.
> 
> Advantages:
> 
> * Leverages distutils packaging system support, since you can build 
> Windows .exes, RPMs, source tarballs, etc.
> 
> * Takes advantage of any future distutils support for additional 
> packaging systems
> 
> * Keeps the metadata lightweight and focused on Zope-specific needs
> 
> * Doesn't require anyone to learn another "full" packaging system

Yup.

I thnink that dependencies are one central issue that is going
to be critical if we do fine-grained  packaging.

> 
> Disadvantages:
> 
> * Has to be written (but is relatively lightweight)
> 
> 
> The metadata could actually be provided in the form of a Python module 
> (e.g. '__setup__.py')  that defines any extensions, datafiles, etc., as 
> well as "provides" and "requires" keys.

"provides" and "requires"?  I assume that "requires" expresses the
dependencies.  What is "provides" for?

> The 'package.py' script would write a 'setup.py' script that would look 
> something like:
> 
> execfile('setupstuff/prologue.py')
> 
> gatherSetup('src/some/pkg1/__setup__.py')
> gatherSetup('src/other/something/__setup__.py')

why 2 gather setups? Is this for a distribution package that
includes 2 Python packages?

> # ... etc, etc.
> 
> execfile('setupstuff/epilogue.py')
> 
> Based on sorting out the dependencies.  'epilogue' would then call the 
> distutils 'setup' function with the accumulated data.

How does it sort out the dependencies?  Does it retrieve other packages?
Does it assume that they are around and just need to be installed?

(Getting into this level of detail might be premature.)

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 Zope3-dev mailing list