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
1=== modified file 'Makefile.in'
2--- Makefile.in 2014-03-07 18:51:30 +0000
3+++ Makefile.in 2016-02-17 02:33:07 +0000
4@@ -1,4 +1,3 @@
5-# Copyright (C) 2007 Imperial College London and others.
6 #
7 # Please see the AUTHORS file in the main source directory for a full list
8 # of copyright holders.
9@@ -125,3 +124,8 @@
10 rm -f Makefile src/tests/Makefile examples/Makefile
11 rm -f bin/spud-preprocess
12 rm -f diamond/setup.py diamond/diamond/plugins.py diamond/diamond/preprocess.py
13+ rm -fr debian/diamond debian/python-dxdiff debian/python-spud
14+ rm -fr debian/spudtools debian/libspud-dev
15+ rm -rf diamond/diamond.egg-info/
16+ rm -f debian/*.debhelper* debian/*.substvars
17+ rm -f build-* debian/files
18
19=== modified file 'debian/compat'
20--- debian/compat 2008-05-08 15:24:48 +0000
21+++ debian/compat 2016-02-17 02:33:07 +0000
22@@ -1,1 +1,1 @@
23-4
24+5
25
26=== modified file 'debian/control'
27--- debian/control 2012-09-18 15:01:41 +0000
28+++ debian/control 2016-02-17 02:33:07 +0000
29@@ -3,7 +3,7 @@
30 Uploaders: David Ham <david.ham@imperial.ac.uk>
31 Section: science
32 Priority: extra
33-Build-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-support
34+Build-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
35 Standards-Version: 3.8.0
36 XS-Python-Version: >= 2.5
37
38@@ -15,7 +15,7 @@
39 Conflicts: python-diamond
40 Replaces: python-diamond
41 Provides: ${python:Provides}
42-XB-Python-Version: ${python:Versions}
43+X-Python-Version: ${python:Versions}
44 Description: A schema-driven interface for writing XML documents
45 Diamond is a dynamic schema-driven graphical user interface for writing
46 XML documents. The interface is automatically generated from a schema
47@@ -54,7 +54,7 @@
48 Package: python-spud
49 Section: python
50 Architecture: any
51-XB-Python-Version: ${python:Versions}
52+X-Python-Version: ${python:Versions}
53 Depends: libspud-dev (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
54 Description: An automatic options system for scientific models (python interface).
55 Spud is an automatic options system which reads an xml options file
56@@ -66,7 +66,7 @@
57 Package: python-dxdiff
58 Section: python
59 Architecture: all
60-XB-Python-Version: ${python:Versions}
61+X-Python-Version: ${python:Versions}
62 Depends: ${python:Depends}, ${misc:Depends}
63 Description: An XML aware diff tool.
64 DXdiff (Diamond Xml diff) is an XML aware diff tool for finding edit scripts
65
66=== modified file 'debian/rules'
67--- debian/rules 2012-02-27 14:40:38 +0000
68+++ debian/rules 2016-02-17 02:33:07 +0000
69@@ -73,9 +73,11 @@
70 # Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
71 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}
72 if [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}.egg-info ]; then \
73- 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 ; \
74+ mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages ; \
75+ 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 ; \
76 elif [ -d debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info ]; then \
77- 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 ; \
78+ mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages debian/${PACKAGE_NAME}/usr/lib/python$*/dist-packages ; \
79+ 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 ; \
80 else \
81 echo "Failed to locate python egg, was it built correctly?" && exit 1 ; \
82 fi
83@@ -99,8 +101,7 @@
84 # dh_installemacsen
85 # dh_installpam
86 # dh_installmime
87-# Fallback to dh_pysupport of dh_python2 is not available (as on Ubuntu Lucid)
88- ([ -x $(which dh_python2) ] && dh_python2) || dh_pysupport
89+ dh_python2
90 # dh_installinit
91 # dh_installcron
92 # dh_installinfo
93@@ -120,8 +121,7 @@
94 binary-indep: build-diamond install-diamond build-libspud install-libspud install-spudtools install-dxdiff
95 dh_testdir -i
96 dh_testroot -i
97-# Fallback to dh_pysupport of dh_python2 is not available (as on Ubuntu Lucid)
98- ([ -x $(which dh_python2) ] && dh_python2 -i) || dh_pysupport -i
99+ dh_python2 -i
100 dh_installdocs -i
101 dh_installdirs -i
102 dh_installexamples -i

Subscribers

People subscribed via source and target branches