[socal-piggies] Packaging Dippy

jathan. jathan at gmail.com
Sun May 2 11:01:15 PDT 2010

On Sat, May 1, 2010 at 9:14 PM, C. Titus Brown <ctb at msu.edu> wrote:
> On Sat, May 01, 2010 at 09:10:53PM -0700, Dan Stromberg wrote:
> > On 05/01/2010 06:53 PM, C. Titus Brown wrote:
> >> On Sat, May 01, 2010 at 11:20:37AM -0700, jathan. wrote:
> >>
> >>> Setuptools or distutils are easiest, because they put the power of how the
> >>> package is to be installed in the hands of the installer (egg, sdist, RPM,
> >>> easy_install, etc). Setuptools is newer and has a few more little perks, but
> >>> distutils will get the job done.
> >>>
> >>> Both also allow you to upload your package directly to PyPI as well, which
> >>> is very convenient.
> >>>
> >>> Your best bet is to just copy the setup.py from another dist and see how
> >>> they've done it.  Here's the setup.py from one of my small projects as a
> >>> simple example:
> >>>
> >>> http://bitbucket.org/jathanism/cidrize/src/tip/setup.py
> >>>
> >> http://guide.python-distribute.org/
> >
> > This is a nice looking URL, but I was a bit disappointed to see that it
> > doesn't appear to address packing into rpm's and deb's.
> >
> > I've created rpm's and an msi the hard way before, and done pypi via
> > setup.py - but is there a python-specific (or for that matter, a generic
> > tool that knows the python specifics anyway) tool that will do pypi and
> > rpm's and deb's and msi's from the same package description data?
> Yes, this will work for RPMs - see the 'bdist_rpm' command.  Not sure about
> debian, doesn't seem to be in the python docs.  If you find something, can you
> report back to me, if not the list?  This might be useful:
> http://ghantoos.org/2008/10/19/creating-a-deb-package-from-a-python-setuppy/
> Good catch on the omission.  I will mention it to Tarek.

You can also roll your own custom commands such as "bdist_dpkg",
although there's a lot of overhead to do Debian binary package builds.

A little search turned up this[1], but it doesn't look like it's been
updated in very long time. Debian source packages are a little
simpler, and there's an app[2] for that!

  [1]: http://svn.python.org/projects/sandbox/trunk/Lib/bdist_dpkg.py
  [2]: http://pypi.python.org/pypi/stdeb


More information about the socal-piggies mailing list