[Python-modules-commits] r13916 - in packages/numpy/trunk/debian (8 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Mon Jul 12 18:25:57 UTC 2010


    Date: Monday, July 12, 2010 @ 18:25:53
  Author: morph
Revision: 13916

* debian/{compat, control, rules, *.install, *.doc}
  - switch from cdbs to dh7

Added:
  packages/numpy/trunk/debian/python-numpy-dbg.install
  packages/numpy/trunk/debian/python-numpy-doc.install
  packages/numpy/trunk/debian/python-numpy.docs
Modified:
  packages/numpy/trunk/debian/changelog
  packages/numpy/trunk/debian/compat
  packages/numpy/trunk/debian/control
  packages/numpy/trunk/debian/python-numpy.install
  packages/numpy/trunk/debian/rules

Modified: packages/numpy/trunk/debian/changelog
===================================================================
--- packages/numpy/trunk/debian/changelog	2010-07-12 18:24:19 UTC (rev 13915)
+++ packages/numpy/trunk/debian/changelog	2010-07-12 18:25:53 UTC (rev 13916)
@@ -27,6 +27,8 @@
     - added installation for 'compat', 'matrixlib' and 'polynomial' submodules
   * debian/patches/07_bts585309_string_exceptions.diff
     - added upstream patch (r8463) to remove string exceptions; Closes: #585309
+  * debian/{compat, control, rules, *.install, *.doc}
+    - switch from cdbs to dh7
 
   [ Piotr Ożarowski ]
   * debian/control: add XB-Python-Version to python-numpy-dbg package
@@ -46,7 +48,7 @@
   * Use setup.py install --install-layout; specifying --prefix installs
     into the wrong location.
 
- -- Sandro Tosi <morph at debian.org>  Wed, 07 Jul 2010 20:17:40 +0200
+ -- Sandro Tosi <morph at debian.org>  Mon, 12 Jul 2010 19:53:01 +0200
 
 python-numpy (1:1.3.0-3) unstable; urgency=low
 

Modified: packages/numpy/trunk/debian/compat
===================================================================
--- packages/numpy/trunk/debian/compat	2010-07-12 18:24:19 UTC (rev 13915)
+++ packages/numpy/trunk/debian/compat	2010-07-12 18:25:53 UTC (rev 13916)
@@ -1 +1 @@
-5
+7

Modified: packages/numpy/trunk/debian/control
===================================================================
--- packages/numpy/trunk/debian/control	2010-07-12 18:24:19 UTC (rev 13915)
+++ packages/numpy/trunk/debian/control	2010-07-12 18:25:53 UTC (rev 13916)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Alexandre Fayolle <afayolle at debian.org>, José Fonseca <j_r_fonseca at yahoo.co.uk>, Matthias Klose <doko at debian.org>, Ondrej Certik <ondrej at certik.cz>, David Cournapeau <cournape at gmail.com>, Sandro Tosi <morph at debian.org>
-Build-Depends: cdbs (>= 0.4.43), python-all-dev, python-all-dbg, python-central (>= 0.6), gfortran (>= 4:4.2), libblas-dev [!arm !m68k], liblapack-dev [!arm !m68k], debhelper (>= 5.0.38), patchutils, python-docutils, quilt, python-sphinx, python-matplotlib
+Build-Depends: python-all-dev, python-all-dbg, python-central (>= 0.6), gfortran (>= 4:4.2), libblas-dev [!arm !m68k], liblapack-dev [!arm !m68k], debhelper (>= 7.0.50~), patchutils, python-docutils, quilt, python-sphinx, python-matplotlib
 XS-Python-Version: >= 2.4
 Standards-Version: 3.9.0
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/numpy/trunk

Added: packages/numpy/trunk/debian/python-numpy-dbg.install
===================================================================
--- packages/numpy/trunk/debian/python-numpy-dbg.install	                        (rev 0)
+++ packages/numpy/trunk/debian/python-numpy-dbg.install	2010-07-12 18:25:53 UTC (rev 13916)
@@ -0,0 +1 @@
+usr/lib/python*/*-packages/*/*/*_d.so

Added: packages/numpy/trunk/debian/python-numpy-doc.install
===================================================================
--- packages/numpy/trunk/debian/python-numpy-doc.install	                        (rev 0)
+++ packages/numpy/trunk/debian/python-numpy-doc.install	2010-07-12 18:25:53 UTC (rev 13916)
@@ -0,0 +1,4 @@
+numpy/doc/*.py /usr/share/doc/python-numpy-doc/
+doc/build/html /usr/share/doc/python-numpy-doc/
+numpy/f2py/docs/usersguide/index.html /usr/share/doc/python-numpy-doc/f2py/
+/numpy/f2py/docs/* /usr/share/doc/python-numpy-doc/f2py/

Added: packages/numpy/trunk/debian/python-numpy.docs
===================================================================
--- packages/numpy/trunk/debian/python-numpy.docs	                        (rev 0)
+++ packages/numpy/trunk/debian/python-numpy.docs	2010-07-12 18:25:53 UTC (rev 13916)
@@ -0,0 +1 @@
+DEV_README.txt THANKS.txt

Modified: packages/numpy/trunk/debian/python-numpy.install
===================================================================
--- packages/numpy/trunk/debian/python-numpy.install	2010-07-12 18:24:19 UTC (rev 13915)
+++ packages/numpy/trunk/debian/python-numpy.install	2010-07-12 18:25:53 UTC (rev 13916)
@@ -1,3 +1,5 @@
+usr/lib/python*/*-packages/*/*/*[!_][!_].so
+usr/lib/python*/*-packages/*/*.py
 usr/lib/python*/*-packages/*.egg-info
 usr/lib/python*/*-packages/numpy/*.py
 usr/lib/python*/*-packages/numpy/compat/

Modified: packages/numpy/trunk/debian/rules
===================================================================
--- packages/numpy/trunk/debian/rules	2010-07-12 18:24:19 UTC (rev 13915)
+++ packages/numpy/trunk/debian/rules	2010-07-12 18:25:53 UTC (rev 13916)
@@ -1,122 +1,91 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses cdbs.  Originaly written by Robert Millan.
-# This file is public domain.
 
-DEB_AUTO_CLEANUP_RCS            := yes
-
-DEB_PYTHON_SYSTEM=pycentral
 PYVERS=$(shell pyversions -vr debian/control)
+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")
 
-DEB_MAKE_CLEAN_TARGET    := clean
-DEB_DH_INSTALL_SOURCEDIR := debian/tmp
-
-DEB_DESTDIR=$(CURDIR)/debian/tmp
-
-DEB_INSTALL_MANPAGES_python-f2py  := numpy/f2py/f2py.1
-DEB_INSTALL_DOCS_python-numpy := DEV_README.txt THANKS.txt
-
-DEB_PYTHON_PACKAGES_EXCLUDE=python-numpy-dbg
-
 unexport LDFLAGS
 export ATLAS=None
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
+%:
+	dh --with python-central $@;
 
-clean::
-	-rm -rf `find -name build -type d`
-	-rm -rf `find . -name "*.pyc" -type f`
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf `find -name build -type d`
+	rm -rf `find . -name "*.pyc" -type f`
 	rm -rf debian/tmp2
 
-install/python-numpy::
-	: # Adding documentation
-	install -d $(CURDIR)/debian/python-numpy/usr/share/doc/python-numpy
-	cp -r $(DEB_DESTDIR)/usr/lib/python$(cdbs_python_current_version)/*-packages/numpy/doc/* \
-		$(CURDIR)/debian/python-numpy/usr/share/doc/python-numpy/
-	#cp $(DEB_DESTDIR)/usr/lib/python$(cdbs_python_current_version)/*-packages/numpy/doc/README.txt \
-	#	$(CURDIR)/debian/python-numpy/usr/share/doc/python-numpy/README.doc.txt
+override_dh_installman:
+	dh_installman numpy/f2py/f2py.1
+	# link manpage for versioned and dbg incarnations of f2py
+	for v in $(PYVERS); 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
+	dh_link -ppython-numpy-dbg /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py-dbg.1.gz;
 
-	: # Adding links to manpages
-	mkdir -p debian/python-numpy/usr/share/man/man1
+override_dh_install:
+	# add shebang information to f2py script
 	for v in $(PYVERS); do \
-	  ln -sf f2py.1 debian/python-numpy/usr/share/man/man1/f2py$$v.1; \
-	  sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$v," debian/tmp/usr/bin/f2py$$v; \
+		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; \
 	done
+	# install unversioned f2py script
+	dh_link usr/bin/f2py$(PYDEF) usr/bin/f2py
+	dh_link -ppython-numpy-dbg usr/bin/f2py$(PYDEF)-dbg usr/bin/f2py-dbg
 
-	: # Add unversioned numpy script
-	ln -s f2py$(cdbs_python_current_version) debian/python-numpy/usr/bin/f2py
+	# moving those scripts away until after pycentral has run, to not
+	# generate depends on pythonx.y
+	mkdir debian/tmp2
+	mv debian/tmp/usr/bin/* debian/tmp2
 
-	: # move versioned f2py binaries out of the way, we don't want to have explicit
-	: # dependencies on python2.x.
-	mkdir -p debian/tmp2
-	mv debian/tmp/usr/bin/f2py?.? debian/tmp2/
+	dh_install
 
-	: # Make Python scripts executable
-	for i in `find debian/tmp/usr/lib -type f`; do \
-	  sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
-		$$i > $$i.temp; \
-	  if cmp --quiet $$i $$i.temp; then \
-	    rm -f $$i.temp; \
-	  else \
-	    mv -f $$i.temp $$i; \
-	    chmod 755 $$i; \
-	    echo "fixed interpreter: $$i"; \
-	  fi; \
-	done
+	# remove files installed from .install (that's due to the dir listed there)
+	find $(CURDIR)/debian/python-numpy/ -name "*_d.so" -delete
 
-	for i in $(cdbs_python_build_versions); do \
+	# create symlinks for .h files
+	for i in $(PYVERS); do \
 	[ -d $(CURDIR)/debian/python-numpy/usr/include/python$$i ] || \
 		mkdir -p $(CURDIR)/debian/python-numpy/usr/include/python$$i; \
 		dh_link usr/share/pyshared/numpy/core/include/numpy usr/include/python$$i/numpy; \
 	done
-	for i in $(cdbs_python_build_versions); do \
+	for i in $(PYVERS); 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/share/pyshared/numpy/core/include/numpy usr/include/python$${i}_d/numpy; \
 	done
 
-binary-install/python-numpy-doc:: build/python-numpy-doc
-	cp -r $(CURDIR)/numpy/doc/* $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)
-	#cd doc; make html; cd ..
-	cp -r $(CURDIR)/doc/build/html/ $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)
-	mkdir $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/f2py
-	rst2html numpy/f2py/docs/usersguide/index.txt > $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/f2py/index.html
-	cp -r $(CURDIR)/numpy/f2py/docs/* $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/f2py
-	#chmod -x $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/f2py/usersguide/setup_example.py
+	# 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
 
-build/python-numpy-dbg::
-	set -e; \
-	for i in $(cdbs_python_build_versions); do \
-	  python$$i-dbg ./setup.py build; \
-	done
+	# remove extra license in doc
+	rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_sources/license.txt
 
-install/python-numpy-dbg::
-	for i in $(cdbs_python_build_versions); do \
-	  python$$i-dbg ./setup.py install --root $(CURDIR)/debian/python-numpy-dbg --install-layout=deb; \
-	  ( cd debian/python-numpy-dbg/usr/bin/; \
-	    sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$i-dbg," f2py$$i; \
-	    mv f2py$$i f2py$$i-dbg; \
-	  ); \
-	done
-	find debian/python-numpy-dbg \
-		! -type d ! -name '*_d.so' ! -name 'f2py*-dbg' | xargs rm -f
-	find debian/python-numpy-dbg -depth -empty -exec rmdir {} \;
-	mkdir -p debian/python-numpy-dbg/usr/share/man/man1
-	for v in $(PYVERS); do \
-	  ln -sf f2py.1 debian/python-numpy-dbg/usr/share/man/man1/f2py$$v-dbg.1; \
-	done
-	ln -sf f2py.1 debian/python-numpy-dbg/usr/share/man/man1/f2py-dbg.1
-	ln -sf f2py$(cdbs_python_current_version)-dbg debian/python-numpy-dbg/usr/bin/f2py-dbg
+override_dh_strip:
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
+	dh_strip -ppython-numpy --dbg-package=python-numpy-dbg
+endif
 
-binary-predeb/python-numpy-dbg::
-	: # restore versioned f2py binaries
+
+override_dh_pycentral:
+	dh_pycentral
+
+	# copy back f2py* bin, in their ultimate location
 	mv debian/tmp2/f2py?.? debian/python-numpy/usr/bin/
+	mkdir -p debian/python-numpy-dbg/usr/bin/
+	mv debian/tmp2/f2py?.?-dbg debian/python-numpy-dbg/usr/bin/
 
-	rm -rf debian/python-numpy-dbg/usr/share/doc/python-numpy-dbg
-	ln -s python-numpy debian/python-numpy-dbg/usr/share/doc/python-numpy-dbg
+build: build-arch build-indep ;
 
-LIB := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib")
+build-arch:
+	dh build
 
-build/python-numpy-doc:: build/python-numpy
+
+build-indep: 
 	# build doc only for default python version
-	make -C doc html PYTHONPATH=../$(LIB)
+	make -C doc html PYTHONPATH=../$(PYLIBPATH)
+	rst2html numpy/f2py/docs/usersguide/index.txt > numpy/f2py/docs/usersguide/index.html




More information about the Python-modules-commits mailing list