Merge lp:~tim-greaves/spud/transition-to-dh_python into lp:spud

Proposed by Tim Greaves
Status: Merged
Merged at revision: 538
Proposed branch: lp:~tim-greaves/spud/transition-to-dh_python
Merge into: lp:spud
Diff against target: 102 lines (+16/-12)
4 files modified
Makefile.in (+5/-1)
debian/compat (+1/-1)
debian/control (+4/-4)
debian/rules (+6/-6)
To merge this branch: bzr merge lp:~tim-greaves/spud/transition-to-dh_python
Reviewer Review Type Date Requested Status
Stephan Kramer Approve
Review via email: mp+285776@code.launchpad.net

Description of the change

Updating the Debian build system to dh-python from python-central, including a bump to compat version and adding in clean-up rules to distclean to deal with files and directories generated by debuild.

This is intended to fix bug #1544631

To post a comment you must log in.
539. By Tim Greaves

One additional change: dh-python expects packages to install into dist-packages
rather than site-packages. This change somewhat inelegantly renames the
directory to fix the problem; there is probably a neater solution modifying the
setuptools stage to install to the correct place.

Revision history for this message
Stephan Kramer (s-kramer) wrote :

Looks good to me!

review: Approve
540. By Tim Greaves

As Stephan points out, changing dh_pysupport to dh_python2 globally ends up
with a cliffhanger choice between dh_python2 and ... dh_python2. As he points
out, the audience are unlikely to be on the edge of their seats here, so the
line should be reduced to the inevitable result.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.in'
--- Makefile.in 2014-03-07 18:51:30 +0000
+++ Makefile.in 2016-02-17 02:33:07 +0000
@@ -1,4 +1,3 @@
1# Copyright (C) 2007 Imperial College London and others.
2#1#
3# Please see the AUTHORS file in the main source directory for a full list2# Please see the AUTHORS file in the main source directory for a full list
4# of copyright holders.3# of copyright holders.
@@ -125,3 +124,8 @@
125 rm -f Makefile src/tests/Makefile examples/Makefile124 rm -f Makefile src/tests/Makefile examples/Makefile
126 rm -f bin/spud-preprocess125 rm -f bin/spud-preprocess
127 rm -f diamond/setup.py diamond/diamond/plugins.py diamond/diamond/preprocess.py126 rm -f diamond/setup.py diamond/diamond/plugins.py diamond/diamond/preprocess.py
127 rm -fr debian/diamond debian/python-dxdiff debian/python-spud
128 rm -fr debian/spudtools debian/libspud-dev
129 rm -rf diamond/diamond.egg-info/
130 rm -f debian/*.debhelper* debian/*.substvars
131 rm -f build-* debian/files
128132
=== modified file 'debian/compat'
--- debian/compat 2008-05-08 15:24:48 +0000
+++ debian/compat 2016-02-17 02:33:07 +0000
@@ -1,1 +1,1 @@
1415
22
=== modified file 'debian/control'
--- debian/control 2012-09-18 15:01:41 +0000
+++ debian/control 2016-02-17 02:33:07 +0000
@@ -3,7 +3,7 @@
3Uploaders: David Ham <david.ham@imperial.ac.uk>3Uploaders: David Ham <david.ham@imperial.ac.uk>
4Section: science4Section: science
5Priority: extra5Priority: extra
6Build-Depends: gfortran (>=4.2), g++ (>=4.2), python-setuptools (>= 0.6b3-1), python-all-dev (>= 2.3.5-11), debhelper (>= 5.0.38), python-central (>= 0.5.6), texlive, python-support6Build-Depends: gfortran (>=4.2), g++ (>=4.2), python-setuptools (>= 0.6b3-1), python-all-dev (>= 2.3.5-11), debhelper (>= 5.0.38), dh-python, texlive, python-support
7Standards-Version: 3.8.07Standards-Version: 3.8.0
8XS-Python-Version: >= 2.58XS-Python-Version: >= 2.5
99
@@ -15,7 +15,7 @@
15Conflicts: python-diamond15Conflicts: python-diamond
16Replaces: python-diamond16Replaces: python-diamond
17Provides: ${python:Provides}17Provides: ${python:Provides}
18XB-Python-Version: ${python:Versions}18X-Python-Version: ${python:Versions}
19Description: A schema-driven interface for writing XML documents19Description: A schema-driven interface for writing XML documents
20 Diamond is a dynamic schema-driven graphical user interface for writing20 Diamond is a dynamic schema-driven graphical user interface for writing
21 XML documents. The interface is automatically generated from a schema21 XML documents. The interface is automatically generated from a schema
@@ -54,7 +54,7 @@
54Package: python-spud54Package: python-spud
55Section: python55Section: python
56Architecture: any56Architecture: any
57XB-Python-Version: ${python:Versions}57X-Python-Version: ${python:Versions}
58Depends: libspud-dev (= ${binary:Version}), ${python:Depends}, ${misc:Depends}58Depends: libspud-dev (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
59Description: An automatic options system for scientific models (python interface).59Description: An automatic options system for scientific models (python interface).
60 Spud is an automatic options system which reads an xml options file 60 Spud is an automatic options system which reads an xml options file
@@ -66,7 +66,7 @@
66Package: python-dxdiff66Package: python-dxdiff
67Section: python67Section: python
68Architecture: all68Architecture: all
69XB-Python-Version: ${python:Versions}69X-Python-Version: ${python:Versions}
70Depends: ${python:Depends}, ${misc:Depends}70Depends: ${python:Depends}, ${misc:Depends}
71Description: An XML aware diff tool.71Description: An XML aware diff tool.
72 DXdiff (Diamond Xml diff) is an XML aware diff tool for finding edit scripts72 DXdiff (Diamond Xml diff) is an XML aware diff tool for finding edit scripts
7373
=== modified file 'debian/rules'
--- debian/rules 2012-02-27 14:40:38 +0000
+++ debian/rules 2016-02-17 02:33:07 +0000
@@ -73,9 +73,11 @@
73# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.73# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
74 cd diamond;python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" install --prefix=/usr --no-compile --single-version-externally-managed --root=$(CURDIR)/debian/${PACKAGE_NAME}74 cd diamond;python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" install --prefix=/usr --no-compile --single-version-externally-managed --root=$(CURDIR)/debian/${PACKAGE_NAME}
75 if [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}.egg-info ]; then \75 if [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}.egg-info ]; then \
76 mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info ; \76 mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages ; \
77 mv debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages/${MODULE_NAME}.egg-info ; \
77 elif [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info ]; then \78 elif [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info ]; then \
78 mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info ; \79 mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages ; \
80 mv debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages/${MODULE_NAME}.egg-info ; \
79 else \81 else \
80 echo "Failed to locate python egg, was it built correctly?" && exit 1 ; \82 echo "Failed to locate python egg, was it built correctly?" && exit 1 ; \
81 fi83 fi
@@ -99,8 +101,7 @@
99# dh_installemacsen101# dh_installemacsen
100# dh_installpam102# dh_installpam
101# dh_installmime103# dh_installmime
102# Fallback to dh_pysupport of dh_python2 is not available (as on Ubuntu Lucid)104 dh_python2
103 ([ -x $(which dh_python2) ] && dh_python2) || dh_pysupport
104# dh_installinit105# dh_installinit
105# dh_installcron106# dh_installcron
106# dh_installinfo107# dh_installinfo
@@ -120,8 +121,7 @@
120binary-indep: build-diamond install-diamond build-libspud install-libspud install-spudtools install-dxdiff121binary-indep: build-diamond install-diamond build-libspud install-libspud install-spudtools install-dxdiff
121 dh_testdir -i122 dh_testdir -i
122 dh_testroot -i123 dh_testroot -i
123# Fallback to dh_pysupport of dh_python2 is not available (as on Ubuntu Lucid)124 dh_python2 -i
124 ([ -x $(which dh_python2) ] && dh_python2 -i) || dh_pysupport -i
125 dh_installdocs -i125 dh_installdocs -i
126 dh_installdirs -i126 dh_installdirs -i
127 dh_installexamples -i127 dh_installexamples -i

Subscribers

People subscribed via source and target branches