Merge lp:~sylvain-pineau/checkbox/vendor_removal_raring_onwards_packaging into lp:~checkbox-dev/checkbox/checkbox-packaging

Proposed by Sylvain Pineau
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 32
Merged at revision: 32
Proposed branch: lp:~sylvain-pineau/checkbox/vendor_removal_raring_onwards_packaging
Merge into: lp:~checkbox-dev/checkbox/checkbox-packaging
Diff against target: 64 lines (+36/-0)
3 files modified
debian/patches/series (+1/-0)
debian/patches/vendorized_packages_removal.patch (+22/-0)
debian/rules (+13/-0)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/vendor_removal_raring_onwards_packaging
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Sylvain Pineau (community) Needs Resubmitting
Review via email: mp+193931@code.launchpad.net

Description of the change

MR for the packaging branch.

This proposal removes the vendorized sw of plainbox for 13.04+ builds.
As Raring is the first release providing python3.3 (inspect.Signature) and unittest.mock (1.0).

Only extcmd will remain in plainbox/vendor.

I'm using a combination of inline replacements (for mock) and patches (for funcsigs).

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

57 + rm -rf $(CURDIR)/plainbox/plainbox/vendor/mock.py

probably -f is sufficient, I always find rm -rf 'anything scary

Otherwise looks good

32. By Sylvain Pineau

debian:rules: Remove vendorized modules (in Ubuntu 13.04 onwards)

- Remove explicitly the funcsigs and mock modules in the build target
- Clean the plainbox code (with a quilt patch and inline replacements)

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

rm -f is enough. Fixed

review: Needs Resubmitting
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Thanks, looks great :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'debian/patches'
2=== added file 'debian/patches/series'
3--- debian/patches/series 1970-01-01 00:00:00 +0000
4+++ debian/patches/series 2013-11-05 14:49:36 +0000
5@@ -0,0 +1,1 @@
6+vendorized_packages_removal.patch
7
8=== added file 'debian/patches/vendorized_packages_removal.patch'
9--- debian/patches/vendorized_packages_removal.patch 1970-01-01 00:00:00 +0000
10+++ debian/patches/vendorized_packages_removal.patch 2013-11-05 14:49:36 +0000
11@@ -0,0 +1,22 @@
12+Description: Remove the vendorized funcsigs module
13+Author: Sylvain Pineau <sylvain.pineau@canonical.com>
14+Origin: upstream
15+---
16+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
17+--- a/plainbox/plainbox/impl/service.py
18++++ b/plainbox/plainbox/impl/service.py
19+@@ -28,13 +28,7 @@ import functools
20+ import itertools
21+ import logging
22+
23+-try:
24+- from inspect import Signature
25+-except ImportError:
26+- try:
27+- from plainbox.vendor.funcsigs import Signature
28+- except ImportError:
29+- raise SystemExit("DBus parts require 'funcsigs' from pypi.")
30++from inspect import Signature
31+ from plainbox.vendor import extcmd
32+
33+ from plainbox.abc import IJobResult
34
35=== modified file 'debian/rules'
36--- debian/rules 2013-11-04 15:29:28 +0000
37+++ debian/rules 2013-11-05 14:49:36 +0000
38@@ -3,6 +3,8 @@
39 # Prevent setuptools/distribute from accessing the internet.
40 export http_proxy=http://127.0.9.1:9
41
42+RELEASE_GTE_RARING := $(shell expr `lsb_release -rs` \>= 13.04)
43+
44 %:
45 dh "$@" --with python3,sphinxdoc,translations
46
47@@ -21,6 +23,17 @@
48 dh_clean
49
50 override_dh_auto_build:
51+ifeq (1,$(RELEASE_GTE_RARING))
52+ # funcsigs.Signature (the backport) is part of the Python standard library,
53+ # available as inspect.Signature in Python 3.3 onwards.
54+ rm -rf $(CURDIR)/plainbox/plainbox/vendor/funcsigs
55+ # mock is now part of the Python standard library, available as
56+ # unittest.mock in Python 3.3 onwards.
57+ rm -f $(CURDIR)/plainbox/plainbox/vendor/mock.py
58+ find $(CURDIR)/plainbox -type f -iname "test*.py" -execdir sed -i -e 's/plainbox\.vendor\.mock/unittest\.mock/' {} \;
59+ find $(CURDIR)/plainbox -type f -iname "test*.py" -execdir sed -i -e 's/plainbox\.vendor import mock/unittest import mock/' {} \;
60+ dh_quilt_patch
61+endif
62 cd $(CURDIR)/plainbox && ./setup.py build
63 cd $(CURDIR)/checkbox-old && ./setup.py build
64 cd $(CURDIR)/checkbox-ng && ./setup.py build

Subscribers

People subscribed via source and target branches