diff -u babel-1.2.0.dfsg/debian/changelog babel-1.2.0.dfsg/debian/changelog --- babel-1.2.0.dfsg/debian/changelog +++ babel-1.2.0.dfsg/debian/changelog @@ -1,3 +1,9 @@ +babel (1.2.0.dfsg-2.1) unstable; urgency=low + + * Build for all supported python versions. + + -- Matthias Klose Tue, 29 Apr 2008 06:53:43 +0200 + babel (1.2.0.dfsg-2) unstable; urgency=low * Changed from python 2.4 to current (closes: #476236). diff -u babel-1.2.0.dfsg/debian/control babel-1.2.0.dfsg/debian/control --- babel-1.2.0.dfsg/debian/control +++ babel-1.2.0.dfsg/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 4.1.67), gfortran, java-gcj-compat | java1-runtime, java-gcj-compat-dev, python-all-dev, python-numeric, python-central, libltdl3-dev, fastjar, gjdoc, libxerces2-java, libgetopt-java, libxalan2-java, libxml2-dev Build-Conflicts: libparsifal-dev Build-Depends-Indep: libhtml-tree-perl -XS-Python-Version: current +XS-Python-Version: all Homepage: https://computation.llnl.gov/casc/components/babel.html Package: babel-1.2.0 @@ -54,6 +54,7 @@ Architecture: any Section: python Depends: python-numeric, ${python:Depends}, ${shlibs:Depends} +XB-Python-Version: ${python:Versions} Description: Scientific Interface Definition Language (SIDL) Python runtime Babel is a compiler for the Scientific Interface Definition Language (SIDL), currently under development as a support tool for parallel simulation codes. diff -u babel-1.2.0.dfsg/debian/rules babel-1.2.0.dfsg/debian/rules --- babel-1.2.0.dfsg/debian/rules +++ babel-1.2.0.dfsg/debian/rules @@ -9,6 +9,7 @@ patch -p1 < debian/babel-jardir.patch patch -p1 < debian/babel-javajars.patch patch -p1 < debian/babel-rpath.patch + patch -p1 < debian/babel-python-noinplace.patch touch $@ stamp-configure: stamp-patch @@ -17,25 +18,50 @@ PYTHON=python ./configure --prefix=/usr touch $@ -build: stamp-configure +PYVER := $(shell pyversions -vd) +PYOTHERS := $(filter-out $(PYVER), $(shell pyversions -vr)) + +build: stamp-build $(PYOTHERS:%=stamp-build-python%) +stamp-build: stamp-configure dh_testdir $(MAKE) touch $@ +stamp-build-python%: stamp-build + dh_testdir + rm -f runtime/python/babel-stamp + $(MAKE) -C runtime python/babel-stamp \ + PYTHON=python$* \ + PYTHONINC="-I/usr/include/python$* -I/usr/lib/python$*/site-packages/numpy/core/include/numpy" \ + PYTHONLIB=/usr/lib/python$* \ + PYTHON_SHARED_LIBRARY=/usr/lib/libpython$*.so \ + PYTHON_VERSION=$* \ + WHICH_PYTHON=/usr/bin/python$* + rm -f runtime/python/babel-stamp2 + $(MAKE) -C runtime python/babel-stamp2 \ + PYTHON=python$* \ + PYTHONINC="-I/usr/include/python$* -I/usr/lib/python$*/site-packages/numpy/core/include/numpy" \ + PYTHONLIB=/usr/lib/python$* \ + PYTHON_SHARED_LIBRARY=/usr/lib/libpython$*.so \ + PYTHON_VERSION=$* \ + WHICH_PYTHON=/usr/bin/python$* + touch $@ + clean: dh_testdir if [ -e stamp-patch ]; then \ + patch -p1 -R < debian/babel-python-noinplace.patch; \ patch -p1 -R < debian/babel-rpath.patch; \ patch -p1 -R < debian/babel-javajars.patch; \ patch -p1 -R < debian/babel-jardir.patch; \ patch -p1 -R < debian/babel-javadoc-extra.patch; \ fi - rm -f stamp-patch stamp-configure build + rm -f stamp-patch stamp-configure stamp-build* if [ -e Makefile ]; then $(MAKE) distclean; fi rm -f lib/babel*.jar lib/sidl*.jar debian/babel120.1 dh_clean -install: build +install: build $(PYOTHERS:%=install-python%) $(MAKE) install prefix=`pwd`/debian/tmp/usr mv debian/tmp/usr/bin/babel debian/tmp/usr/bin/babel120 mv debian/tmp/usr/share/doc/babel-1.2.0 debian/tmp/usr/share/doc/babel-doc @@ -44,6 +70,15 @@ mv debian/tmp/usr/share/sidlx.sidl debian/tmp/usr/share/babel-1.2.0/ mv debian/tmp/usr/share/sgml debian/tmp/usr/share/babel-1.2.0/ +install-python%: + $(MAKE) -C runtime install-data-am-python prefix=`pwd`/debian/tmp/usr \ + PYTHON=python$* \ + PYTHONINC="-I/usr/include/python$* -I/usr/lib/python$*/site-packages/numpy/core/include/numpy" \ + PYTHONLIB=/usr/lib/python$* \ + PYTHON_SHARED_LIBRARY=/usr/lib/libpython$*.so \ + PYTHON_VERSION=$* \ + WHICH_PYTHON=/usr/bin/python$* + binary-indep: install dh_testdir -i dh_testroot -i only in patch2: unchanged: --- babel-1.2.0.dfsg.orig/debian/babel-python-noinplace.patch +++ babel-1.2.0.dfsg/debian/babel-python-noinplace.patch @@ -0,0 +1,76 @@ +--- ./runtime/Makefile.am~ 2008-04-29 07:35:29.000000000 +0200 ++++ ./runtime/Makefile.am 2008-04-29 12:47:48.000000000 +0200 +@@ -391,15 +391,13 @@ + --include-dirs=../sidl --include-dirs=../config \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ $(PYTHON_SETUP_ARGS) build_ext; \ + $(PYTHON) setup.py --library-dirs=../sidl/.libs \ + --library-dirs=../libparsifal/src/.libs \ + --include-dirs=../sidl --include-dirs=../config \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ $(PYTHON_SETUP_ARGS) build_ext; \ + fi + touch python/babel-stamp + +@@ -424,15 +422,13 @@ + --include-dirs=$(srcdir)/sidl --include-dirs=../sidl \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext; \ + $(PYTHON) setup.py --library-dirs=../sidl/.libs \ + --library-dirs=../libparsifal/src/.libs \ + --include-dirs=$(srcdir)/sidl --include-dirs=../sidl \ + $(LIBPARSIFAL_PYSETUP) \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ +- --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext; \ + fi + touch python/babel-stamp2 + +--- ./runtime/Makefile.in~ 2008-04-29 07:35:29.000000000 +0200 ++++ ./runtime/Makefile.in 2008-04-29 12:48:18.000000000 +0200 +@@ -1122,15 +1122,13 @@ + --include-dirs=../sidl --include-dirs=../config \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ $(PYTHON_SETUP_ARGS) build_ext; \ + $(PYTHON) setup.py --library-dirs=../sidl/.libs \ + --library-dirs=../libparsifal/src/.libs \ + --include-dirs=../sidl --include-dirs=../config \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ $(PYTHON_SETUP_ARGS) build_ext; \ + fi + touch python/babel-stamp + +@@ -1155,15 +1153,13 @@ + --include-dirs=$(srcdir)/sidl --include-dirs=../sidl \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ + $(LIBPARSIFAL_PYSETUP) \ +- --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext; \ + $(PYTHON) setup.py --library-dirs=../sidl/.libs \ + --library-dirs=../libparsifal/src/.libs \ + --include-dirs=$(srcdir)/sidl --include-dirs=../sidl \ + $(LIBPARSIFAL_PYSETUP) \ + `echo $(PYTHONINC) | sed -e 's/-I/--include-dirs=/g'` \ +- --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext \ +- --inplace; \ ++ --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext; \ + fi + touch python/babel-stamp2 +