Merge lp:~james-w/linaro-image-tools/hwpack-packaging into lp:linaro-image-tools/11.11

Proposed by James Westby
Status: Merged
Merged at revision: 99
Proposed branch: lp:~james-w/linaro-image-tools/hwpack-packaging
Merge into: lp:linaro-image-tools/11.11
Diff against target: 118 lines (+48/-5)
7 files modified
.bzr-builddeb/default.conf (+2/-0)
debian/changelog (+1/-2)
debian/control (+15/-2)
debian/linaro-image-tools.install (+2/-0)
debian/python-hwpack.install (+1/-0)
debian/rules (+3/-1)
setup.py (+24/-0)
To merge this branch: bzr merge lp:~james-w/linaro-image-tools/hwpack-packaging
Reviewer Review Type Date Requested Status
Guilherme Salgado (community) code Approve
Review via email: mp+36598@code.launchpad.net

Description of the change

Hi,

This adds the hardware pack code the the packaging, so that everyone
can make use of it.

I added a second package for the library to comply better with the
python policy.

The setup.py is very minimal, but it's all that's really needed for this.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Guilherme Salgado (salgado) wrote :

This looks good to me (although I'm no packaging expert), but I think we need to add python-argparse to python-hwpack's Build-Depends and Depends, no? Without that I wasn't able to build

review: Approve (code)
Revision history for this message
James Westby (james-w) wrote :

On Mon, 27 Sep 2010 17:23:39 -0000, Guilherme Salgado <email address hidden> wrote:
> Review: Approve code
> This looks good to me (although I'm no packaging expert), but I think
> we need to add python-argparse to python-hwpack's Build-Depends and
> Depends, no? Without that I wasn't able to build

Good point, I missed it because of a misplaced grep.

Thanks,

James

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== added file '.bzr-builddeb/default.conf'
3--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
4+++ .bzr-builddeb/default.conf 2010-09-24 20:41:47 +0000
5@@ -0,0 +1,2 @@
6+[BUILDDEB]
7+native=True
8
9=== modified file 'debian/changelog'
10--- debian/changelog 2010-09-15 23:44:53 +0000
11+++ debian/changelog 2010-09-24 20:41:47 +0000
12@@ -11,8 +11,7 @@
13 itself can run as non-root as intended.
14
15 [ James Westby ]
16- * Add a linaro-hwpack-creation script for the creation of hardware packs.
17- Not yet installed in the binary packages.
18+ * Add a linaro-hwpack-create script for the creation of hardware packs.
19
20 -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 14 Sep 2010 17:01:49 -0700
21
22
23=== modified file 'debian/control'
24--- debian/control 2010-09-07 08:52:42 +0000
25+++ debian/control 2010-09-24 20:41:47 +0000
26@@ -1,10 +1,11 @@
27 Source: linaro-image-tools
28 Section: devel
29 Priority: optional
30-Build-Depends: debhelper (>= 7)
31+Build-Depends: debhelper (>= 7.0.50~), python-all, python-apt, python-testtools
32 Standards-Version: 3.9.1
33 Maintainer: Linaro Developers <linaro-dev@lists.linaro.org>
34 Vcs-Bzr:
35+XS-Python-Version: >=2.5
36
37 Package: linaro-image-tools
38 Architecture: all
39@@ -13,10 +14,22 @@
40 uuid-runtime,
41 wget,
42 uboot-mkimage,
43- realpath
44+ realpath,
45+ python,
46+ python-hwpack
47 Description: collection of tools to work with Linaro images
48 This package offers a set of tools for use with Linaro images.
49 .
50 The provided linaro-media-create command allows writing Linaro images
51 to a SD card, or generating an image file which you can boot in QEMU.
52
53+Package: python-hwpack
54+Architecture: all
55+Section: python
56+Depends: ${python:Depends}, python-apt, ${misc:Depends}
57+Description: python library for the creation of hardware packs
58+ Hardware packs allow for the distribution of packages to be combined with
59+ an image to create a root filesystem at a later date.
60+ .
61+ This package provides a python library to aid with the creation of hardware
62+ packs.
63
64=== modified file 'debian/linaro-image-tools.install'
65--- debian/linaro-image-tools.install 2010-08-31 20:50:14 +0000
66+++ debian/linaro-image-tools.install 2010-09-24 20:41:47 +0000
67@@ -1,1 +1,3 @@
68 linaro-media-create usr/bin
69+linaro-hwpack-install usr/bin
70+linaro-hwpack-create usr/bin
71
72=== added file 'debian/python-hwpack.install'
73--- debian/python-hwpack.install 1970-01-01 00:00:00 +0000
74+++ debian/python-hwpack.install 2010-09-24 20:41:47 +0000
75@@ -0,0 +1,1 @@
76+usr/lib/python*/dist-packages/hwpack
77
78=== modified file 'debian/rules'
79--- debian/rules 2010-08-31 20:50:14 +0000
80+++ debian/rules 2010-09-24 20:41:47 +0000
81@@ -1,5 +1,7 @@
82 #!/usr/bin/make -f
83
84 %:
85- dh $*
86+ dh --buildsystem=python_distutils --with-addon=python-support $*
87
88+override_dh_auto_test:
89+ python -m testtools.run hwpack.tests.test_suite
90
91=== added file 'setup.py'
92--- setup.py 1970-01-01 00:00:00 +0000
93+++ setup.py 2010-09-24 20:41:47 +0000
94@@ -0,0 +1,24 @@
95+from distutils.core import setup
96+import os
97+import subprocess
98+
99+
100+def get_version():
101+ proc = subprocess.Popen(
102+ ["dpkg-parsechangelog"],
103+ cwd=os.path.abspath(os.path.dirname(__file__)),
104+ stdout=subprocess.PIPE)
105+ output, _ = proc.communicate()
106+ version = None
107+ for line in output.split("\n"):
108+ if line.startswith("Version: "):
109+ version = line.split(" ", 1)[1].strip()
110+ assert version is not None, (
111+ "Couldn't determine version number from debian changelog")
112+
113+
114+setup(
115+ name="hwpack",
116+ version=get_version(),
117+ packages=["hwpack"],
118+ )

Subscribers

People subscribed via source and target branches