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
=== modified file 'debian/changelog'
--- debian/changelog 2011-08-11 16:33:47 +0000
+++ debian/changelog 2011-12-08 01:48:27 +0000
@@ -1,3 +1,10 @@
1protobuf (2.4.0a-2ubuntu3) oneiric-proposed; urgency=low
2
3 * Fix build of python bindings for multiple versions (2.6 and 2.7)
4 (LP: #900941)
5
6 -- Guillermo Gonzalez <guillermo.gonzalez@canonical.com> Tue, 06 Dec 2011 18:24:14 -0300
7
1protobuf (2.4.0a-2ubuntu2) oneiric; urgency=low8protobuf (2.4.0a-2ubuntu2) oneiric; urgency=low
29
3 * Switch to dh_python2. (LP: #788514)10 * Switch to dh_python2. (LP: #788514)
411
=== modified file 'debian/rules'
--- debian/rules 2011-08-11 16:33:13 +0000
+++ debian/rules 2011-12-08 01:48:27 +0000
@@ -44,6 +44,9 @@
44version=0.0.044version=0.0.0
45major=045major=0
4646
47
48PYVERS = $(shell pyversions --requested --version debian/control)
49
47configure: configure-stamp50configure: configure-stamp
48configure-stamp:51configure-stamp:
49 dh_testdir52 dh_testdir
@@ -68,16 +71,19 @@
6871
69 # python bindings72 # python bindings
70 cd python && \73 cd python && \
71 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python setup.py build74 for pyver in $(PYVERS); do \
75 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python$(pyver) setup.py build;\
76 done
7277
73ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))78ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
74 # run tests via pure-python79 # run tests via pure-python and the CPP implementation
75 cd python && \80 cd python && \
76 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python setup.py test81 for pyver in $(PYVERS); do \
77 # run tests via the CPP implementation82 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python$(pyver) setup.py test; \
78 cd python && \83 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python$(pyver) setup.py test; \
79 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python setup.py test84 done
80endif85endif
86
8187
82 # build the protoc manpage88 # build the protoc manpage
83 xmlto man debian/protoc.xml89 xmlto man debian/protoc.xml
@@ -105,7 +111,10 @@
105 rm -f protoc.1111 rm -f protoc.1
106112
107 # Python bindings cleanups113 # Python bindings cleanups
108 cd python && python setup.py clean --all114 cd python && \
115 for pyver in $(PYVERS); do \
116 python$(pyver) setup.py clean --all; \
117 done
109 rm -rf python/protobuf.egg-info118 rm -rf python/protobuf.egg-info
110119
111 # Java bindings cleanups120 # Java bindings cleanups
@@ -145,13 +154,16 @@
145 rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/include/google/protobuf/compiler154 rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/include/google/protobuf/compiler
146155
147 # python bindings156 # python bindings
148 cd python && PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp \157 cd python && \
149 python setup.py install --no-compile \158 for pyver in $(PYVERS); do \
150 --root=$(CURDIR)/debian/python-protobuf \159 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp \
151 --install-layout=deb ; \160 python$(pyver) setup.py install --no-compile \
152 find $(CURDIR)/debian/python-protobuf \161 --root=$(CURDIR)/debian/python-protobuf \
153 -name 'protobuf-*-nspkg.pth' -print0 | \162 --install-layout=deb ; \
154 xargs -r0 rm -f163 find $(CURDIR)/debian/python-protobuf \
164 -name 'protobuf-*-nspkg.pth' -print0 | \
165 xargs -r0 rm -f; \
166 done
155 # cleanup RPATH from built bindings167 # cleanup RPATH from built bindings
156 find $(CURDIR)/debian/python-protobuf -name '*.so' -print0 | \168 find $(CURDIR)/debian/python-protobuf -name '*.so' -print0 | \
157 xargs -r0 chrpath -d169 xargs -r0 chrpath -d

Subscribers

People subscribed via source and target branches