r1893 - in van.pydeb/branches/jinty-dh7/debian (dh_pydeb)

jinty-guest at users.alioth.debian.org jinty-guest at users.alioth.debian.org
Tue Dec 1 09:08:58 UTC 2009


    Date: Tuesday, December 1, 2009 @ 09:08:24
  Author: jinty-guest
Revision: 1893

* 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.

Modified:
  van.pydeb/branches/jinty-dh7/debian/dh_pydeb

Modified: van.pydeb/branches/jinty-dh7/debian/dh_pydeb
===================================================================
--- van.pydeb/branches/jinty-dh7/debian/dh_pydeb	2009-11-24 23:02:05 UTC (rev 1892)
+++ van.pydeb/branches/jinty-dh7/debian/dh_pydeb	2009-12-01 09:08:24 UTC (rev 1893)
@@ -2,6 +2,8 @@
 
 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`}
@@ -39,8 +41,20 @@
 	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)
+# 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
@@ -48,20 +62,20 @@
 	    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 'setuptools:Depends=' && van-pydeb depends --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	(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 'setuptools:Provides=' && van-pydeb provides --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	(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 'setuptools:Recommends=' && van-pydeb depends --egg-info ${egg_info} ${recomends_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+		(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 'setuptools:Suggests=' && van-pydeb depends --egg-info ${egg_info} ${suggests_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+		(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 'setuptools:Provides=' && van-pydeb provides --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
-		(echo -n 'setuptools:Depends=' && van-pydeb depends --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
+		(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




More information about the pkg-zope-developers mailing list