[Python-modules-commits] r20827 - in packages/numpy/trunk/debian (changelog control rules)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sat Mar 17 12:05:27 UTC 2012


    Date: Saturday, March 17, 2012 @ 12:05:23
  Author: morph
Revision: 20827

Small fixes for python3 packaging

Modified:
  packages/numpy/trunk/debian/changelog
  packages/numpy/trunk/debian/control
  packages/numpy/trunk/debian/rules

Modified: packages/numpy/trunk/debian/changelog
===================================================================
--- packages/numpy/trunk/debian/changelog	2012-03-17 10:57:12 UTC (rev 20826)
+++ packages/numpy/trunk/debian/changelog	2012-03-17 12:05:23 UTC (rev 20827)
@@ -3,8 +3,11 @@
   [ Thomas Kluyver ]
   * Add package for Python 3; Closes: #601593
 
- -- Sandro Tosi <morph at debian.org>  Fri, 16 Mar 2012 23:12:56 +0100
+  [ Sandro Tosi ]
+  * Small fixes for python3 packaging
 
+ -- Sandro Tosi <morph at debian.org>  Sat, 17 Mar 2012 12:57:06 +0100
+
 python-numpy (1:1.6.1-5) experimental; urgency=low
 
   * debian/versions

Modified: packages/numpy/trunk/debian/control
===================================================================
--- packages/numpy/trunk/debian/control	2012-03-17 10:57:12 UTC (rev 20826)
+++ packages/numpy/trunk/debian/control	2012-03-17 12:05:23 UTC (rev 20827)
@@ -4,7 +4,8 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Sandro Tosi <morph at debian.org>
 Build-Depends: python-all-dev, python-all-dbg, python-support (>= 1), gfortran (>= 4:4.2), libblas-dev [!arm !m68k], liblapack-dev [!arm !m68k], debhelper (>= 7.0.50~), patchutils, python-docutils, quilt, python-sphinx (>= 1.0.7+dfsg), python-matplotlib, python-nose, python3-all-dev, python3-all-dbg, python3-nose
-XS-Python-Version: >= 2.4
+X-Python-Version: >= 2.4
+X-Python3-Version: >= 3.0
 Standards-Version: 3.9.2
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/numpy/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/numpy/trunk/

Modified: packages/numpy/trunk/debian/rules
===================================================================
--- packages/numpy/trunk/debian/rules	2012-03-17 10:57:12 UTC (rev 20826)
+++ packages/numpy/trunk/debian/rules	2012-03-17 12:05:23 UTC (rev 20827)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
-PYVERS=$(shell pyversions -vr debian/control) $(shell py3versions -vr debian/control)
-PYTHON3=$(shell py3versions -vr)
+PY2VERS=$(shell pyversions -vr debian/control)
+PY3VERS=$(shell py3versions -vr)
 PYDEF=$(shell pyversions -dv)
 PYLIBPATH := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib")
 
@@ -15,7 +15,7 @@
 
 override_dh_auto_build:
 	dh_auto_build
-	for v in $(PYTHON3); do \
+	for v in $(PY3VERS); do \
 		python$$v setup.py build; \
 		python$$v-dbg setup.py build; \
 	done
@@ -29,15 +29,19 @@
 override_dh_installman:
 	dh_installman numpy/f2py/f2py.1
 	# link manpage for versioned and dbg incarnations of f2py
-	for v in $(PYVERS); do \
+	for v in $(PY2VERS); do \
 		dh_link /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v.1.gz; \
 		dh_link -ppython-numpy-dbg /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v-dbg.1.gz; \
 	done
+	for v in $(PY3VERS); do \
+		dh_link -ppython3-numpy /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v.1.gz; \
+		dh_link -ppython3-numpy-dbg /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v-dbg.1.gz; \
+	done
 	dh_link -ppython-numpy-dbg /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py-dbg.1.gz;
 
 override_dh_install:
 	# add shebang information to f2py script
-	for v in $(PYVERS); do \
+	for v in $(PY2VERS) $(PY3VERS); do \
 		sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$v," debian/tmp/usr/bin/f2py$$v; \
 		cp -a debian/tmp/usr/bin/f2py$$v debian/tmp/usr/bin/f2py$$v-dbg ; \
 		sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$v-dbg," debian/tmp/usr/bin/f2py$$v-dbg; \
@@ -59,20 +63,33 @@
 	find $(CURDIR)/debian/python-numpy/ -name "*_d.so" -delete
 
 	# create symlinks for .h files
-	for i in $(PYVERS); do \
+	for i in $(PY2VERS); do \
 	[ -d $(CURDIR)/debian/python-numpy/usr/include/python$$i ] || \
 		mkdir -p $(CURDIR)/debian/python-numpy/usr/include/python$$i; \
 		dh_link usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$$i/numpy; \
 	done
-	for i in $(PYVERS); do \
+	for i in $(PY2VERS); do \
 	[ -d $(CURDIR)/debian/python-numpy/usr/include/python$${i}_d ] || \
 		mkdir -p $(CURDIR)/debian/python-numpy/usr/include/python$${i}_d; \
 		dh_link usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$${i}_d/numpy; \
 	done
+	# Python 3
+	for i in $(PY3VERS); do \
+	[ -d $(CURDIR)/debian/python3-numpy/usr/include/python$$i ] || \
+		mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$$i; \
+		dh_link -ppython3-numpy usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$$i/numpy; \
+	done
+	for i in $(PY3VERS); do \
+	[ -d $(CURDIR)/debian/python3-numpy/usr/include/python$${i}_d ] || \
+		mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$${i}_d; \
+		dh_link -ppython3-numpy usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$${i}_d/numpy; \
+	done
 
 	# share -dbg and normal package doc dirs
 	rm -rf debian/python-numpy-dbg/usr/share/doc/python-numpy-dbg
-	dh_link usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg
+	dh_link -ppython-numpy-dbg usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg
+	rm -rf debian/python3-numpy-dbg/usr/share/doc/python3-numpy-dbg
+	dh_link -ppython3-numpy-dbg usr/share/doc/python3-numpy usr/share/doc/python3-numpy-dbg
 
 override_dh_gencontrol:
 	python debian/versions.helper >> debian/python-numpy.substvars
@@ -139,7 +156,7 @@
 	dh_auto_install
 	
 	# Install for Python 3
-	for v in $(PYTHON3); do \
+	for v in $(PY3VERS); do \
 		python$$v setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
 		python$$v-dbg setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
 	done
@@ -149,8 +166,13 @@
 	# source directory, so we need to mess with the import order so to
 	# select the code in the installation path
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	-for v in $(PYVERS) ; do \
+	-for v in $(PY2VERS) ; do \
 		python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \
 		python$$v-dbg -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \
 	done
+	# Python 3.2 maps to python3/ dir alone? bah
+	-for v in $(PY3VERS) ; do \
+		python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
+		python$$v-dbg -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
+	done
 endif




More information about the Python-modules-commits mailing list