r1895 - in van.pydeb/trunk/debian (4 files)
jinty-guest at users.alioth.debian.org
jinty-guest at users.alioth.debian.org
Tue Dec 1 09:46:23 UTC 2009
Date: Tuesday, December 1, 2009 @ 09:46:21
Author: jinty-guest
Revision: 1895
Merge from the jinty-dh7 branch:
------------------------------------------------------------------------
r1893 | jinty-guest | 2009-12-01 10:08:24 +0100 (Tue, 01 Dec 2009) | 7 lines
* Change my mind, use pydeb:Depends instead of setuptools:Depends. setuptools
is a bad name now that distribute is involved. These dependencies could also
come from distutils in future as well. Also lumping them into python:Depends is
probably aslo a bad idea as we allow people to leave out pydeb generated
dependencies if they choose to.
* Drop a few comments.
------------------------------------------------------------------------
r1892 | jinty-guest | 2009-11-25 00:02:05 +0100 (Wed, 25 Nov 2009) | 1 line
fix till it works, I hope
------------------------------------------------------------------------
r1888 | jinty-guest | 2009-11-24 18:06:36 +0100 (Tue, 24 Nov 2009) | 4 lines
Integrate with debhelper 7 providing a --with pydeb extension. Behaviour
by default is conservative depending on all dependencies of all extras.
Setuptools extras can be ignored, placed into metapackages or diverted to
the suggests or recommends fields using environment variables.
Added:
van.pydeb/trunk/debian/dh_pydeb
(from rev 1893, van.pydeb/branches/jinty-dh7/debian/dh_pydeb)
van.pydeb/trunk/debian/pydeb.pm
(from rev 1893, van.pydeb/branches/jinty-dh7/debian/pydeb.pm)
Modified:
van.pydeb/trunk/debian/changelog
van.pydeb/trunk/debian/python-van.pydeb.install
Modified: van.pydeb/trunk/debian/changelog
===================================================================
--- van.pydeb/trunk/debian/changelog 2009-12-01 09:27:17 UTC (rev 1894)
+++ van.pydeb/trunk/debian/changelog 2009-12-01 09:46:21 UTC (rev 1895)
@@ -1,3 +1,12 @@
+van.pydeb (1.3.0-3) UNRELEASED; urgency=low
+
+ * Integrate with debhelper 7 providing a --with pydeb extension. Behaviour
+ by default is conservative depending on all dependencies of all extras.
+ Setuptools extras can be ignored, placed into metapackages or diverted to
+ the suggests or recommends fields using environment variables.
+
+ -- Brian Sutherland <brian at vanguardistas.net> Tue, 24 Nov 2009 18:03:21 +0100
+
van.pydeb (1.3.0-2) unstable; urgency=low
* Accomodate differences in the .egg-info directory naming between
Copied: van.pydeb/trunk/debian/dh_pydeb (from rev 1893, van.pydeb/branches/jinty-dh7/debian/dh_pydeb)
===================================================================
--- van.pydeb/trunk/debian/dh_pydeb (rev 0)
+++ van.pydeb/trunk/debian/dh_pydeb 2009-12-01 09:46:21 UTC (rev 1895)
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+set -e
+
+# XXX: This should be written in perl, but the original author only knows python well. Volunteers?
+
+# Figure out what packages to operate on
+echo pydeb: Working on source package ${PYDEB_SRC_PACKAGE:=`dpkg-parsechangelog -c1 -ldebian/changelog | grep 'Source: ' | sed 's/Source: //'`}
+echo pydeb: Working on python distribution ${PYDEB_PY_PACKAGE:=`van-pydeb src_to_py $PYDEB_SRC_PACKAGE`}
+echo pydeb: Working on binary package ${PYDEB_BIN_PACKAGE:=`van-pydeb py_to_bin $PYDEB_PY_PACKAGE`}
+
+# Sanity checks
+if [ `cat debian/control | grep -c "^Package: ${PYDEB_BIN_PACKAGE}$"` == 0 ]; then
+ echo ERROR: Expected binary package ${PYDEB_BIN_PACKAGE} in debian/changelog but did not find it.
+ exit 1
+fi
+
+# Parse environment variables that affect us
+# Extras totally excluded: PYDEB_EXCLUDED_EXTRAS
+for extra in $PYDEB_EXCLUDED_EXTRAS; do
+ excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
+done
+
+# Extras to be made into metapackages: PYDEB_METAPACKAGE_EXTRAS
+for extra in $PYDEB_METAPACKAGE_EXTRAS; do
+ # Don't put dependencies of metapackages on the main package
+ excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
+done
+
+# Extras to be assigned to Recommends: PYDEB_RECOMMENDS_EXTRAS
+for extra in $PYDEB_RECOMMENDS_EXTRAS; do
+ recomends_extras="--extra ${extra} ${recomends_extras}"
+ # exclude recommends dependencies from the main package dependencies
+ excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
+done
+
+# Extras to be assigned to Suggests: PYDEB_SUGGESTS_EXTRAS
+for extra in $PYDEB_SUGGESTS_EXTRAS; do
+ suggests_extras="--extra ${extra} ${suggests_extras}"
+ # exclude recommends dependencies from the main package dependencies
+ excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
+done
+
+# TODO: We need a a way to assign multiple extras to a arbitrarily named metapackage. But a good format for the environment variable to do this escapes me.
+# something like:
+# mymetapackage1: extra1 extra2 mymetapackage2: extra3 extra4
+# mymetapackage1 (extra1 extra2) mymetapackage2 (extra3 extra4)
+# or using one metapackage per line:
+# mymetapackage1: extra1 extra2
+# mymetapackage2: extra3 extra4
+# Not sure...
+
+# Now for the real work
+# XXX - do we really have to run this multiple times? can dependencies ever differ for different python versions?
+# Yes, they can. setup.py is a program and can generate any dependencies depending on the python used to run it.
+# We should make sure we depend on all them, if there's a case that doesn't work like that, probably best would be to manage dependencies by hand
+# rather than modify dh_pydeb
+for pyvers in `pyversions -vr debian/control`; do
+ py_libdir=$(python${pyvers} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+ egg_info=debian/tmp${py_libdir}/${PYDEB_PY_PACKAGE}*.egg-info
+ if [ ! -x ${egg_info} ]; then
+ echo ERROR: could not find package metadata file to work on that matches the pattern ${egg_info}.
+ fi
+ # set dependencies of main package
+ (echo -n 'pydeb:Depends=' && van-pydeb depends --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+ # set provides for the extras included in the main package
+ (echo -n 'pydeb:Provides=' && van-pydeb provides --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+ # if some extras were moved to recomends, include them
+ if [ -n "${recomends_extras}" ]; then
+ (echo -n 'pydeb:Recommends=' && van-pydeb depends --egg-info ${egg_info} ${recomends_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+ fi
+ # if some extras were moved to suggests, include them
+ if [ -n "${suggests_extras}" ]; then
+ (echo -n 'pydeb:Suggests=' && van-pydeb depends --egg-info ${egg_info} ${suggests_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+ fi
+ # setup the dependencies/provides of dependencies moved to metapcakages
+ for extra in $PYDEB_METAPACKAGE_EXTRAS; do
+ (echo -n 'pydeb:Provides=' && van-pydeb provides --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
+ (echo -n 'pydeb:Depends=' && van-pydeb depends --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
+ done
+done
Copied: van.pydeb/trunk/debian/pydeb.pm (from rev 1893, van.pydeb/branches/jinty-dh7/debian/pydeb.pm)
===================================================================
--- van.pydeb/trunk/debian/pydeb.pm (rev 0)
+++ van.pydeb/trunk/debian/pydeb.pm 2009-12-01 09:46:21 UTC (rev 1895)
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+insert_after("dh_auto_install", "dh_pydeb");
+
+1
Modified: van.pydeb/trunk/debian/python-van.pydeb.install
===================================================================
--- van.pydeb/trunk/debian/python-van.pydeb.install 2009-12-01 09:27:17 UTC (rev 1894)
+++ van.pydeb/trunk/debian/python-van.pydeb.install 2009-12-01 09:46:21 UTC (rev 1895)
@@ -1 +1,3 @@
debian/rules_templates usr/share/python-van.pydeb
+debian/pydeb.pm usr/share/perl5/Debian/Debhelper/Sequence
+debian/dh_pydeb usr/bin
More information about the pkg-zope-developers
mailing list