Merge lp:~nuclearbob/utah/parser-packaging into lp:utah

Proposed by Max Brustkern
Status: Merged
Approved by: Joe Talbott
Approved revision: 762
Merged at revision: 765
Proposed branch: lp:~nuclearbob/utah/parser-packaging
Merge into: lp:utah
Diff against target: 68 lines (+18/-3)
2 files modified
debian/control (+8/-2)
debian/rules (+10/-1)
To merge this branch: bzr merge lp:~nuclearbob/utah/parser-packaging
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve
Review via email: mp+137212@code.launchpad.net

Description of the change

This change adds a utah-common package that contains the python module egg and __init__.py. utah-client and utah-parser both depend on the common package, so they can both get __init__.py without conflicting.

To post a comment you must log in.
Revision history for this message
Joe Talbott (joetalbott) wrote :

Looks good. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2012-11-29 15:31:48 +0000
3+++ debian/control 2012-11-30 14:33:34 +0000
4@@ -25,14 +25,20 @@
5 Package: utah-client
6 Architecture: all
7 Depends: ${misc:Depends}, ${python:Depends},
8- bzr, python-jsonschema (>= 0.5~), python-yaml
9+ bzr, python-jsonschema (>= 0.5~), python-yaml, utah-common
10 Recommends: git
11 Description: Ubuntu Test Automation Harness Client
12 Automation framework for testing in Ubuntu, client portion
13+
14+Package: utah-common
15+Architecture: all
16+Depends: ${misc:Depends}, ${python:Depends}
17+Description: Ubuntu Test Automation Harness Common Files
18+ Automation framework for testing in Ubuntu, common files
19
20 Package: utah-parser
21 Architecture: all
22 Depends: ${misc:Depends}, ${python:Depends},
23- python-jsonschema (>= 0.5~), python-yaml
24+ python-jsonschema (>= 0.5~), python-yaml, utah-common
25 Description: Ubuntu Test Automation Harness Parser
26 Automation framework for testing in Ubuntu, result parser
27
28=== modified file 'debian/rules'
29--- debian/rules 2012-11-29 15:31:48 +0000
30+++ debian/rules 2012-11-30 14:33:34 +0000
31@@ -21,13 +21,16 @@
32 # utah-parser lives in that tree as well
33 # utah should only install the provisioning subdirectory, and utah-client should install everything else
34 # except parser.py, which is now its own package
35- # If we just use dh_auto_install, both packages will get everything
36+ # and __init__.py, which is now in the common package
37+ # If we just use dh_auto_install, all packages will get everything
38 # We start by building the whole thing
39 set -e && for pyvers in $(PYVERS); do python$$pyvers setup.py install --install-layout=deb --root=$(CURDIR); done
40 # Next, we move the built provisioning directory aside for later use
41 mv build/*/utah/provisioning .
42 # Same with parser.py
43 mv build/*/utah/parser.py .
44+ # And __init__.py
45+ mv build/*/utah/__init__.py .
46 # Now we install into the utah-client directory, since provisioning is removed, using --skip-build to not rebuild it
47 set -e && for pyvers in $(PYVERS); do python$$pyvers setup.py install --skip-build --install-layout=deb --root=$(CURDIR)/debian/utah-client; done
48 # Now we remove everything we don't want in the utah package (i.e., everything that's still there)
49@@ -40,6 +43,10 @@
50 rm -r build/*/utah/*
51 mv parser.py build/*/utah
52 set -e && for pyvers in $(PYVERS); do python$$pyvers setup.py install --skip-build --install-layout=deb --root=$(CURDIR)/debian/utah-parser; done
53+ # And now we put back the init file and install that
54+ rm -r build/*/utah/*
55+ mv __init__.py build/*/utah
56+ set -e && for pyvers in $(PYVERS); do python$$pyvers setup.py install --skip-build --install-layout=deb --root=$(CURDIR)/debian/utah-common; done
57 # Since the client changes names from client.py to utah, we can't use utah-client.install for that
58 # We also need to make our directory since we do this before dh_auto_install
59 mkdir -p $(CURDIR)/debian/utah-client/usr/bin
60@@ -51,6 +58,8 @@
61 rm -r $(CURDIR)/debian/utah-client/usr/lib/python*/dist-packages/utah-*.egg-info
62 # Let's remove it from the parser as well
63 rm -r $(CURDIR)/debian/utah-parser/usr/lib/python*/dist-packages/utah-*.egg-info
64+ # We'll remove it from the server and leave it in the client package
65+ rm -r $(CURDIR)/debian/utah/usr/lib/python*/dist-packages/utah-*.egg-info
66 # We want to symlink the utah example scripts into /usr/bin, and we need a directory for that
67 mkdir -p $(CURDIR)/debian/utah/usr/bin
68 for script in $$(find examples -type f -name "*.py" -printf "%f\n"); do\

Subscribers

People subscribed via source and target branches