Creating packages of python

Magnus Therning magnus at therning.org
Fri Aug 12 07:39:29 UTC 2005


On Thu, Aug 11, 2005 at 11:27:31PM -0400, Eric S. Johansson wrote:
>Magnus Therning wrote:
>>Why isn't distutils appropriate? I've packaged applications using it,
>>it's even quite easy...
>
>I don't want to contaminate the python file hierarchy.  I want my code
>installed "elsewhere".  only modules for general use belong in
>/usr/lib/python*/  applications should have their own lib directory
>etc.

I agree with you on that. However, my impression has always been that
the Python people _don't_ think that and therefore distutils is
perfectly acceptable from a Python point of view. Packaging the SW for
Debian requires moving quite a few files around in the install step.

>>I'd love to take a look at the shell script... can I download your
>>software somewhere?
>
>http://harvee.org/download/raging_dormouse-0.4.15.tar.gz
>
>downloads and installs all of the components needed for camram (hey, I
>didn't name it).  I was going for distribution independence but then I
>found ubuntu and the scales fell from my eyes.
>
>don't laugh too hard please. :-)

Ah. If I understand the buildit.sh script it's actually a
download-configure-build-install script, all rolled into one. One could
also say that the script solves a configuration management problem
(version X of SW A requires version Y of SW B, etc). That sort of
homegrown convenience is nice for people who'd like to install manually,
but it does add some work for the person trying to put together a Debian
package.

AFAIK it's not common to download the source during the building of a
package. You'd have to write quite some specific rules to handle any
patching to the code that's necessary. Exactly how you'd do that when
the build script doesn't separate download, configuration, build and
install is beyond me. There's also a problem with versioning, for the
life time of the Debian package you have to make sure that the exact
releases of each piece is available from a particular location. If you
look at Gentoo that's a problem that they've solved by throwing their
own storage space at it (which BTW means that if you're having problems
finding an old release of some SW then Gentoo is a great place to start
looking :-).

If I would try to package this piece of SW I think I'd start with
repackaging it. Download all pieces, unpack them in sub-directories.
Then I'd add a build system (probably a Makefile :-) that uses the build
systems of the pieces and adds any high-level tasks that need to be
performed. I'd make sure the Makefile separates configuration, build and
install. After verifying that this whole thing works I'd tar the whole
thing together and use this behemoth as a base for my Debian/Ubuntu
packaging.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Increasingly, people seem to misinterpret complexity as sophistication,
which is baffling--the incomprehensible should cause suspicion rather than
admiration.
     -- Niklaus Wirth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050812/c32ecbcd/attachment.sig>


More information about the ubuntu-users mailing list