trv

Merge lp:~veebers/trv/snapping-trv into lp:trv

Proposed by Christopher Lee
Status: Needs review
Proposed branch: lp:~veebers/trv/snapping-trv
Merge into: lp:trv
Diff against target: 108 lines (+60/-6)
4 files modified
debian/rules (+0/-5)
requirements.txt (+2/-0)
setup.py (+35/-1)
snapcraft.yaml (+23/-0)
To merge this branch: bzr merge lp:~veebers/trv/snapping-trv
Reviewer Review Type Date Requested Status
Thomi Richards Pending
Review via email: mp+304209@code.launchpad.net

Commit message

Snapping trv.

Description of the change

Snapping trv.

To post a comment you must log in.

Unmerged revisions

28. By Christopher Lee

Remove un-needed rules as it's handled in setup.py now.

27. By Christopher Lee

Add newline

26. By Christopher Lee

Snapped. Update setup.py to do resource gen.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/rules'
2--- debian/rules 2014-12-08 02:09:32 +0000
3+++ debian/rules 2016-08-28 23:39:24 +0000
4@@ -6,8 +6,3 @@
5 # main packaging script based on dh7 syntax
6 %:
7 dh $@ --with python3 --buildsystem pybuild
8-
9-override_dh_auto_build:
10- ./regen_resources.sh
11- dh_auto_build
12-
13
14=== added file 'requirements.txt'
15--- requirements.txt 1970-01-01 00:00:00 +0000
16+++ requirements.txt 2016-08-28 23:39:24 +0000
17@@ -0,0 +1,2 @@
18+testtools
19+python-subunit
20
21=== modified file 'setup.py'
22--- setup.py 2014-12-05 03:06:30 +0000
23+++ setup.py 2016-08-28 23:39:24 +0000
24@@ -21,7 +21,14 @@
25 import sys
26 assert sys.version_info >= (3,), 'Python 3 is required'
27
28-from setuptools import find_packages, setup
29+
30+from distutils.cmd import Command
31+from setuptools import (
32+ find_packages,
33+ setup,
34+)
35+from setuptools.command.build_py import build_py
36+import subprocess
37 from trv import __version__
38
39
40@@ -30,6 +37,29 @@
41 ]
42
43
44+class ResourceCommand(Command):
45+ """Custom command for running the resource creation."""
46+
47+ description = 'run pyrcc5 command to create the resources.'
48+
49+ def initialize_options(self):
50+ pass
51+
52+ def finalize_options(self):
53+ pass
54+
55+ def run(self):
56+ self.announce('Running command: {}'.format('regen_resouces.sh'))
57+ subprocess.check_call(['./regen_resources.sh'])
58+
59+
60+class BuildResourcesCommand(build_py):
61+ """Run the pyrcc5 command for resources."""
62+
63+ def run(self):
64+ self.run_command('resource')
65+ super().run()
66+
67 setup(
68 name='trv',
69 version=__version__,
70@@ -45,6 +75,10 @@
71 entry_points={
72 'console_scripts': ['trv = trv:main']
73 },
74+ cmdclass={
75+ 'resource': ResourceCommand,
76+ 'build_py': BuildResourcesCommand,
77+ },
78 classifiers=[
79 'Development Status :: 4 - Beta',
80 'Environment :: MacOS X',
81
82=== added file 'snapcraft.yaml'
83--- snapcraft.yaml 1970-01-01 00:00:00 +0000
84+++ snapcraft.yaml 2016-08-28 23:39:24 +0000
85@@ -0,0 +1,23 @@
86+name: trv
87+version: "1.1.0"
88+summary: A graphical test result viewer
89+description: |
90+ TRV (Test Result Viewer) is a simple graphical tool to inspect the contents
91+ of binary subunit test result streams.
92+confinement: strict
93+
94+apps:
95+ trv:
96+ command: desktop-launch trv
97+ plugs:
98+ - x11
99+
100+parts:
101+ trv:
102+ stage-packages:
103+ - python3-pyqt5
104+ plugin: python3
105+ requirements: "./requirements.txt"
106+
107+ source: ./
108+ after: [ desktop/qt5 ]

Subscribers

People subscribed via source and target branches

to all changes: