Re: Deplyoing Pylons applications as Debian packages?
Piotr,
On Monday 05 March 2007 21:49, Piotr Ozarowski wrote:
> Piotr Ozarowski wrote:
> > # creating new Pylons app.
> > $ paster create --template=pylons helloworld
> >
> > # creating Egg (f.e. for Windows users)
> > $ python setup.py bdist_egg # will create an Egg in dist dir
> >
> > # creating debian package
> > $ zcat ../helloworld_0.0.0dev-1.diff.gz | patch -p1 # see attachment
> > $ debuild
>
> and (as promised on #debian-python) here's pure debhelper version
>
> (init.d script is still missing)
>
> To Pylons ML readers: here's CDBS one:
> http://lists.debian.org/debian-python/2007/03/bin00000.bin
>
> If you're using pkg_resources(), add python-setuptools to Depends:
> (and other used dependencies, like: python-elixir, python-mako, ...)
Thanks for sharing your thoughts. This is very close to what I had in mind
but didn't know how to do it exactly. Creating a simple (native) Debian
package from an egg file is a good way to make Debian's package
maintenance system know about the Pylons application. Your patch creates a
working Debian package already. And there are two things I intend to do in
the next days:
- create a script that debianizes a Pylons project (similar to dh_make)
trying to create proper dependencies, an init.d script etc.
- write an article on how to deploy Pylons projects as Debian packages
(currently working on)
Of course a Debian package has the drawback that you need root permissions
to install the package. Then again a user can probably just take the *.egg
file and put it into their $PYTHONPATH to run it with user permissions.
But installing anything using easy_install - and be it just
into /usr/local - is chaotic and hard to control. easy_install cannot even
remove software properly. So I don't think I would want anything than a
binary deb package on my system. Just as a side note to Shannon Behrens
who said "We're on Ubuntu, and we just use eggs." If you really just
install eggs instead of proper binary packages then your Ubuntu package
management will get into trouble in no time. (For those not familiar with
it: Ubuntu is a sister project of Debian and uses the same package
format.)
Christoph
--
When you do things right people won't be sure you've done anything at all.
Reply to: