Merge lp:~coreygoldberg/uci-tests/ucitests-py3-packaging into lp:~canonical-ci-engineering/uci-tests/trunk

Proposed by Corey Goldberg
Status: Needs review
Proposed branch: lp:~coreygoldberg/uci-tests/ucitests-py3-packaging
Merge into: lp:~canonical-ci-engineering/uci-tests/trunk
Diff against target: 130 lines (+62/-8)
7 files modified
NEWS.rst (+1/-0)
debian/changelog (+6/-0)
debian/control (+40/-6)
debian/python-uci-tests.install (+1/-0)
debian/python3-uci-tests.install (+1/-0)
debian/rules (+12/-2)
debian/uci-tests-cli.install (+1/-0)
To merge this branch: bzr merge lp:~coreygoldberg/uci-tests/ucitests-py3-packaging
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Needs Resubmitting
Vincent Ladeuil (community) Needs Fixing
Barry Warsaw (community) Needs Fixing
Review via email: mp+234996@code.launchpad.net

Commit message

updates to packaging to support Python 3

Description of the change

updates to packaging to support Python 3.

To post a comment you must log in.
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

Notes:

I am getting some warnings during build. Should I be concerned with these?:

* dpkg-gencontrol: warning: Depends field of package python-uci-tests: unknown substitution variable ${python:Depends}
* dpkg-gencontrol: warning: Depends field of package python3-uci-tests: unknown substitution variable ${python:Depends}
* dpkg-deb: warning: 'debian/python-uci-tests/DEBIAN/control' contains user-defined field 'Original-Maintainer'
* dpkg-deb: warning: 'debian/python3-uci-tests/DEBIAN/control' contains user-defined field 'Original-Maintainer'

and I get the following errors/warnings when it runs lintian:

W: uci-tests source: out-of-date-standards-version 3.9.4 (current is 3.9.5)
E: python-uci-tests: copyright-should-refer-to-common-license-file-for-gpl
E: python-uci-tests: extended-description-is-empty
W: python-uci-tests: empty-binary-package
E: python3-uci-tests: copyright-should-refer-to-common-license-file-for-gpl
E: python3-uci-tests: extended-description-is-empty
W: python3-uci-tests: empty-binary-package

Revision history for this message
Vincent Ladeuil (vila) wrote :

> I am getting some warnings during build. Should I be concerned with these?:

No idea ;) But since they are the same for both versions I think it's ok. Someone with more packaging-fu than me will have to tell us ;)

> and I get the following errors/warnings when it runs lintian:

No idea here either but fixes highly welcome ;)

Some more comments inline, the most important one is that trunk wasn't up-to-date and should merge with it first thing.

review: Needs Fixing
140. By Corey Goldberg

updated build rules for py3

141. By Corey Goldberg

merged trunk and fixed conflicts

142. By Corey Goldberg

make unc-run-tests3 script for py3

143. By Corey Goldberg

update packaging

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

fixed build errors I was getting. I was missing *.install files for packaging a 2/3 bilingual package.
packaging should be good to go... though it obviously fails on py3 auto_tests tests since I am just getting to porting that code (in followup MPs).

144. By Corey Goldberg

update to packaging, remove shebang from console script

145. By Corey Goldberg

packaing updates

146. By Corey Goldberg

packaging updates

147. By Corey Goldberg

typo

Revision history for this message
Barry Warsaw (barry) wrote :

Generally don't worry about the warnings, but do worry about the lintian errors.

Revision history for this message
Barry Warsaw (barry) wrote :

I think 3.9.5 is the expected version for Ubuntu, though Debian now has 3.9.6. You probably won't have any problems, but do review the checklist before bumping: https://www.debian.org/doc/packaging-manuals/upgrading-checklist.txt

You probably want to adopt DEP-5: http://dep.debian.net/deps/dep5/

empty-binary-package is probably the biggest problem, and that indicates packaging bugs. I'll look more closely and try a local build.

Revision history for this message
Barry Warsaw (barry) wrote :

A few reviewy comments.

