By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

Python / Debian package dependencies

P: n/a
Hi all,

I am trying to build a debian package for my python modules using
stdeb and dpkg-buildpackage. The package building itself works, I also
managed to have an entry point created and I can use my python modules
on the Ubuntu virtual machine I use to test the package.

The problem is that my modules require the psycopg2 python package and
the entry point seems to require setuptools.
I can't figure out how to declare a dependency that actually results
in the dependency Debian packages being installed.
I tried adding these lines to setup.py:

requires = ['psycopg2', 'setuptools'],
requires = ['psycopg2 (>=0.1)', 'setuptools (>=0.1)'],
install_requires = ['psycopg2', 'setuptools'],
install_requires = ['psycopg2>=0.1', 'setuptools>=0.1'],

and then run stdeb_run_setup and dpkg-buildpackage -rfakeroot -uc -us
in the deb_dist/<package namefolder created, but when I copy the
..deb file over to the virtual machine and do dpkg -i <.deb file>, none
of them would actually install psycopg2 and setuptools.

What am I doing wrong ? Am I actually somewhat on the right track or
am I doing complete nonsense ?

Thanks for your help!

Cheers,

Steve
Nov 20 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 20 Nov, 02:14, "Steven Samuel Cole" <steven.samuel.c...@gmail.com>
wrote:
>
I am trying to build a debian package for my python modules using
stdeb and dpkg-buildpackage. The package building itself works, I also
managed to have an entry point created and I can use my python modules
on the Ubuntu virtual machine I use to test the package.

The problem is that my modules require the psycopg2 python package and
the entry point seems to require setuptools.
Are you saying that psycopg2 needs setuptools for the setup.py script
to work? This isn't generally the case (or wasn't), but maybe the
"entry point" is a setuptools thing which would then demand that
software's presence.
I can't figure out how to declare a dependency that actually results
in the dependency Debian packages being installed.
I tried adding these lines to setup.py:

requires = ['psycopg2', 'setuptools'],
requires = ['psycopg2 (>=0.1)', 'setuptools (>=0.1)'],
install_requires = ['psycopg2', 'setuptools'],
install_requires = ['psycopg2>=0.1', 'setuptools>=0.1'],
How does stdeb know which package provides psycopg2? I'm not really
familiar with stdeb - I write my own packaging files - but might it be
the case that you need to specify python-psycopg2 instead?

Paul
Nov 20 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.