Merge lp:~cjwatson/txpkgupload/pip into lp:~lazr-developers/txpkgupload/trunk
- pip
- Merge into trunk
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | 27 |
Proposed branch: | lp:~cjwatson/txpkgupload/pip |
Merge into: | lp:~lazr-developers/txpkgupload/trunk |
Diff against target: |
700 lines (+103/-516) 10 files modified
.bzrignore (+1/-5) MANIFEST.in (+2/-4) Makefile (+52/-75) _bootstrap/COPYRIGHT.txt (+0/-9) _bootstrap/LICENSE.txt (+0/-54) _bootstrap/bootstrap.py (+0/-277) bootstrap-requirements.txt (+3/-0) buildout.cfg (+0/-33) requirements.txt (+45/-0) versions.cfg (+0/-59) |
To merge this branch: | bzr merge lp:~cjwatson/txpkgupload/pip |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kit Randel (community) | Approve | ||
Review via email: mp+277520@code.launchpad.net |
Commit message
Convert from buildout to pip.
Description of the change
Convert from buildout to pip. This will make it easier to upgrade to newer testtools/Twisted releases.
Before deploying this, we'll need to make sure that virtualenv is installed on pepo and haetae, by way of meta-lp-deps changes.
To post a comment you must log in.
Revision history for this message
Kit Randel (blr) : | # |
review:
Approve
lp:~cjwatson/txpkgupload/pip
updated
- 27. By Colin Watson
-
Merge trunk.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2015-01-09 15:55:08 +0000 | |||
3 | +++ .bzrignore 2015-11-17 13:24:41 +0000 | |||
4 | @@ -1,13 +1,9 @@ | |||
5 | 1 | bin | 1 | bin |
6 | 2 | develop-eggs | ||
7 | 3 | download-cache | 2 | download-cache |
11 | 4 | eggs | 3 | env |
9 | 5 | .installed.cfg | ||
10 | 6 | parts | ||
12 | 7 | *.egg-info | 4 | *.egg-info |
13 | 8 | tags | 5 | tags |
14 | 9 | TAGS | 6 | TAGS |
15 | 10 | build | ||
16 | 11 | *.egg | 7 | *.egg |
17 | 12 | dist | 8 | dist |
18 | 13 | src/twisted/plugins/dropin.cache | 9 | src/twisted/plugins/dropin.cache |
19 | 14 | 10 | ||
20 | === modified file 'MANIFEST.in' | |||
21 | --- MANIFEST.in 2015-01-13 11:15:52 +0000 | |||
22 | +++ MANIFEST.in 2015-11-17 13:24:41 +0000 | |||
23 | @@ -2,7 +2,5 @@ | |||
24 | 2 | include src/txpkgupload/tests/txpkgupload-sftp | 2 | include src/txpkgupload/tests/txpkgupload-sftp |
25 | 3 | include src/txpkgupload/tests/txpkgupload-sftp.pub | 3 | include src/txpkgupload/tests/txpkgupload-sftp.pub |
26 | 4 | graft etc | 4 | graft etc |
31 | 5 | exclude MANIFEST.in Makefile buildout.cfg bootstrap.py .bzrignore | 5 | exclude MANIFEST.in Makefile .bzrignore |
32 | 6 | prune _bootstrap | 6 | prune env |
29 | 7 | prune eggs | ||
30 | 8 | prune parts | ||
33 | 9 | 7 | ||
34 | === modified file 'Makefile' | |||
35 | --- Makefile 2015-01-13 17:19:01 +0000 | |||
36 | +++ Makefile 2015-11-17 13:24:41 +0000 | |||
37 | @@ -1,92 +1,69 @@ | |||
38 | 1 | # Copyright 2005-2015 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2005-2015 Canonical Ltd. This software is licensed under the |
39 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
40 | 3 | 3 | ||
49 | 4 | PYTHON = python | 4 | ENV = $(CURDIR)/env |
50 | 5 | 5 | ||
51 | 6 | BOOTSTRAP_BIN := bootstrap.py | 6 | PIP_ARGS := \ |
52 | 7 | BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN) | 7 | -q \ |
53 | 8 | 8 | --no-index \ | |
54 | 9 | BUILDOUT_BIN := bin/buildout | 9 | --find-links=file://$(CURDIR)/download-cache/dist |
55 | 10 | BUILDOUT_CFG := buildout.cfg | 10 | |
56 | 11 | BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) -qc $(BUILDOUT_CFG) | 11 | PYTHON = $(ENV)/bin/python |
57 | 12 | TWISTD = $(ENV)/bin/twistd | ||
58 | 12 | 13 | ||
59 | 13 | 14 | ||
60 | 14 | default: check | 15 | default: check |
61 | 15 | 16 | ||
62 | 16 | 17 | ||
85 | 17 | compile: bin/twistd | 18 | compile: $(ENV) |
86 | 18 | 19 | ||
87 | 19 | 20 | ||
88 | 20 | # When a built tree is moved this updates absolute paths. | 21 | check: $(ENV) |
89 | 21 | build-update-paths: | 22 | $(PYTHON) -m unittest discover src |
90 | 22 | $(BUILDOUT) | 23 | |
91 | 23 | 24 | ||
92 | 24 | 25 | dist: | |
93 | 25 | check: bin/test | 26 | python setup.py sdist |
94 | 26 | bin/test | 27 | |
95 | 27 | 28 | ||
96 | 28 | 29 | TAGS: | |
97 | 29 | dist: $(BUILDOUT_BIN) | 30 | ctags -e -R src |
98 | 30 | $(BUILDOUT) setup setup.py egg_info -r sdist | 31 | |
99 | 31 | 32 | ||
100 | 32 | 33 | tags: | |
101 | 33 | TAGS: bin/tags | 34 | ctags -R src |
80 | 34 | bin/tags --ctags-emacs | ||
81 | 35 | |||
82 | 36 | |||
83 | 37 | tags: bin/tags | ||
84 | 38 | bin/tags --ctags-vi | ||
102 | 39 | 35 | ||
103 | 40 | 36 | ||
104 | 41 | download-cache: | 37 | download-cache: |
133 | 42 | mkdir -p download-cache | 38 | ifeq ($(PIP_SOURCE_DIR),) |
134 | 43 | 39 | @echo "Set PIP_SOURCE_DIR to the path of a checkout of" >&2 | |
135 | 44 | 40 | @echo "lp:lp-source-dependencies." >&2 | |
136 | 45 | eggs: | 41 | @exit 1 |
137 | 46 | mkdir -p eggs | 42 | endif |
138 | 47 | 43 | ln -nsf $(PIP_SOURCE_DIR) download-cache | |
139 | 48 | 44 | ||
140 | 49 | $(BUILDOUT_BIN): download-cache eggs | 45 | |
141 | 50 | $(BOOTSTRAP) \ | 46 | $(ENV): download-cache |
142 | 51 | --setup-source=download-cache/dist/ez_setup.py \ | 47 | mkdir -p $(ENV) |
143 | 52 | --download-base=download-cache/dist \ | 48 | (echo '[easy_install]'; \ |
144 | 53 | --eggs=eggs --version=1.5.2 | 49 | echo "allow_hosts = ''"; \ |
145 | 54 | touch --no-create $@ | 50 | echo 'find_links = file://$(CURDIR)/download-cache/dist/') \ |
146 | 55 | 51 | >$(ENV)/.pydistutils.cfg | |
147 | 56 | 52 | VIRTUALENV_SETUPTOOLS=1 virtualenv $(ENV) | |
148 | 57 | bin/twistd: $(BUILDOUT_BIN) $(BUILDOUT_CFG) setup.py | 53 | $(ENV)/bin/pip install $(PIP_ARGS) -r bootstrap-requirements.txt |
149 | 58 | $(BUILDOUT) install runtime | 54 | $(ENV)/bin/pip install $(PIP_ARGS) -r requirements.txt -e . |
150 | 59 | 55 | $(ENV)/bin/python -m compileall -q src | |
151 | 60 | 56 | ln -nsf $(ENV)/bin bin | |
152 | 61 | bin/test: $(BUILDOUT_BIN) $(BUILDOUT_CFG) setup.py | 57 | |
153 | 62 | $(BUILDOUT) install test | 58 | |
154 | 63 | 59 | clean_pip: | |
127 | 64 | |||
128 | 65 | bin/tags: $(BUILDOUT_BIN) $(BUILDOUT_CFG) setup.py | ||
129 | 66 | $(BUILDOUT) install tags | ||
130 | 67 | |||
131 | 68 | |||
132 | 69 | clean_buildout: | ||
155 | 70 | $(RM) -r bin | 60 | $(RM) -r bin |
160 | 71 | $(RM) -r parts | 61 | $(RM) -r $(ENV) |
157 | 72 | $(RM) -r develop-eggs | ||
158 | 73 | $(RM) .installed.cfg | ||
159 | 74 | $(RM) -r build | ||
161 | 75 | $(RM) -r dist | 62 | $(RM) -r dist |
162 | 76 | 63 | ||
163 | 77 | 64 | ||
171 | 78 | clean_eggs: | 65 | clean: clean_pip |
165 | 79 | $(RM) -r download-cache | ||
166 | 80 | $(RM) -r *.egg-info | ||
167 | 81 | $(RM) -r eggs | ||
168 | 82 | |||
169 | 83 | |||
170 | 84 | clean: clean_buildout | ||
172 | 85 | find src -name '*.py[co]' -print0 | xargs -r0 $(RM) | 66 | find src -name '*.py[co]' -print0 | xargs -r0 $(RM) |
173 | 86 | 67 | ||
180 | 87 | clean_all: clean_buildout clean_eggs | 68 | |
181 | 88 | 69 | .PHONY: compile check clean clean_pip default dist | |
176 | 89 | |||
177 | 90 | .PHONY: \ | ||
178 | 91 | compile build-update-paths check clean clean_all clean_buildout \ | ||
179 | 92 | clean_eggs default dist | ||
182 | 93 | 70 | ||
183 | === removed directory '_bootstrap' | |||
184 | === removed file '_bootstrap/COPYRIGHT.txt' | |||
185 | --- _bootstrap/COPYRIGHT.txt 2015-01-06 12:03:45 +0000 | |||
186 | +++ _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000 | |||
187 | @@ -1,9 +0,0 @@ | |||
188 | 1 | Copyright (c) 2004-2009 Zope Corporation and Contributors. | ||
189 | 2 | All Rights Reserved. | ||
190 | 3 | |||
191 | 4 | This software is subject to the provisions of the Zope Public License, | ||
192 | 5 | Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
193 | 6 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
194 | 7 | WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
195 | 8 | WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
196 | 9 | FOR A PARTICULAR PURPOSE. | ||
197 | 10 | 0 | ||
198 | === removed file '_bootstrap/LICENSE.txt' | |||
199 | --- _bootstrap/LICENSE.txt 2015-01-06 12:03:45 +0000 | |||
200 | +++ _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000 | |||
201 | @@ -1,54 +0,0 @@ | |||
202 | 1 | Zope Public License (ZPL) Version 2.1 | ||
203 | 2 | ------------------------------------- | ||
204 | 3 | |||
205 | 4 | A copyright notice accompanies this license document that | ||
206 | 5 | identifies the copyright holders. | ||
207 | 6 | |||
208 | 7 | This license has been certified as open source. It has also | ||
209 | 8 | been designated as GPL compatible by the Free Software | ||
210 | 9 | Foundation (FSF). | ||
211 | 10 | |||
212 | 11 | Redistribution and use in source and binary forms, with or | ||
213 | 12 | without modification, are permitted provided that the | ||
214 | 13 | following conditions are met: | ||
215 | 14 | |||
216 | 15 | 1. Redistributions in source code must retain the | ||
217 | 16 | accompanying copyright notice, this list of conditions, | ||
218 | 17 | and the following disclaimer. | ||
219 | 18 | |||
220 | 19 | 2. Redistributions in binary form must reproduce the accompanying | ||
221 | 20 | copyright notice, this list of conditions, and the | ||
222 | 21 | following disclaimer in the documentation and/or other | ||
223 | 22 | materials provided with the distribution. | ||
224 | 23 | |||
225 | 24 | 3. Names of the copyright holders must not be used to | ||
226 | 25 | endorse or promote products derived from this software | ||
227 | 26 | without prior written permission from the copyright | ||
228 | 27 | holders. | ||
229 | 28 | |||
230 | 29 | 4. The right to distribute this software or to use it for | ||
231 | 30 | any purpose does not give you the right to use | ||
232 | 31 | Servicemarks (sm) or Trademarks (tm) of the copyright | ||
233 | 32 | holders. Use of them is covered by separate agreement | ||
234 | 33 | with the copyright holders. | ||
235 | 34 | |||
236 | 35 | 5. If any files are modified, you must cause the modified | ||
237 | 36 | files to carry prominent notices stating that you changed | ||
238 | 37 | the files and the date of any change. | ||
239 | 38 | |||
240 | 39 | Disclaimer | ||
241 | 40 | |||
242 | 41 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' | ||
243 | 42 | AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
244 | 43 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
245 | 44 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
246 | 45 | NO EVENT SHALL THE COPYRIGHT HOLDERS BE | ||
247 | 46 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
248 | 47 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
249 | 48 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
250 | 49 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
251 | 50 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
252 | 51 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
253 | 52 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
254 | 53 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
255 | 54 | DAMAGE. | ||
256 | 55 | \ No newline at end of file | 0 | \ No newline at end of file |
257 | 56 | 1 | ||
258 | === removed file '_bootstrap/bootstrap.py' | |||
259 | --- _bootstrap/bootstrap.py 2015-01-06 12:03:45 +0000 | |||
260 | +++ _bootstrap/bootstrap.py 1970-01-01 00:00:00 +0000 | |||
261 | @@ -1,277 +0,0 @@ | |||
262 | 1 | ############################################################################## | ||
263 | 2 | # | ||
264 | 3 | # Copyright (c) 2006 Zope Foundation and Contributors. | ||
265 | 4 | # All Rights Reserved. | ||
266 | 5 | # | ||
267 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
268 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
269 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
270 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
271 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
272 | 11 | # FOR A PARTICULAR PURPOSE. | ||
273 | 12 | # | ||
274 | 13 | ############################################################################## | ||
275 | 14 | """Bootstrap a buildout-based project | ||
276 | 15 | |||
277 | 16 | Simply run this script in a directory containing a buildout.cfg. | ||
278 | 17 | The script accepts buildout command-line options, so you can | ||
279 | 18 | use the -c option to specify an alternate configuration file. | ||
280 | 19 | """ | ||
281 | 20 | |||
282 | 21 | import os, shutil, sys, tempfile, urllib, urllib2, subprocess | ||
283 | 22 | from optparse import OptionParser | ||
284 | 23 | |||
285 | 24 | if sys.platform == 'win32': | ||
286 | 25 | def quote(c): | ||
287 | 26 | if ' ' in c: | ||
288 | 27 | return '"%s"' % c # work around spawn lamosity on windows | ||
289 | 28 | else: | ||
290 | 29 | return c | ||
291 | 30 | else: | ||
292 | 31 | quote = str | ||
293 | 32 | |||
294 | 33 | # See zc.buildout.easy_install._has_broken_dash_S for motivation and comments. | ||
295 | 34 | stdout, stderr = subprocess.Popen( | ||
296 | 35 | [sys.executable, '-Sc', | ||
297 | 36 | 'try:\n' | ||
298 | 37 | ' import ConfigParser\n' | ||
299 | 38 | 'except ImportError:\n' | ||
300 | 39 | ' print 1\n' | ||
301 | 40 | 'else:\n' | ||
302 | 41 | ' print 0\n'], | ||
303 | 42 | stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() | ||
304 | 43 | has_broken_dash_S = bool(int(stdout.strip())) | ||
305 | 44 | |||
306 | 45 | # In order to be more robust in the face of system Pythons, we want to | ||
307 | 46 | # run without site-packages loaded. This is somewhat tricky, in | ||
308 | 47 | # particular because Python 2.6's distutils imports site, so starting | ||
309 | 48 | # with the -S flag is not sufficient. However, we'll start with that: | ||
310 | 49 | if not has_broken_dash_S and 'site' in sys.modules: | ||
311 | 50 | # We will restart with python -S. | ||
312 | 51 | args = sys.argv[:] | ||
313 | 52 | args[0:0] = [sys.executable, '-S'] | ||
314 | 53 | args = map(quote, args) | ||
315 | 54 | os.execv(sys.executable, args) | ||
316 | 55 | # Now we are running with -S. We'll get the clean sys.path, import site | ||
317 | 56 | # because distutils will do it later, and then reset the path and clean | ||
318 | 57 | # out any namespace packages from site-packages that might have been | ||
319 | 58 | # loaded by .pth files. | ||
320 | 59 | clean_path = sys.path[:] | ||
321 | 60 | import site # imported because of its side effects | ||
322 | 61 | sys.path[:] = clean_path | ||
323 | 62 | for k, v in sys.modules.items(): | ||
324 | 63 | if k in ('setuptools', 'pkg_resources') or ( | ||
325 | 64 | hasattr(v, '__path__') and | ||
326 | 65 | len(v.__path__) == 1 and | ||
327 | 66 | not os.path.exists(os.path.join(v.__path__[0], '__init__.py'))): | ||
328 | 67 | # This is a namespace package. Remove it. | ||
329 | 68 | sys.modules.pop(k) | ||
330 | 69 | |||
331 | 70 | is_jython = sys.platform.startswith('java') | ||
332 | 71 | |||
333 | 72 | setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py' | ||
334 | 73 | distribute_source = 'http://python-distribute.org/distribute_setup.py' | ||
335 | 74 | distribute_source = 'https://bitbucket.org/pypa/setuptools/raw/f657df1f1ed46596d236376649c99a470662b4ba/distribute_setup.py' | ||
336 | 75 | |||
337 | 76 | # parsing arguments | ||
338 | 77 | def normalize_to_url(option, opt_str, value, parser): | ||
339 | 78 | if value: | ||
340 | 79 | if '://' not in value: # It doesn't smell like a URL. | ||
341 | 80 | value = 'file://%s' % ( | ||
342 | 81 | urllib.pathname2url( | ||
343 | 82 | os.path.abspath(os.path.expanduser(value))),) | ||
344 | 83 | if opt_str == '--download-base' and not value.endswith('/'): | ||
345 | 84 | # Download base needs a trailing slash to make the world happy. | ||
346 | 85 | value += '/' | ||
347 | 86 | else: | ||
348 | 87 | value = None | ||
349 | 88 | name = opt_str[2:].replace('-', '_') | ||
350 | 89 | setattr(parser.values, name, value) | ||
351 | 90 | |||
352 | 91 | usage = '''\ | ||
353 | 92 | [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] | ||
354 | 93 | |||
355 | 94 | Bootstraps a buildout-based project. | ||
356 | 95 | |||
357 | 96 | Simply run this script in a directory containing a buildout.cfg, using the | ||
358 | 97 | Python that you want bin/buildout to use. | ||
359 | 98 | |||
360 | 99 | Note that by using --setup-source and --download-base to point to | ||
361 | 100 | local resources, you can keep this script from going over the network. | ||
362 | 101 | ''' | ||
363 | 102 | |||
364 | 103 | parser = OptionParser(usage=usage) | ||
365 | 104 | parser.add_option("-v", "--version", dest="version", | ||
366 | 105 | help="use a specific zc.buildout version") | ||
367 | 106 | parser.add_option("-d", "--distribute", | ||
368 | 107 | action="store_true", dest="use_distribute", default=False, | ||
369 | 108 | help="Use Distribute rather than Setuptools.") | ||
370 | 109 | parser.add_option("--setup-source", action="callback", dest="setup_source", | ||
371 | 110 | callback=normalize_to_url, nargs=1, type="string", | ||
372 | 111 | help=("Specify a URL or file location for the setup file. " | ||
373 | 112 | "If you use Setuptools, this will default to " + | ||
374 | 113 | setuptools_source + "; if you use Distribute, this " | ||
375 | 114 | "will default to " + distribute_source + ".")) | ||
376 | 115 | parser.add_option("--download-base", action="callback", dest="download_base", | ||
377 | 116 | callback=normalize_to_url, nargs=1, type="string", | ||
378 | 117 | help=("Specify a URL or directory for downloading " | ||
379 | 118 | "zc.buildout and either Setuptools or Distribute. " | ||
380 | 119 | "Defaults to PyPI.")) | ||
381 | 120 | parser.add_option("--eggs", | ||
382 | 121 | help=("Specify a directory for storing eggs. Defaults to " | ||
383 | 122 | "a temporary directory that is deleted when the " | ||
384 | 123 | "bootstrap script completes.")) | ||
385 | 124 | parser.add_option("-t", "--accept-buildout-test-releases", | ||
386 | 125 | dest='accept_buildout_test_releases', | ||
387 | 126 | action="store_true", default=False, | ||
388 | 127 | help=("Normally, if you do not specify a --version, the " | ||
389 | 128 | "bootstrap script and buildout gets the newest " | ||
390 | 129 | "*final* versions of zc.buildout and its recipes and " | ||
391 | 130 | "extensions for you. If you use this flag, " | ||
392 | 131 | "bootstrap and buildout will get the newest releases " | ||
393 | 132 | "even if they are alphas or betas.")) | ||
394 | 133 | parser.add_option("-c", None, action="store", dest="config_file", | ||
395 | 134 | help=("Specify the path to the buildout configuration " | ||
396 | 135 | "file to be used.")) | ||
397 | 136 | |||
398 | 137 | options, args = parser.parse_args() | ||
399 | 138 | |||
400 | 139 | if options.eggs: | ||
401 | 140 | eggs_dir = os.path.abspath(os.path.expanduser(options.eggs)) | ||
402 | 141 | else: | ||
403 | 142 | eggs_dir = tempfile.mkdtemp() | ||
404 | 143 | |||
405 | 144 | if options.setup_source is None: | ||
406 | 145 | if options.use_distribute: | ||
407 | 146 | options.setup_source = distribute_source | ||
408 | 147 | else: | ||
409 | 148 | options.setup_source = setuptools_source | ||
410 | 149 | |||
411 | 150 | if options.accept_buildout_test_releases: | ||
412 | 151 | args.insert(0, 'buildout:accept-buildout-test-releases=true') | ||
413 | 152 | |||
414 | 153 | try: | ||
415 | 154 | import pkg_resources | ||
416 | 155 | import setuptools # A flag. Sometimes pkg_resources is installed alone. | ||
417 | 156 | if not hasattr(pkg_resources, '_distribute'): | ||
418 | 157 | raise ImportError | ||
419 | 158 | except ImportError: | ||
420 | 159 | ez_code = urllib2.urlopen( | ||
421 | 160 | options.setup_source).read().replace('\r\n', '\n') | ||
422 | 161 | ez = {} | ||
423 | 162 | exec ez_code in ez | ||
424 | 163 | setup_args = dict(to_dir=eggs_dir, download_delay=0) | ||
425 | 164 | if options.download_base: | ||
426 | 165 | setup_args['download_base'] = options.download_base | ||
427 | 166 | if options.use_distribute: | ||
428 | 167 | setup_args['no_fake'] = True | ||
429 | 168 | if sys.version_info[:2] == (2, 4): | ||
430 | 169 | setup_args['version'] = '0.6.32' | ||
431 | 170 | ez['use_setuptools'](**setup_args) | ||
432 | 171 | if 'pkg_resources' in sys.modules: | ||
433 | 172 | reload(sys.modules['pkg_resources']) | ||
434 | 173 | import pkg_resources | ||
435 | 174 | # This does not (always?) update the default working set. We will | ||
436 | 175 | # do it. | ||
437 | 176 | for path in sys.path: | ||
438 | 177 | if path not in pkg_resources.working_set.entries: | ||
439 | 178 | pkg_resources.working_set.add_entry(path) | ||
440 | 179 | |||
441 | 180 | cmd = [quote(sys.executable), | ||
442 | 181 | '-c', | ||
443 | 182 | quote('from setuptools.command.easy_install import main; main()'), | ||
444 | 183 | '-mqNxd', | ||
445 | 184 | quote(eggs_dir)] | ||
446 | 185 | |||
447 | 186 | if not has_broken_dash_S: | ||
448 | 187 | cmd.insert(1, '-S') | ||
449 | 188 | |||
450 | 189 | find_links = options.download_base | ||
451 | 190 | if not find_links: | ||
452 | 191 | find_links = os.environ.get('bootstrap-testing-find-links') | ||
453 | 192 | if not find_links and options.accept_buildout_test_releases: | ||
454 | 193 | find_links = 'http://downloads.buildout.org/' | ||
455 | 194 | if find_links: | ||
456 | 195 | cmd.extend(['-f', quote(find_links)]) | ||
457 | 196 | |||
458 | 197 | if options.use_distribute: | ||
459 | 198 | setup_requirement = 'distribute' | ||
460 | 199 | else: | ||
461 | 200 | setup_requirement = 'setuptools' | ||
462 | 201 | ws = pkg_resources.working_set | ||
463 | 202 | setup_requirement_path = ws.find( | ||
464 | 203 | pkg_resources.Requirement.parse(setup_requirement)).location | ||
465 | 204 | env = dict( | ||
466 | 205 | os.environ, | ||
467 | 206 | PYTHONPATH=setup_requirement_path) | ||
468 | 207 | |||
469 | 208 | requirement = 'zc.buildout' | ||
470 | 209 | version = options.version | ||
471 | 210 | if version is None and not options.accept_buildout_test_releases: | ||
472 | 211 | # Figure out the most recent final version of zc.buildout. | ||
473 | 212 | import setuptools.package_index | ||
474 | 213 | _final_parts = '*final-', '*final' | ||
475 | 214 | |||
476 | 215 | def _final_version(parsed_version): | ||
477 | 216 | for part in parsed_version: | ||
478 | 217 | if (part[:1] == '*') and (part not in _final_parts): | ||
479 | 218 | return False | ||
480 | 219 | return True | ||
481 | 220 | index = setuptools.package_index.PackageIndex( | ||
482 | 221 | search_path=[setup_requirement_path]) | ||
483 | 222 | if find_links: | ||
484 | 223 | index.add_find_links((find_links,)) | ||
485 | 224 | req = pkg_resources.Requirement.parse(requirement) | ||
486 | 225 | if index.obtain(req) is not None: | ||
487 | 226 | best = [] | ||
488 | 227 | bestv = None | ||
489 | 228 | for dist in index[req.project_name]: | ||
490 | 229 | distv = dist.parsed_version | ||
491 | 230 | if distv >= pkg_resources.parse_version('2dev'): | ||
492 | 231 | continue | ||
493 | 232 | if _final_version(distv): | ||
494 | 233 | if bestv is None or distv > bestv: | ||
495 | 234 | best = [dist] | ||
496 | 235 | bestv = distv | ||
497 | 236 | elif distv == bestv: | ||
498 | 237 | best.append(dist) | ||
499 | 238 | if best: | ||
500 | 239 | best.sort() | ||
501 | 240 | version = best[-1].version | ||
502 | 241 | |||
503 | 242 | if version: | ||
504 | 243 | requirement += '=='+version | ||
505 | 244 | else: | ||
506 | 245 | requirement += '<2dev' | ||
507 | 246 | |||
508 | 247 | cmd.append(requirement) | ||
509 | 248 | |||
510 | 249 | if is_jython: | ||
511 | 250 | import subprocess | ||
512 | 251 | exitcode = subprocess.Popen(cmd, env=env).wait() | ||
513 | 252 | else: # Windows prefers this, apparently; otherwise we would prefer subprocess | ||
514 | 253 | exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env])) | ||
515 | 254 | if exitcode != 0: | ||
516 | 255 | sys.stdout.flush() | ||
517 | 256 | sys.stderr.flush() | ||
518 | 257 | print ("An error occurred when trying to install zc.buildout. " | ||
519 | 258 | "Look above this message for any errors that " | ||
520 | 259 | "were output by easy_install.") | ||
521 | 260 | sys.exit(exitcode) | ||
522 | 261 | |||
523 | 262 | ws.add_entry(eggs_dir) | ||
524 | 263 | ws.require(requirement) | ||
525 | 264 | import zc.buildout.buildout | ||
526 | 265 | |||
527 | 266 | # If there isn't already a command in the args, add bootstrap | ||
528 | 267 | if not [a for a in args if '=' not in a]: | ||
529 | 268 | args.append('bootstrap') | ||
530 | 269 | |||
531 | 270 | |||
532 | 271 | # if -c was provided, we push it back into args for buildout's main function | ||
533 | 272 | if options.config_file is not None: | ||
534 | 273 | args[0:0] = ['-c', options.config_file] | ||
535 | 274 | |||
536 | 275 | zc.buildout.buildout.main(args) | ||
537 | 276 | if not options.eggs: # clean up temporary egg directory | ||
538 | 277 | shutil.rmtree(eggs_dir) | ||
539 | 278 | 0 | ||
540 | === added file 'bootstrap-requirements.txt' | |||
541 | --- bootstrap-requirements.txt 1970-01-01 00:00:00 +0000 | |||
542 | +++ bootstrap-requirements.txt 2015-11-17 13:24:41 +0000 | |||
543 | @@ -0,0 +1,3 @@ | |||
544 | 1 | pip==7.1.2 | ||
545 | 2 | setuptools==18.4 | ||
546 | 3 | wheel==0.24.0 | ||
547 | 0 | 4 | ||
548 | === removed symlink 'bootstrap.py' | |||
549 | === target was u'_bootstrap/bootstrap.py' | |||
550 | === removed file 'buildout.cfg' | |||
551 | --- buildout.cfg 2015-01-06 12:03:45 +0000 | |||
552 | +++ buildout.cfg 1970-01-01 00:00:00 +0000 | |||
553 | @@ -1,33 +0,0 @@ | |||
554 | 1 | [buildout] | ||
555 | 2 | extends = versions.cfg | ||
556 | 3 | parts = | ||
557 | 4 | runtime | ||
558 | 5 | test | ||
559 | 6 | tags | ||
560 | 7 | unzip = true | ||
561 | 8 | include-site-packages = false | ||
562 | 9 | allowed-eggs-from-site-packages = pyyaml | ||
563 | 10 | exec-sitecustomize = true | ||
564 | 11 | develop = . | ||
565 | 12 | download-cache = download-cache | ||
566 | 13 | eggs-directory = eggs | ||
567 | 14 | # Relative paths are useful when deploying built trees. | ||
568 | 15 | relative-paths = true | ||
569 | 16 | # Disable this option temporarily if you want buildout to find | ||
570 | 17 | # software dependencies *other* than those in our download-cache. | ||
571 | 18 | # Once you have the desired software, re-enable this option. | ||
572 | 19 | install-from-cache = true | ||
573 | 20 | |||
574 | 21 | [runtime] | ||
575 | 22 | recipe = z3c.recipe.scripts | ||
576 | 23 | eggs = txpkgupload | ||
577 | 24 | entry-points = twistd=twisted.scripts.twistd:run | ||
578 | 25 | |||
579 | 26 | [test] | ||
580 | 27 | recipe = zc.recipe.testrunner | ||
581 | 28 | eggs = txpkgupload [test] | ||
582 | 29 | defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split() | ||
583 | 30 | |||
584 | 31 | [tags] | ||
585 | 32 | recipe = z3c.recipe.tag:tags | ||
586 | 33 | eggs = txpkgupload | ||
587 | 34 | 0 | ||
588 | === added file 'requirements.txt' | |||
589 | --- requirements.txt 1970-01-01 00:00:00 +0000 | |||
590 | +++ requirements.txt 2015-11-17 13:24:41 +0000 | |||
591 | @@ -0,0 +1,45 @@ | |||
592 | 1 | bson==0.3.3 | ||
593 | 2 | extras==0.0.3 | ||
594 | 3 | fixtures==0.3.12 | ||
595 | 4 | FormEncode==1.2.4 | ||
596 | 5 | httplib2==0.8 | ||
597 | 6 | iso8601==0.1.4 | ||
598 | 7 | keyring==0.6.2 | ||
599 | 8 | launchpadlib==1.10.2 | ||
600 | 9 | lazr.authentication==0.1.1 | ||
601 | 10 | lazr.restfulclient==0.13.2 | ||
602 | 11 | lazr.sshserver==0.1.1 | ||
603 | 12 | lazr.uri==1.0.2 | ||
604 | 13 | oauth==1.0 | ||
605 | 14 | oops==0.0.10 | ||
606 | 15 | oops-datedir-repo==0.0.14 | ||
607 | 16 | oops-twisted==0.0.6 | ||
608 | 17 | oops-wsgi==0.0.8 | ||
609 | 18 | paste==1.7.5.1 | ||
610 | 19 | pyasn1==0.1.6 | ||
611 | 20 | pycrypto==2.6 | ||
612 | 21 | python-mimeparse==0.1.4 | ||
613 | 22 | PyYAML==3.10 | ||
614 | 23 | pytz==2014.10 | ||
615 | 24 | simplejson==3.1.3 | ||
616 | 25 | testresources==0.2.7 | ||
617 | 26 | testtools==0.9.30 | ||
618 | 27 | Twisted==13.0.0 | ||
619 | 28 | wadllib==1.3.2 | ||
620 | 29 | wsgi-intercept==0.5.1 | ||
621 | 30 | zope.browser==1.3 | ||
622 | 31 | zope.component==3.10.0 | ||
623 | 32 | zope.configuration==3.7.4 | ||
624 | 33 | zope.contenttype==3.5.5 | ||
625 | 34 | zope.event==3.5.2 | ||
626 | 35 | zope.exceptions==3.6.2 | ||
627 | 36 | zope.i18n==3.7.4 | ||
628 | 37 | zope.i18nmessageid==3.5.3 | ||
629 | 38 | zope.interface==3.8.0 | ||
630 | 39 | zope.location==3.9.1 | ||
631 | 40 | zope.proxy==3.6.1 | ||
632 | 41 | zope.publisher==3.12.6 | ||
633 | 42 | zope.schema==3.7.1 | ||
634 | 43 | zope.security==3.8.3 | ||
635 | 44 | zope.server==3.8.6 | ||
636 | 45 | zope.testrunner==4.0.3 | ||
637 | 0 | 46 | ||
638 | === removed file 'versions.cfg' | |||
639 | --- versions.cfg 2015-01-21 13:38:43 +0000 | |||
640 | +++ versions.cfg 1970-01-01 00:00:00 +0000 | |||
641 | @@ -1,59 +0,0 @@ | |||
642 | 1 | [buildout] | ||
643 | 2 | versions = versions | ||
644 | 3 | allow-picked-versions = false | ||
645 | 4 | use-dependency-links = false | ||
646 | 5 | |||
647 | 6 | [versions] | ||
648 | 7 | # Alphabetical, case-SENSITIVE, blank line after this comment | ||
649 | 8 | |||
650 | 9 | bson = 0.3.3 | ||
651 | 10 | extras = 0.0.3 | ||
652 | 11 | fixtures = 0.3.12 | ||
653 | 12 | FormEncode = 1.2.4 | ||
654 | 13 | httplib2 = 0.8 | ||
655 | 14 | iso8601 = 0.1.4 | ||
656 | 15 | keyring = 0.6.2 | ||
657 | 16 | launchpadlib = 1.10.2 | ||
658 | 17 | lazr.authentication = 0.1.1 | ||
659 | 18 | lazr.restfulclient = 0.13.2 | ||
660 | 19 | lazr.sshserver = 0.1.1 | ||
661 | 20 | lazr.uri = 1.0.2 | ||
662 | 21 | oauth = 1.0 | ||
663 | 22 | oops = 0.0.10 | ||
664 | 23 | oops-datedir-repo = 0.0.14 | ||
665 | 24 | oops-twisted = 0.0.6 | ||
666 | 25 | oops-wsgi = 0.0.8 | ||
667 | 26 | paste = 1.7.5.1 | ||
668 | 27 | pyasn1 = 0.1.6 | ||
669 | 28 | pycrypto = 2.6 | ||
670 | 29 | python-mimeparse = 0.1.4 | ||
671 | 30 | PyYAML = 3.10 | ||
672 | 31 | pytz = 2014.10 | ||
673 | 32 | setuptools = 0.6c11 | ||
674 | 33 | simplejson = 3.1.3 | ||
675 | 34 | testresources = 0.2.7 | ||
676 | 35 | testtools = 0.9.30 | ||
677 | 36 | Twisted = 13.0.0 | ||
678 | 37 | wadllib = 1.3.2 | ||
679 | 38 | wsgi-intercept = 0.5.1 | ||
680 | 39 | z3c.recipe.scripts = 1.0.1 | ||
681 | 40 | z3c.recipe.tag = 0.6 | ||
682 | 41 | zc.buildout = 1.5.2 | ||
683 | 42 | zc.recipe.egg = 1.3.2 | ||
684 | 43 | zc.recipe.testrunner = 1.4.0 | ||
685 | 44 | zope.browser = 1.3 | ||
686 | 45 | zope.component = 3.10.0 | ||
687 | 46 | zope.configuration = 3.7.4 | ||
688 | 47 | zope.contenttype = 3.5.5 | ||
689 | 48 | zope.event = 3.5.2 | ||
690 | 49 | zope.exceptions = 3.6.2 | ||
691 | 50 | zope.i18n = 3.7.4 | ||
692 | 51 | zope.i18nmessageid = 3.5.3 | ||
693 | 52 | zope.interface = 3.8.0 | ||
694 | 53 | zope.location = 3.9.1 | ||
695 | 54 | zope.proxy = 3.6.1 | ||
696 | 55 | zope.publisher = 3.12.6 | ||
697 | 56 | zope.schema = 3.7.1 | ||
698 | 57 | zope.security = 3.8.3 | ||
699 | 58 | zope.server = 3.8.6 | ||
700 | 59 | zope.testrunner = 4.0.3 |