Revision history for this message
Barry Warsaw (barry) :
Revision history for this message
Barry Warsaw (barry) wrote :

Looks like you also need explicit B-D on python-setuptools and python3-setuptools

Revision history for this message
Barry Warsaw (barry) wrote :

Tests fail:

Traceback (most recent call last):
  File "uci-run-tests", line 24, in <module>
    sys.exit(runners.cli_run())
  File "/«PKGBUILDDIR»/ucitests/runners.py", line 114, in cli_run
    modules=ns.modules)
  File "/«PKGBUILDDIR»/ucitests/runners.py", line 139, in load_tests
    loader = loaders.Loader()
  File "/«PKGBUILDDIR»/ucitests/loaders.py", line 86, in __init__
    root = kwargs.pop('root', os.getcwdu())
AttributeError: 'module' object has no attribute 'getcwdu'

Where does getcwdu() come from?

review: Needs Fixing
148. By Corey Goldberg

added dh_python for using pybuild

149. By Corey Goldberg

disable py3 tests

150. By Corey Goldberg

fix d/rules

151. By Corey Goldberg

fixed packaging

152. By Corey Goldberg

readded d/install files

153. By Corey Goldberg

fixed package installs

154. By Corey Goldberg

re-added shebang

155. By Corey Goldberg

shortened descriptions in d/control

156. By Corey Goldberg

shortened descriptions in d/control again

157. By Corey Goldberg

fixed lintian errors in d/control

158. By Corey Goldberg

fixed d/control description

159. By Corey Goldberg

fix lintian errors in packaging

160. By Corey Goldberg

fix whitespace in d/control

Revision history for this message
Vincent Ladeuil (vila) wrote :

Thanks for the hard work !

A few comments inline, this is going in the right direction but I have few remarks.

Also, thanks a ton for your attention to details regarding the typos but can you make a separate MP for that so we keep the focus here on the packaging ?

review: Needs Fixing
161. By Corey Goldberg

updated changelog comment

162. By Corey Goldberg

revert typos

163. By Corey Goldberg

revert typo

164. By Corey Goldberg

revert whitespace

165. By Corey Goldberg

revert whitespace again

166. By Corey Goldberg

revert whitespace again

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

removed extra whitespace and typo fixes to concentrate on packaging

167. By Corey Goldberg

added run-uci-tests2 for migration path

168. By Corey Goldberg

added current path

169. By Corey Goldberg

py3 fix

170. By Corey Goldberg

fix install

171. By Corey Goldberg

missing comma in B-D

172. By Corey Goldberg

fix dh_auto_test

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

now creating a python2 version of named run-uci-tests2, as a migration path for current CI... per conversation with vila.

review: Needs Resubmitting

Unmerged revisions

172. By Corey Goldberg

fix dh_auto_test

171. By Corey Goldberg

missing comma in B-D

170. By Corey Goldberg

fix install

169. By Corey Goldberg

py3 fix

168. By Corey Goldberg

added current path

167. By Corey Goldberg

added run-uci-tests2 for migration path

166. By Corey Goldberg

revert whitespace again

165. By Corey Goldberg

revert whitespace again

164. By Corey Goldberg

revert whitespace

163. By Corey Goldberg

