Merge lp:~cjwatson/launchpad/simplify-buildout-recipes into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18458
Proposed branch: lp:~cjwatson/launchpad/simplify-buildout-recipes
Merge into: lp:launchpad
Prerequisite: lp:~cjwatson/launchpad/disable-pot-generation
Diff against target: 238 lines (+29/-54)
5 files modified
buildout.cfg (+3/-37)
lib/lp/scripts/runlaunchpad.py (+2/-3)
lib/lp/services/txlongpoll/tests/test_server.py (+2/-3)
setup.py (+21/-10)
utilities/start-dev-soyuz.sh (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad/simplify-buildout-recipes
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+330159@code.launchpad.net

Commit message

Consolidate scripts, iharness, txlongpoll, and txpkgupload buildout recipes into a single scripts recipe.

Description of the change

We don't gain much from carefully separating out different subsets of packages in sys.path for different programs, and doing so with pip would be extremely slow since it would require creating multiple virtualenvs.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildout.cfg'
2--- buildout.cfg 2017-09-04 13:17:45 +0000
3+++ buildout.cfg 2017-09-04 13:17:45 +0000
4@@ -5,9 +5,6 @@
5 parts =
6 scripts
7 tags
8- iharness
9- txlongpoll
10- txpkgupload
11 unzip = true
12 eggs-directory = eggs
13 download-cache = download-cache
14@@ -37,11 +34,11 @@
15 recipe = z3c.recipe.scripts
16 eggs = lp
17 celery
18- zc.zservertracelog
19- pyinotify
20- lpjsmin
21 jsautobuild
22 lazr.jobrunner
23+ lpjsmin
24+ pyinotify
25+ zc.zservertracelog
26 include-site-packages = true
27 allowed-eggs-from-site-packages =
28 interpreter = py
29@@ -50,38 +47,7 @@
30 # See buildout.cfg, [scripts] section, "initialization" key.
31 from lp_sitecustomize import main
32 main('${configuration:instance_name}') # Initializes LP environment.
33-entry-points =
34- googletestservice=lp.services.googlesearch.googletestservice:main
35- tracereport=zc.zservertracelog.tracereport:main
36-
37-[iharness]
38-recipe = z3c.recipe.scripts
39-eggs = ${scripts:eggs}
40- ipython
41-include-site-packages = true
42-allowed-eggs-from-site-packages =
43-initialization = ${scripts:initialization}
44-entry-points = iharness=lp.scripts.harness:ipython
45-scripts = iharness ipython=ipy
46
47 [tags]
48 recipe = z3c.recipe.tag:tags
49 eggs = lp
50-
51-[txlongpoll]
52-recipe = z3c.recipe.scripts
53-eggs = ${scripts:eggs}
54- txlongpoll
55-include-site-packages = false
56-initialization = ${scripts:initialization}
57-entry-points = twistd-for-txlongpoll=twisted.scripts.twistd:run
58-scripts = twistd-for-txlongpoll
59-
60-[txpkgupload]
61-recipe = z3c.recipe.scripts
62-eggs = ${scripts:eggs}
63- txpkgupload
64-include-site-packages = false
65-initialization = ${scripts:initialization}
66-entry-points = twistd-for-txpkgupload=twisted.scripts.twistd:run
67-scripts = twistd-for-txpkgupload
68
69=== modified file 'lib/lp/scripts/runlaunchpad.py'
70--- lib/lp/scripts/runlaunchpad.py 2016-02-05 16:51:12 +0000
71+++ lib/lp/scripts/runlaunchpad.py 2017-09-04 13:17:45 +0000
72@@ -1,4 +1,4 @@
73-# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
74+# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
75 # GNU Affero General Public License version 3 (see the file LICENSE).
76
77 __metaclass__ = type
78@@ -246,8 +246,7 @@
79 return config.txlongpoll.launch
80
81 def launch(self):
82- twistd_bin = os.path.join(
83- config.root, 'bin', 'twistd-for-txlongpoll')
84+ twistd_bin = os.path.join(config.root, 'bin', 'twistd')
85 broker_hostname, broker_port = as_host_port(
86 config.rabbitmq.host, None, None)
87 self.server = TxLongPollServer(
88
89=== modified file 'lib/lp/services/txlongpoll/tests/test_server.py'
90--- lib/lp/services/txlongpoll/tests/test_server.py 2012-01-01 02:58:52 +0000
91+++ lib/lp/services/txlongpoll/tests/test_server.py 2017-09-04 13:17:45 +0000
92@@ -1,4 +1,4 @@
93-# Copyright 2011 Canonical Ltd. This software is licensed under the
94+# Copyright 2011-2017 Canonical Ltd. This software is licensed under the
95 # GNU Affero General Public License version 3 (see the file LICENSE).
96
97 """Tests for lp.services.rabbit.TxLongPollServer."""
98@@ -22,8 +22,7 @@
99 def test_service_config(self):
100 # TxLongPollServer pokes some .ini configuration into its
101 # service_config attributes.
102- twistd_bin = os.path.join(
103- config.root, 'bin', 'twistd-for-txlongpoll')
104+ twistd_bin = os.path.join(config.root, 'bin', 'twistd')
105 fixture = self.useFixture(TxLongPollServer(
106 broker_user='guest', broker_password='guest', broker_vhost='/',
107 broker_port=123, frontend_port=None,
108
109=== modified file 'setup.py'
110--- setup.py 2017-05-11 14:33:38 +0000
111+++ setup.py 2017-09-04 13:17:45 +0000
112@@ -32,30 +32,28 @@
113 'backports.lzma',
114 'BeautifulSoup',
115 'bzr',
116+ 'celery',
117 'cssselect',
118 'cssutils',
119 'dkimpy',
120 # Required for dkimpy
121 'dnspython',
122- 'fixtures',
123 'FeedParser',
124 'feedvalidator',
125+ 'fixtures',
126 'html5browser',
127 'httmock',
128- 'pygpgme',
129- 'python-debian',
130- 'python-keystoneclient',
131- 'python-subunit',
132- 'python-swiftclient',
133+ 'ipython',
134+ 'jsautobuild',
135 'launchpad-buildd',
136 'launchpadlib',
137 'lazr.batchnavigator',
138 'lazr.config',
139 'lazr.delegates',
140 'lazr.enum',
141+ 'lazr.jobrunner',
142 'lazr.lifecycle',
143 'lazr.restful',
144- 'lazr.jobrunner',
145 'lazr.smtptest',
146 'lazr.sshserver',
147 'lazr.testing',
148@@ -76,10 +74,16 @@
149 'pgbouncer',
150 'psycopg2',
151 'pyasn1',
152+ 'pygpgme',
153+ 'pyinotify',
154 'pymacaroons',
155 'pystache',
156+ 'python-debian',
157+ 'python-keystoneclient',
158 'python-memcached',
159 'python-openid',
160+ 'python-subunit',
161+ 'python-swiftclient',
162 'pytz',
163 'PyYAML',
164 'rabbitfixture',
165@@ -89,9 +93,9 @@
166 'setproctitle',
167 'setuptools',
168 'six',
169- 'Sphinx',
170 'soupmatchers',
171 'sourcecodegen',
172+ 'Sphinx',
173 'storm',
174 'subvertpy',
175 'testscenarios',
176@@ -100,7 +104,9 @@
177 'transaction',
178 'Twisted',
179 'txfixtures',
180+ 'txlongpoll',
181 'txlongpollfixture',
182+ 'txpkgupload',
183 'wadllib',
184 'z3c.pt',
185 'z3c.ptcompat',
186@@ -113,8 +119,8 @@
187 'zope.app.testing',
188 'zope.app.wsgi',
189 'zope.authentication',
190+ 'zope.component[zcml]',
191 'zope.contenttype',
192- 'zope.component[zcml]',
193 'zope.datetime',
194 'zope.error',
195 'zope.event',
196@@ -127,8 +133,8 @@
197 'zope.login',
198 'zope.pagetemplate',
199 'zope.principalregistry',
200+ 'zope.proxy',
201 'zope.publisher',
202- 'zope.proxy',
203 'zope.schema',
204 'zope.security',
205 'zope.securitypolicy',
206@@ -165,7 +171,11 @@
207 'apiindex = lp.scripts.utilities.apiindex:main',
208 'bzr = lp.scripts.utilities.bzr:main',
209 'combine-css = lp.scripts.utilities.js.combinecss:main',
210+ 'googletestservice = '
211+ 'lp.services.googlesearch.googletestservice:main',
212 'harness = lp.scripts.harness:python',
213+ 'iharness = lp.scripts.harness:ipython',
214+ 'ipy = IPython.frontend.terminal.ipapp:launch_new_instance',
215 'jsbuild = lp.scripts.utilities.js.jsbuild:main',
216 'kill-test-services = lp.scripts.utilities.killtestservices:main',
217 'killservice = lp.scripts.utilities.killservice:main',
218@@ -175,6 +185,7 @@
219 'sprite-util = lp.scripts.utilities.spriteutil:main',
220 'start_librarian = lp.scripts.runlaunchpad:start_librarian',
221 'test = lp.scripts.utilities.test:main',
222+ 'tracereport = zc.zservertracelog.tracereport:main',
223 'twistd = twisted.scripts.twistd:run',
224 'watch_jsbuild = lp.scripts.utilities.js.watchjsbuild:main',
225 'with-xvfb = lp.scripts.utilities.withxvfb:main',
226
227=== modified file 'utilities/start-dev-soyuz.sh'
228--- utilities/start-dev-soyuz.sh 2015-01-13 16:02:40 +0000
229+++ utilities/start-dev-soyuz.sh 2017-09-04 13:17:45 +0000
230@@ -20,7 +20,7 @@
231 plugin=$2
232 shift 2
233 echo "Starting $name."
234- "bin/twistd-for-$name" \
235+ bin/twistd \
236 --logfile "/var/tmp/development-$name.log" \
237 --pidfile "/var/tmp/development-$name.pid" \
238 "$plugin" "$@"