From 35695ec05670c2fa41dcde1ab7f38b08babe5c8e Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Wed, 24 Nov 2004 10:00:25 +0000 Subject: automatically determine python dependency for new pytho... Author: rmurray Date: 2002-01-08 07:28:48 GMT automatically determine python dependency for new python policy install a copyright, and /usr/doc links --- debian/control | 2 +- debian/python-dep | 3 +++ debian/rules | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 debian/python-dep diff --git a/debian/control b/debian/control index 32c3a6c6..771c90d2 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper, libapt-pkg-dev, python-dev Package: python-apt Architecture: any -Depends: ${shlibs:Depends} +Depends: ${python:Depends}, ${shlibs:Depends} Priority: optional Description: Python interface to libapt-pkg The apt-pkg Python interface will provide full access to the internal diff --git a/debian/python-dep b/debian/python-dep new file mode 100644 index 00000000..27ca72ff --- /dev/null +++ b/debian/python-dep @@ -0,0 +1,3 @@ +import sys; + +print "python:Depends=python (>= %s), python (<< %s)" % (sys.version[:3],float(sys.version[:3])+0.1) diff --git a/debian/rules b/debian/rules index 41c3d63a..ecc8b9ee 100755 --- a/debian/rules +++ b/debian/rules @@ -6,8 +6,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -#PYTHON=/usr/bin/python2.1 -PYTHON=python +PYTHON=/usr/bin/python build: build-stamp build-stamp: @@ -38,8 +37,9 @@ binary-arch: build dh_clean -k $(PYTHON) setup.py install --prefix=`pwd`/debian/tmp/usr + cp COPYING.GPL debian/copyright -# dh_installdocs README + dh_installdocs # Hooks for doc-base. doc-base doesn't support `pdf' yet, # therefore this is still disabled. ##XX install -d `pwd`/debian/tmp/usr/share/doc-base @@ -56,6 +56,7 @@ binary-arch: build dh_fixperms dh_installdeb dh_shlibdeps + $(PYTHON) debian/python-dep >> debian/substvars dh_gencontrol # dh_makeshlibs dh_md5sums -- cgit v1.2.3