Side Channel

  • home
  • resources
Home › Blogs › kamal's blog

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password

Navigation

  • Books
  • Feed aggregator

Recent blog posts

  • Ubuntu mirrors up and improved!
  • Google-jstemplate: Iterate object with unknown properties
  • nginx https proxypass for php apps
  • sugarcrm & memcache: Doing it Wrong
  • subversion and https in Ubuntu Karmic
  • Drupal: Views block delta converted to md5 hash
  • Ubuntu Server install requires PAE
  • Installing Drupal from command line
  • Drupal: Handling form field weight through CCK
  • minify javascript using Google Closure Compiler
more

angch's location

angch twitter

  • angch: Heading to Brunei. Business class for a change.
more

Build Debian package for Python modules

kamal's picture

kamal — Fri, 14/08/2009 - 10:20

Just a note for future references. Tools to build Debian package for Python modules:-

  • Stdeb - http://github.com/astraw/stdeb/tree/master

Stdeb is not in Ubuntu Hardy repo so we need to build a package for itself first. Chicken and egg problem but just follow the instruction on the page, it works well.

# in the stdeb distribution directory (with setup.py)
python setup.py sdist
python setup.py build
PYTHONPATH="build/lib" python stdeb/py2dsc.py dist/stdeb-VERSION.tar.gz

I want to try hgsvn actually so let's build the package except that it failed complaining about setuptools-0.6c8. It want setuptools-0.6c9 but that's only under Intrepid. Can't find any backport or ppa. Searching around, this page explain how to build (backport) from Intrepid's source package.

$ vim /etc/apt/sources.list

Add this line to the end:
deb-src http://us.archive.ubuntu.com/ubuntu/ \
    hardy main restricted universe multiverse
Save and exit.

$ sudo apt-get update
$ sudo apt-get build-dep python-setuptools
$ fakeroot apt-get source -b python-setuptools
$ sudo dpkg -i python-setuptools_0.6c9-0ubuntu1_all.deb

It still complain about python-pkg-resources using the old version so just repeat the above step to build a package for python-pkg-resources. Now pulling up the svn repo into mercurial.

  • debian
  • package
  • python
  • ubuntu
  • kamal's blog
  • Add new comment


Creative Commons License

  • home
  • resources

Standard Disclaimer.