Merge lp:~verterok/ubuntu/oneiric/protobuf/build_for_2_6 into lp:ubuntu/oneiric/protobuf

Proposed by Guillermo Gonzalez
Status: Merged
Merge reported by: Stéphane Graber
Merged at revision: not available
Proposed branch: lp:~verterok/ubuntu/oneiric/protobuf/build_for_2_6
Merge into: lp:ubuntu/oneiric/protobuf
Diff against target: 91 lines (+34/-15)
2 files modified
debian/changelog (+7/-0)
debian/rules (+27/-15)
To merge this branch: bzr merge lp:~verterok/ubuntu/oneiric/protobuf/build_for_2_6
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+84876@code.launchpad.net

Commit message

Fix debian/rules to build python-protobuf for all supported python versions (2.6 and 2.7)

Description of the change

This branch fixes debian/rules to build python-protobuf for all supported python versions (2.6 and 2.7)

To post a comment you must log in.
Revision history for this message
Stéphane Graber (stgraber) wrote :

Looks good. Uploaded to -proposed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-08-11 16:33:47 +0000
3+++ debian/changelog 2011-12-08 01:48:27 +0000
4@@ -1,3 +1,10 @@
5+protobuf (2.4.0a-2ubuntu3) oneiric-proposed; urgency=low
6+
7+ * Fix build of python bindings for multiple versions (2.6 and 2.7)
8+ (LP: #900941)
9+
10+ -- Guillermo Gonzalez <guillermo.gonzalez@canonical.com> Tue, 06 Dec 2011 18:24:14 -0300
11+
12 protobuf (2.4.0a-2ubuntu2) oneiric; urgency=low
13
14 * Switch to dh_python2. (LP: #788514)
15
16=== modified file 'debian/rules'
17--- debian/rules 2011-08-11 16:33:13 +0000
18+++ debian/rules 2011-12-08 01:48:27 +0000
19@@ -44,6 +44,9 @@
20 version=0.0.0
21 major=0
22
23+
24+PYVERS = $(shell pyversions --requested --version debian/control)
25+
26 configure: configure-stamp
27 configure-stamp:
28 dh_testdir
29@@ -68,16 +71,19 @@
30
31 # python bindings
32 cd python && \
33- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python setup.py build
34+ for pyver in $(PYVERS); do \
35+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python$(pyver) setup.py build;\
36+ done
37
38 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
39- # run tests via pure-python
40- cd python && \
41- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python setup.py test
42- # run tests via the CPP implementation
43- cd python && \
44- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python setup.py test
45+ # run tests via pure-python and the CPP implementation
46+ cd python && \
47+ for pyver in $(PYVERS); do \
48+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python$(pyver) setup.py test; \
49+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python$(pyver) setup.py test; \
50+ done
51 endif
52+
53
54 # build the protoc manpage
55 xmlto man debian/protoc.xml
56@@ -105,7 +111,10 @@
57 rm -f protoc.1
58
59 # Python bindings cleanups
60- cd python && python setup.py clean --all
61+ cd python && \
62+ for pyver in $(PYVERS); do \
63+ python$(pyver) setup.py clean --all; \
64+ done
65 rm -rf python/protobuf.egg-info
66
67 # Java bindings cleanups
68@@ -145,13 +154,16 @@
69 rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/include/google/protobuf/compiler
70
71 # python bindings
72- cd python && PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp \
73- python setup.py install --no-compile \
74- --root=$(CURDIR)/debian/python-protobuf \
75- --install-layout=deb ; \
76- find $(CURDIR)/debian/python-protobuf \
77- -name 'protobuf-*-nspkg.pth' -print0 | \
78- xargs -r0 rm -f
79+ cd python && \
80+ for pyver in $(PYVERS); do \
81+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp \
82+ python$(pyver) setup.py install --no-compile \
83+ --root=$(CURDIR)/debian/python-protobuf \
84+ --install-layout=deb ; \
85+ find $(CURDIR)/debian/python-protobuf \
86+ -name 'protobuf-*-nspkg.pth' -print0 | \
87+ xargs -r0 rm -f; \
88+ done
89 # cleanup RPATH from built bindings
90 find $(CURDIR)/debian/python-protobuf -name '*.so' -print0 | \
91 xargs -r0 chrpath -d

Subscribers

People subscribed via source and target branches