[Pythonmac-SIG] Building Packages for PackageManager

Bob Ippolito bob at redivi.com
Fri Aug 1 19:17:18 EDT 2003


On Friday, Aug 1, 2003, at 17:39 America/New_York, Jack Jansen wrote:

>
> On vrijdag, aug 1, 2003, at 18:13 Europe/Amsterdam, Robb Brown wrote:
>
>> First, congratulations to Jack and everyone else on the new version 
>> of MacPython!  Building Python always worked very well on the Mac, 
>> but the installer and PackageManager is a big step forward!
>>
>> I'm interested in creating a VTK package (among other things) for use 
>> with PackageManager.  Is there any documentation on creating >> packages?
>
> Not yet, but let's start with some!
>
> Here's what I would do:
> - Grab the existing database, clear out all packages except one source 
> package. PyObjC or Numeric are fairly run-of-the-mill source packages. 
> You'll find the URL of the standard database via 
> <http://www.python.org/packman>.
> - Fill in your own name and description at the top of the database.
> - Edit that source package to point to the source package you want to 
> build, and change name, version, etc.
> - For now, comment out the md5sum field of the package.
> - Add an include to the main database (see the experimental database 
> for details). This will allow you to depend on packages in there, 
> especially the psuedo-packages like AppleDeveloperTools.
> - Run Package Manager or pimp with your database, and try to download 
> and build from source.
> - If the download worked: run md5sum on the downloaded tarball in 
> /tmp, and fill in the md5sum field.
> - If the build needs more than "python setup.py install": see the way 
> PIL is built for how to do a pre-build step.
> - If the source doesn't build out of the box you have to fix it and 
> create your own modified source distribution.
> - Once building from source worked you start on the binary package. Go 
> to the unpacked directory in /tmp and type "python setup.py 
> bdist_dumb". You binary distribution ends up in the dist directory. 
> Calculate the md5sum and upload to your webserver.
> - Edit the database, duplicate the record for the source distribution. 
> Change type to binary, change the URL, the md5sum and probably the 
> description slightly. Take the dependency on AppleDeveloperTools (and 
> maybe more) out of your dependencies.
> - Zap whatever building the source distribution installed into 
> site-packages. Try to install from binary.
> - Zap again, and try a per-user source install. If it doesn't work: 
> set the SystemWideOnly flag in the database record.
> - Zap again (it's now in ~/Library/Python/2.3/site-packages/) and try 
> a per-user binary install. Again, if it doesn't work set the 
> SystemWideOnly flag in the database record.
>
> When this is all done send an angry mail to the SIG telling me which 
> steps I missed or didn't explain correctly:-) Once you have a skeleton 
> database you could also use Bob's makepimp tool to create new database 
> entries.

So this is what you've been doing for every package?!  Wow.

What I do is download a package, chdir to its folder, make sure it 
builds (if I don't know this already), type makepimp, edit the plist if 
I need to, and then makepimp sync to upload the new plist ;)

I'll have makepimp create a skeleton database and stuff sometime soon.

VTK is significantly more complicated because it has stuff all over the 
place, I don't even think it has a setup.py.

-bob




More information about the Pythonmac-SIG mailing list