revert typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS.rst'
2--- NEWS.rst 2014-09-17 16:12:18 +0000
3+++ NEWS.rst 2014-09-30 15:58:14 +0000
4@@ -7,6 +7,7 @@
5 dev
6 ===
7
8+* Add packaging for Python3.
9
10 0.1.4
11 =====
12
13=== modified file 'debian/changelog'
14--- debian/changelog 2014-07-31 09:39:27 +0000
15+++ debian/changelog 2014-09-30 15:58:14 +0000
16@@ -1,3 +1,9 @@
17+uci-tests (0.1.5) UNRELEASED; urgency=medium
18+
19+ * Added packaging code for Python 3.x.
20+
21+ -- Corey Goldberg <corey.goldberg@canonical.com> Tue, 16 Sep 2014 17:38:11 -0400
22+
23 uci-tests (0.1.4) precise; urgency=medium
24
25 * Flush all output from the test result.
26
27=== modified file 'debian/control'
28--- debian/control 2014-04-20 11:26:43 +0000
29+++ debian/control 2014-09-30 15:58:14 +0000
30@@ -3,13 +3,21 @@
31 Priority: optional
32 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
33 XSBC-Original-Maintainer: Vincent Ladeuil <vila+ci@canonical.com>
34-Build-Depends: pep8,
35+Build-Depends: debhelper (>= 9),
36+ dh-python,
37+ pep8,
38 pyflakes,
39+ python-all,
40+ python-setuptools,
41 python-subunit,
42- python-testtools,
43- python-all,
44- debhelper (>= 9)
45-Standards-Version: 3.9.4
46+ python-testtools,
47+ python3-all,
48+ python3-setuptools,
49+ python3-subunit,
50+ python3-testtools
51+Standards-Version: 3.9.5
52+X-Python-Version: >= 2.7
53+X-Python3-Version: >= 3.2
54 XS-Testsuite: autopkgtest
55
56 Package: python-uci-tests
57@@ -20,4 +28,30 @@
58 python-testtools,
59 ${misc:Depends},
60 ${python:Depends}
61-Description: Ubuntu Continuous Integration test tools.
62+Description: Ubuntu Continuous Integration test tools for Python.
63+ This is the Python 2 version.
64+
65+Package: python3-uci-tests
66+Architecture: all
67+Depends: pep8,
68+ pyflakes,
69+ python3-subunit,
70+ python3-testtools,
71+ ${misc:Depends},
72+ ${python3:Depends}
73+Description: Ubuntu Continuous Integration test tools for Python.
74+ This is the Python 3 version.
75+
76+Package: uci-tests-cli
77+Architecture: all
78+Depends: pep8,
79+ pyflakes,
80+ python-subunit,
81+ python-testtools,
82+ python3-subunit,
83+ python3-testtools,
84+ ${misc:Depends},
85+ ${python:Depends},
86+ ${python3:Depends}
87+Description: Ubuntu Continuous Integration test tools
88+ This provides the ``uci-run-tests`` command-line interface.
89
90=== added file 'debian/python-uci-tests.install'
91--- debian/python-uci-tests.install 1970-01-01 00:00:00 +0000
92+++ debian/python-uci-tests.install 2014-09-30 15:58:14 +0000
93@@ -0,0 +1,1 @@
94+usr/lib/python2*
95
96=== added file 'debian/python3-uci-tests.install'
97--- debian/python3-uci-tests.install 1970-01-01 00:00:00 +0000
98+++ debian/python3-uci-tests.install 2014-09-30 15:58:14 +0000
99@@ -0,0 +1,1 @@
100+usr/lib/python3*
101
102=== modified file 'debian/rules'
103--- debian/rules 2014-01-28 15:14:15 +0000
104+++ debian/rules 2014-09-30 15:58:14 +0000
105@@ -2,7 +2,17 @@
106 #export DH_VERBOSE=1
107
108 %:
109- dh "$@" --with python2
110+ dh $@ --with python2,python3 --buildsystem=pybuild
111
112 override_dh_auto_test:
113- ./uci-run-tests
114+ python uci-run-tests
115+ # TODO: add py3 tests once code is ported:
116+ # python3 uci-run-tests
117+
118+override_dh_install:
119+ dh_install
120+ cp debian/uci-tests-cli/usr/bin/uci-run-tests debian/uci-tests-cli/usr/bin/uci-run-tests2
121+
122+override_dh_python3:
123+ dh_python3 --shebang /usr/bin/python3
124+
125
126=== added file 'debian/uci-tests-cli.install'
127--- debian/uci-tests-cli.install 1970-01-01 00:00:00 +0000
128+++ debian/uci-tests-cli.install 2014-09-30 15:58:14 +0000
129@@ -0,0 +1,1 @@
130+usr/bin/uci-run-tests

Subscribers

People subscribed via source and target branches