Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | 137 |
Merged at revision: | 126 |
Proposed branch: | lp:~jml/pkgme/buildout |
Merge into: | lp:pkgme |
Diff against target: |
847 lines (+552/-66) 11 files modified
.bzrignore (+6/-0) .testr.conf (+1/-1) Makefile (+18/-0) README.txt (+29/-22) bootstrap.py (+262/-0) buildout.cfg (+36/-0) buildout.mk (+80/-0) distribute_setup.py (+74/-36) sphinx.mk (+3/-3) tarmac_tests.sh (+7/-4) versions.cfg (+36/-0) |
To merge this branch: | bzr merge lp:~jml/pkgme/buildout |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Approve | ||
Review via email: mp+117924@code.launchpad.net |
Commit message
Convert pkgme to buildout. (james_w)
Description of the change
Testing things.
ISD Branch Mangler (isd-branches-mangler) wrote : | # |
The attempt to merge lp:~jml/pkgme/buildout into lp:pkgme failed. Below is the output from the failed tests.
[ -d ../download-cache ] || bzr checkout lp:ca-download-cache ../download-cache
ln -s ../download-cache download-cache
python2.7 bootstrap.py --distribute --setup-source distribute_setup.py \
--download-
--version 1.5.1
touch --no-create bin/buildout
./bin/py -m testtools.run pkgme.tests.
Tests running...
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/backend.py", line 205, in want
return self._parse_
File "pkgme/backend.py", line 168, in _parse_want_output
"returned invalid score", str(result))
WantError: Backend pkgme.tests.
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/backend.py", line 205, in want
return self._parse_
File "pkgme/backend.py", line 168, in _parse_want_output
"returned invalid score", str(result))
WantError: Backend pkgme.tests.
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/
ep(argv=argv, target_dir=cwd, interactive=False)
File "pkgme/
write_
File "pkgme/
info = get_info_for(path, allowed_
File "pkgme/backend.py", line 82, in get_info_for
return selector.
File "pkgme/backend.py", line 344, in get_info
eligble = self.get_
File "pkgme/backend.py", line 328, in get_elig...
ISD Branch Mangler (isd-branches-mangler) wrote : | # |
The attempt to merge lp:~jml/pkgme/buildout into lp:pkgme failed. Below is the output from the failed tests.
[ -d ../download-cache ] || bzr checkout lp:ca-download-cache ../download-cache
ln -s ../download-cache download-cache
./bin/py -m testtools.run pkgme.tests.
Tests running...
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/backend.py", line 205, in want
return self._parse_
File "pkgme/backend.py", line 168, in _parse_want_output
"returned invalid score", str(result))
WantError: Backend pkgme.tests.
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/backend.py", line 205, in want
return self._parse_
File "pkgme/backend.py", line 168, in _parse_want_output
"returned invalid score", str(result))
WantError: Backend pkgme.tests.
=======
ERROR: pkgme.tests.
-------
Traceback (most recent call last):
File "pkgme/
self.
File "pkgme/
ep(argv=argv, target_dir=cwd, interactive=False)
File "pkgme/
write_
File "pkgme/
info = get_info_for(path, allowed_
File "pkgme/backend.py", line 82, in get_info_for
return selector.
File "pkgme/backend.py", line 344, in get_info
eligble = self.get_
File "pkgme/backend.py", line 328, in get_eligible_
score, reason = backend.want(path)
File "pkgme/backend.py", line 205, in want
return self._parse_
File "pkgme/backend.py", line 168, in ...
- 134. By Jonathan Lange
-
Get a traceback, hopefully
- 135. By Jonathan Lange
-
What happens if we don't specify which Python?
- 136. By Jonathan Lange
-
Go back to using env.
- 137. By Jonathan Lange
-
Require argparse, since Jenkins runs tests on Python 2.6
Jonathan Lange (jml) wrote : | # |
Require argparse, float the Python version.
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2011-11-16 10:31:43 +0000 | |||
3 | +++ .bzrignore 2012-08-02 16:24:39 +0000 | |||
4 | @@ -6,3 +6,9 @@ | |||
5 | 6 | fixtures-0.3.5-py2.6.egg | 6 | fixtures-0.3.5-py2.6.egg |
6 | 7 | bzr-orphans | 7 | bzr-orphans |
7 | 8 | virtualenv | 8 | virtualenv |
8 | 9 | .installed.cfg | ||
9 | 10 | ./bin | ||
10 | 11 | develop-eggs | ||
11 | 12 | download-cache | ||
12 | 13 | eggs | ||
13 | 14 | parts | ||
14 | 9 | 15 | ||
15 | === modified file '.testr.conf' | |||
16 | --- .testr.conf 2011-07-27 15:44:08 +0000 | |||
17 | +++ .testr.conf 2012-08-02 16:24:39 +0000 | |||
18 | @@ -1,3 +1,3 @@ | |||
19 | 1 | [DEFAULT] | 1 | [DEFAULT] |
21 | 2 | test_command=PYTHONPATH=`pwd` python -m subunit.run $IDLIST | 2 | test_command=./bin/py -m subunit.run $IDLIST |
22 | 3 | test_id_list_default=pkgme.tests.test_suite | 3 | test_id_list_default=pkgme.tests.test_suite |
23 | 4 | 4 | ||
24 | === added file 'Makefile' | |||
25 | --- Makefile 1970-01-01 00:00:00 +0000 | |||
26 | +++ Makefile 2012-08-02 16:24:39 +0000 | |||
27 | @@ -0,0 +1,18 @@ | |||
28 | 1 | # Copyright (C) 2012 Canonical Ltd. | ||
29 | 2 | # | ||
30 | 3 | # This program is free software: you can redistribute it and/or modify | ||
31 | 4 | # it under the terms of the GNU General Public License as published by | ||
32 | 5 | # the Free Software Foundation, version 3 of the License. | ||
33 | 6 | # | ||
34 | 7 | # This program is distributed in the hope that it will be useful, | ||
35 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
36 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
37 | 10 | # GNU General Public License for more details. | ||
38 | 11 | # | ||
39 | 12 | # You should have received a copy of the GNU General Public License | ||
40 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
41 | 14 | |||
42 | 15 | include buildout.mk | ||
43 | 16 | include sphinx.mk | ||
44 | 17 | |||
45 | 18 | TEST_COMMAND=$(PY) -m testtools.run pkgme.tests.test_suite | ||
46 | 0 | 19 | ||
47 | === modified file 'README.txt' | |||
48 | --- README.txt 2011-12-08 15:34:02 +0000 | |||
49 | +++ README.txt 2012-08-02 16:24:39 +0000 | |||
50 | @@ -34,16 +34,34 @@ | |||
51 | 34 | Developers | 34 | Developers |
52 | 35 | ========== | 35 | ========== |
53 | 36 | 36 | ||
64 | 37 | Right now, the best way to hack on ``pkgme`` is in a virtualenv_. This allows | 37 | To get a development environment set up (using ``buildout``) run:: |
65 | 38 | you to hack on ``pkgme`` in a clean environment, without touching or changing | 38 | |
66 | 39 | your system Python. You will need access to the internet in order to install | 39 | $ make bootstrap |
67 | 40 | ``pkgme`` into your virtualenv. On Debian/Ubuntu, make sure you have the | 40 | |
68 | 41 | `python-virtualenv` package installed, then do the following:: | 41 | You can then run the tests with |
69 | 42 | 42 | ||
70 | 43 | % virtualenv /arbitrary/path | 43 | $ make check |
71 | 44 | % source /arbitrary/path/bin/activate | 44 | |
72 | 45 | % python setup.py develop | 45 | The bootstrap will fail if you have a system-wide install of buildout that |
73 | 46 | <hack> | 46 | is the same version as the one in use by this project. (You will see |
74 | 47 | ``DistributionNotFound: zc.buildout==<version>``). If you encounter | ||
75 | 48 | that then you can either remove the site-wide install, or use a virtualenv | ||
76 | 49 | to run the bootstrap step. | ||
77 | 50 | |||
78 | 51 | You can get a shell to try code interactively by running ``./bin/py``. | ||
79 | 52 | |||
80 | 53 | Buildout uses two directories as caches that can be shared between branches. | ||
81 | 54 | The first is the ``download-cache`` directory. This contains all of the | ||
82 | 55 | distributions of the Python dependencies. You can get this from | ||
83 | 56 | ``lp:ca-download-cache``, but the Makefile will grab it for you. | ||
84 | 57 | |||
85 | 58 | The other directory is the ``eggs`` directory that holds built versions | ||
86 | 59 | of the dependencies. | ||
87 | 60 | |||
88 | 61 | The default for both of these is to symlink them from the parent directory, | ||
89 | 62 | but if you wish to put them somewhere else you can set the locations with | ||
90 | 63 | the ``CA_DOWNLOAD_CACHE_DIR`` and ``CA_EGGS_DIR`` environment variables. | ||
91 | 64 | |||
92 | 47 | 65 | ||
93 | 48 | If you want to override the default location of the backends, set the | 66 | If you want to override the default location of the backends, set the |
94 | 49 | environment variable ``$PKGME_BACKEND_PATHS``. This is a colon-separated list | 67 | environment variable ``$PKGME_BACKEND_PATHS``. This is a colon-separated list |
95 | @@ -51,18 +69,7 @@ | |||
96 | 51 | 69 | ||
97 | 52 | % export PKGME_BACKEND_PATHS=/pkgme/foo-backends:/pkgme/bar-backends | 70 | % export PKGME_BACKEND_PATHS=/pkgme/foo-backends:/pkgme/bar-backends |
98 | 53 | % cd my-about-to-be-packaged-code | 71 | % cd my-about-to-be-packaged-code |
111 | 54 | % pkgme | 72 | % ~/path/to/branch/bin/pkgme |
100 | 55 | |||
101 | 56 | When you're done, just run the ``deactivate`` command and blow away | ||
102 | 57 | `/arbitrary/path`. | ||
103 | 58 | |||
104 | 59 | |||
105 | 60 | Testing | ||
106 | 61 | ------- | ||
107 | 62 | |||
108 | 63 | While in your virtualenv, you can run the full test suite like so:: | ||
109 | 64 | |||
110 | 65 | % python setup.py test | ||
112 | 66 | 73 | ||
113 | 67 | 74 | ||
114 | 68 | Building the documentation | 75 | Building the documentation |
115 | 69 | 76 | ||
116 | === added file 'bootstrap.py' | |||
117 | --- bootstrap.py 1970-01-01 00:00:00 +0000 | |||
118 | +++ bootstrap.py 2012-08-02 16:24:39 +0000 | |||
119 | @@ -0,0 +1,262 @@ | |||
120 | 1 | ############################################################################## | ||
121 | 2 | # | ||
122 | 3 | # Copyright (c) 2006 Zope Foundation and Contributors. | ||
123 | 4 | # All Rights Reserved. | ||
124 | 5 | # | ||
125 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
126 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
127 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
128 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
129 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
130 | 11 | # FOR A PARTICULAR PURPOSE. | ||
131 | 12 | # | ||
132 | 13 | ############################################################################## | ||
133 | 14 | """Bootstrap a buildout-based project | ||
134 | 15 | |||
135 | 16 | Simply run this script in a directory containing a buildout.cfg. | ||
136 | 17 | The script accepts buildout command-line options, so you can | ||
137 | 18 | use the -c option to specify an alternate configuration file. | ||
138 | 19 | """ | ||
139 | 20 | |||
140 | 21 | import os, shutil, sys, tempfile, urllib, urllib2, subprocess | ||
141 | 22 | from optparse import OptionParser | ||
142 | 23 | |||
143 | 24 | if sys.platform == 'win32': | ||
144 | 25 | def quote(c): | ||
145 | 26 | if ' ' in c: | ||
146 | 27 | return '"%s"' % c # work around spawn lamosity on windows | ||
147 | 28 | else: | ||
148 | 29 | return c | ||
149 | 30 | else: | ||
150 | 31 | quote = str | ||
151 | 32 | |||
152 | 33 | # See zc.buildout.easy_install._has_broken_dash_S for motivation and comments. | ||
153 | 34 | stdout, stderr = subprocess.Popen( | ||
154 | 35 | [sys.executable, '-Sc', | ||
155 | 36 | 'try:\n' | ||
156 | 37 | ' import ConfigParser\n' | ||
157 | 38 | 'except ImportError:\n' | ||
158 | 39 | ' print 1\n' | ||
159 | 40 | 'else:\n' | ||
160 | 41 | ' print 0\n'], | ||
161 | 42 | stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() | ||
162 | 43 | has_broken_dash_S = bool(int(stdout.strip())) | ||
163 | 44 | |||
164 | 45 | # In order to be more robust in the face of system Pythons, we want to | ||
165 | 46 | # run without site-packages loaded. This is somewhat tricky, in | ||
166 | 47 | # particular because Python 2.6's distutils imports site, so starting | ||
167 | 48 | # with the -S flag is not sufficient. However, we'll start with that: | ||
168 | 49 | if not has_broken_dash_S and 'site' in sys.modules: | ||
169 | 50 | # We will restart with python -S. | ||
170 | 51 | args = sys.argv[:] | ||
171 | 52 | args[0:0] = [sys.executable, '-S'] | ||
172 | 53 | args = map(quote, args) | ||
173 | 54 | os.execv(sys.executable, args) | ||
174 | 55 | # Now we are running with -S. We'll get the clean sys.path, import site | ||
175 | 56 | # because distutils will do it later, and then reset the path and clean | ||
176 | 57 | # out any namespace packages from site-packages that might have been | ||
177 | 58 | # loaded by .pth files. | ||
178 | 59 | clean_path = sys.path[:] | ||
179 | 60 | import site # imported because of its side effects | ||
180 | 61 | sys.path[:] = clean_path | ||
181 | 62 | for k, v in sys.modules.items(): | ||
182 | 63 | if k in ('setuptools', 'pkg_resources') or ( | ||
183 | 64 | hasattr(v, '__path__') and | ||
184 | 65 | len(v.__path__) == 1 and | ||
185 | 66 | not os.path.exists(os.path.join(v.__path__[0], '__init__.py'))): | ||
186 | 67 | # This is a namespace package. Remove it. | ||
187 | 68 | sys.modules.pop(k) | ||
188 | 69 | |||
189 | 70 | is_jython = sys.platform.startswith('java') | ||
190 | 71 | |||
191 | 72 | setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py' | ||
192 | 73 | distribute_source = 'http://python-distribute.org/distribute_setup.py' | ||
193 | 74 | |||
194 | 75 | |||
195 | 76 | # parsing arguments | ||
196 | 77 | def normalize_to_url(option, opt_str, value, parser): | ||
197 | 78 | if value: | ||
198 | 79 | if '://' not in value: # It doesn't smell like a URL. | ||
199 | 80 | value = 'file://%s' % ( | ||
200 | 81 | urllib.pathname2url( | ||
201 | 82 | os.path.abspath(os.path.expanduser(value))),) | ||
202 | 83 | if opt_str == '--download-base' and not value.endswith('/'): | ||
203 | 84 | # Download base needs a trailing slash to make the world happy. | ||
204 | 85 | value += '/' | ||
205 | 86 | else: | ||
206 | 87 | value = None | ||
207 | 88 | name = opt_str[2:].replace('-', '_') | ||
208 | 89 | setattr(parser.values, name, value) | ||
209 | 90 | |||
210 | 91 | usage = '''\ | ||
211 | 92 | [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] | ||
212 | 93 | |||
213 | 94 | Bootstraps a buildout-based project. | ||
214 | 95 | |||
215 | 96 | Simply run this script in a directory containing a buildout.cfg, using the | ||
216 | 97 | Python that you want bin/buildout to use. | ||
217 | 98 | |||
218 | 99 | Note that by using --setup-source and --download-base to point to | ||
219 | 100 | local resources, you can keep this script from going over the network. | ||
220 | 101 | ''' | ||
221 | 102 | |||
222 | 103 | parser = OptionParser(usage=usage) | ||
223 | 104 | parser.add_option("-v", "--version", dest="version", | ||
224 | 105 | help="use a specific zc.buildout version") | ||
225 | 106 | parser.add_option("-d", "--distribute", | ||
226 | 107 | action="store_true", dest="use_distribute", default=False, | ||
227 | 108 | help="Use Distribute rather than Setuptools.") | ||
228 | 109 | parser.add_option("--setup-source", action="callback", dest="setup_source", | ||
229 | 110 | callback=normalize_to_url, nargs=1, type="string", | ||
230 | 111 | help=("Specify a URL or file location for the setup file. " | ||
231 | 112 | "If you use Setuptools, this will default to " + | ||
232 | 113 | setuptools_source + "; if you use Distribute, this " | ||
233 | 114 | "will default to " + distribute_source + ".")) | ||
234 | 115 | parser.add_option("--download-base", action="callback", dest="download_base", | ||
235 | 116 | callback=normalize_to_url, nargs=1, type="string", | ||
236 | 117 | help=("Specify a URL or directory for downloading " | ||
237 | 118 | "zc.buildout and either Setuptools or Distribute. " | ||
238 | 119 | "Defaults to PyPI.")) | ||
239 | 120 | parser.add_option("--eggs", | ||
240 | 121 | help=("Specify a directory for storing eggs. Defaults to " | ||
241 | 122 | "a temporary directory that is deleted when the " | ||
242 | 123 | "bootstrap script completes.")) | ||
243 | 124 | parser.add_option("-t", "--accept-buildout-test-releases", | ||
244 | 125 | dest='accept_buildout_test_releases', | ||
245 | 126 | action="store_true", default=False, | ||
246 | 127 | help=("Normally, if you do not specify a --version, the " | ||
247 | 128 | "bootstrap script and buildout gets the newest " | ||
248 | 129 | "*final* versions of zc.buildout and its recipes and " | ||
249 | 130 | "extensions for you. If you use this flag, " | ||
250 | 131 | "bootstrap and buildout will get the newest releases " | ||
251 | 132 | "even if they are alphas or betas.")) | ||
252 | 133 | parser.add_option("-c", None, action="store", dest="config_file", | ||
253 | 134 | help=("Specify the path to the buildout configuration " | ||
254 | 135 | "file to be used.")) | ||
255 | 136 | |||
256 | 137 | options, args = parser.parse_args() | ||
257 | 138 | |||
258 | 139 | # if -c was provided, we push it back into args for buildout's main function | ||
259 | 140 | if options.config_file is not None: | ||
260 | 141 | args += ['-c', options.config_file] | ||
261 | 142 | |||
262 | 143 | if options.eggs: | ||
263 | 144 | eggs_dir = os.path.abspath(os.path.expanduser(options.eggs)) | ||
264 | 145 | else: | ||
265 | 146 | eggs_dir = tempfile.mkdtemp() | ||
266 | 147 | |||
267 | 148 | if options.setup_source is None: | ||
268 | 149 | if options.use_distribute: | ||
269 | 150 | options.setup_source = distribute_source | ||
270 | 151 | else: | ||
271 | 152 | options.setup_source = setuptools_source | ||
272 | 153 | |||
273 | 154 | if options.accept_buildout_test_releases: | ||
274 | 155 | args.append('buildout:accept-buildout-test-releases=true') | ||
275 | 156 | args.append('bootstrap') | ||
276 | 157 | |||
277 | 158 | try: | ||
278 | 159 | import pkg_resources | ||
279 | 160 | import setuptools # A flag. Sometimes pkg_resources is installed alone. | ||
280 | 161 | if not hasattr(pkg_resources, '_distribute'): | ||
281 | 162 | raise ImportError | ||
282 | 163 | except ImportError: | ||
283 | 164 | ez_code = urllib2.urlopen( | ||
284 | 165 | options.setup_source).read().replace('\r\n', '\n') | ||
285 | 166 | ez = {} | ||
286 | 167 | exec ez_code in ez | ||
287 | 168 | setup_args = dict(to_dir=eggs_dir, download_delay=0) | ||
288 | 169 | if options.download_base: | ||
289 | 170 | setup_args['download_base'] = options.download_base | ||
290 | 171 | if options.use_distribute: | ||
291 | 172 | setup_args['no_fake'] = True | ||
292 | 173 | ez['use_setuptools'](**setup_args) | ||
293 | 174 | if 'pkg_resources' in sys.modules: | ||
294 | 175 | reload(sys.modules['pkg_resources']) | ||
295 | 176 | import pkg_resources | ||
296 | 177 | # This does not (always?) update the default working set. We will | ||
297 | 178 | # do it. | ||
298 | 179 | for path in sys.path: | ||
299 | 180 | if path not in pkg_resources.working_set.entries: | ||
300 | 181 | pkg_resources.working_set.add_entry(path) | ||
301 | 182 | |||
302 | 183 | cmd = [quote(sys.executable), | ||
303 | 184 | '-c', | ||
304 | 185 | quote('from setuptools.command.easy_install import main; main()'), | ||
305 | 186 | '-mqNxd', | ||
306 | 187 | quote(eggs_dir)] | ||
307 | 188 | |||
308 | 189 | if not has_broken_dash_S: | ||
309 | 190 | cmd.insert(1, '-S') | ||
310 | 191 | |||
311 | 192 | find_links = options.download_base | ||
312 | 193 | if not find_links: | ||
313 | 194 | find_links = os.environ.get('bootstrap-testing-find-links') | ||
314 | 195 | if find_links: | ||
315 | 196 | cmd.extend(['-f', quote(find_links)]) | ||
316 | 197 | |||
317 | 198 | if options.use_distribute: | ||
318 | 199 | setup_requirement = 'distribute' | ||
319 | 200 | else: | ||
320 | 201 | setup_requirement = 'setuptools' | ||
321 | 202 | ws = pkg_resources.working_set | ||
322 | 203 | setup_requirement_path = ws.find( | ||
323 | 204 | pkg_resources.Requirement.parse(setup_requirement)).location | ||
324 | 205 | env = dict( | ||
325 | 206 | os.environ, | ||
326 | 207 | PYTHONPATH=setup_requirement_path) | ||
327 | 208 | |||
328 | 209 | requirement = 'zc.buildout' | ||
329 | 210 | version = options.version | ||
330 | 211 | if version is None and not options.accept_buildout_test_releases: | ||
331 | 212 | # Figure out the most recent final version of zc.buildout. | ||
332 | 213 | import setuptools.package_index | ||
333 | 214 | _final_parts = '*final-', '*final' | ||
334 | 215 | |||
335 | 216 | def _final_version(parsed_version): | ||
336 | 217 | for part in parsed_version: | ||
337 | 218 | if (part[:1] == '*') and (part not in _final_parts): | ||
338 | 219 | return False | ||
339 | 220 | return True | ||
340 | 221 | index = setuptools.package_index.PackageIndex( | ||
341 | 222 | search_path=[setup_requirement_path]) | ||
342 | 223 | if find_links: | ||
343 | 224 | index.add_find_links((find_links,)) | ||
344 | 225 | req = pkg_resources.Requirement.parse(requirement) | ||
345 | 226 | if index.obtain(req) is not None: | ||
346 | 227 | best = [] | ||
347 | 228 | bestv = None | ||
348 | 229 | for dist in index[req.project_name]: | ||
349 | 230 | distv = dist.parsed_version | ||
350 | 231 | if _final_version(distv): | ||
351 | 232 | if bestv is None or distv > bestv: | ||
352 | 233 | best = [dist] | ||
353 | 234 | bestv = distv | ||
354 | 235 | elif distv == bestv: | ||
355 | 236 | best.append(dist) | ||
356 | 237 | if best: | ||
357 | 238 | best.sort() | ||
358 | 239 | version = best[-1].version | ||
359 | 240 | if version: | ||
360 | 241 | requirement = '=='.join((requirement, version)) | ||
361 | 242 | cmd.append(requirement) | ||
362 | 243 | |||
363 | 244 | if is_jython: | ||
364 | 245 | import subprocess | ||
365 | 246 | exitcode = subprocess.Popen(cmd, env=env).wait() | ||
366 | 247 | else: # Windows prefers this, apparently; otherwise we would prefer subprocess | ||
367 | 248 | exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env])) | ||
368 | 249 | if exitcode != 0: | ||
369 | 250 | sys.stdout.flush() | ||
370 | 251 | sys.stderr.flush() | ||
371 | 252 | print ("An error occurred when trying to install zc.buildout. " | ||
372 | 253 | "Look above this message for any errors that " | ||
373 | 254 | "were output by easy_install.") | ||
374 | 255 | sys.exit(exitcode) | ||
375 | 256 | |||
376 | 257 | ws.add_entry(eggs_dir) | ||
377 | 258 | ws.require(requirement) | ||
378 | 259 | import zc.buildout.buildout | ||
379 | 260 | zc.buildout.buildout.main(args) | ||
380 | 261 | if not options.eggs: # clean up temporary egg directory | ||
381 | 262 | shutil.rmtree(eggs_dir) | ||
382 | 0 | 263 | ||
383 | === added file 'buildout.cfg' | |||
384 | --- buildout.cfg 1970-01-01 00:00:00 +0000 | |||
385 | +++ buildout.cfg 2012-08-02 16:24:39 +0000 | |||
386 | @@ -0,0 +1,36 @@ | |||
387 | 1 | # Copyright 2009-2011 Canonical Ltd. This software is licensed under the | ||
388 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
389 | 3 | |||
390 | 4 | [buildout] | ||
391 | 5 | parts = | ||
392 | 6 | scripts | ||
393 | 7 | unzip = true | ||
394 | 8 | eggs-directory = eggs | ||
395 | 9 | download-cache = download-cache | ||
396 | 10 | relative-paths = true | ||
397 | 11 | |||
398 | 12 | # Disable this option temporarily if you want buildout to find software | ||
399 | 13 | # dependencies *other* than those in our download-cache. Once you have the | ||
400 | 14 | # desired software, reenable this option (and check in the new software to | ||
401 | 15 | # lp:ca-dependencies if this is going to be reviewed/merged/deployed.) | ||
402 | 16 | install-from-cache = true | ||
403 | 17 | |||
404 | 18 | # This also will need to be temporarily disabled or changed for package | ||
405 | 19 | # upgrades. Newly-added packages should also add their desired version number | ||
406 | 20 | # to versions.cfg. | ||
407 | 21 | extends = versions.cfg | ||
408 | 22 | |||
409 | 23 | allow-picked-versions = false | ||
410 | 24 | |||
411 | 25 | prefer-final = true | ||
412 | 26 | |||
413 | 27 | develop = . | ||
414 | 28 | |||
415 | 29 | [scripts] | ||
416 | 30 | recipe = z3c.recipe.scripts | ||
417 | 31 | # Test dependencies get added here | ||
418 | 32 | # python-subunit is needed for those that use testr | ||
419 | 33 | eggs = pkgme | ||
420 | 34 | python-subunit | ||
421 | 35 | include-site-packages = false | ||
422 | 36 | interpreter = py | ||
423 | 0 | 37 | ||
424 | === added file 'buildout.mk' | |||
425 | --- buildout.mk 1970-01-01 00:00:00 +0000 | |||
426 | +++ buildout.mk 2012-08-02 16:24:39 +0000 | |||
427 | @@ -0,0 +1,80 @@ | |||
428 | 1 | # Copyright (C) 2012 Canonical Ltd. | ||
429 | 2 | # | ||
430 | 3 | # This program is free software: you can redistribute it and/or modify | ||
431 | 4 | # it under the terms of the GNU General Public License as published by | ||
432 | 5 | # the Free Software Foundation, version 3 of the License. | ||
433 | 6 | # | ||
434 | 7 | # This program is distributed in the hope that it will be useful, | ||
435 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
436 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
437 | 10 | # GNU General Public License for more details. | ||
438 | 11 | # | ||
439 | 12 | # You should have received a copy of the GNU General Public License | ||
440 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
441 | 14 | |||
442 | 15 | EXTERNAL_PY?=python | ||
443 | 16 | PY=./bin/py | ||
444 | 17 | |||
445 | 18 | EXTERNAL_BUILDOUT?=$(EXTERNAL_PY) bootstrap.py | ||
446 | 19 | BUILDOUT=./bin/buildout | ||
447 | 20 | |||
448 | 21 | CA_EGGS_DIR?=../eggs | ||
449 | 22 | CA_DOWNLOAD_CACHE_DIR?=../download-cache | ||
450 | 23 | |||
451 | 24 | clean: | ||
452 | 25 | $(RM) -r bin | ||
453 | 26 | $(RM) -r develop-eggs | ||
454 | 27 | ifeq ($(CA_EGGS_DIR),eggs) | ||
455 | 28 | $(RM) -r eggs | ||
456 | 29 | else | ||
457 | 30 | $(RM) eggs | ||
458 | 31 | endif | ||
459 | 32 | ifeq ($(CA_DOWNLOAD_CACHE_DIR),download-cache) | ||
460 | 33 | $(RM) -r download-cache | ||
461 | 34 | else | ||
462 | 35 | $(RM) download-cache | ||
463 | 36 | endif | ||
464 | 37 | $(RM) -r parts | ||
465 | 38 | $(RM) -r .installed.cfg | ||
466 | 39 | |||
467 | 40 | eggs: | ||
468 | 41 | ifeq ($(CA_EGGS_DIR),$@) | ||
469 | 42 | mkdir $@ | ||
470 | 43 | else | ||
471 | 44 | [ -d $(CA_EGGS_DIR) ] || mkdir $(CA_EGGS_DIR) | ||
472 | 45 | ln -s $(CA_EGGS_DIR) $@ | ||
473 | 46 | endif | ||
474 | 47 | |||
475 | 48 | download-cache: | ||
476 | 49 | ifeq ($(CA_DOWNLOAD_CACHE_DIR),$@) | ||
477 | 50 | bzr checkout lp:ca-download-cache $@ | ||
478 | 51 | else | ||
479 | 52 | [ -d $(CA_DOWNLOAD_CACHE_DIR) ] || bzr checkout lp:ca-download-cache $(CA_DOWNLOAD_CACHE_DIR) | ||
480 | 53 | ln -s $(CA_DOWNLOAD_CACHE_DIR) $@ | ||
481 | 54 | endif | ||
482 | 55 | |||
483 | 56 | $(BUILDOUT): bootstrap.py distribute_setup.py eggs download-cache | ||
484 | 57 | $(EXTERNAL_BUILDOUT) --distribute --setup-source distribute_setup.py \ | ||
485 | 58 | --download-base=download-cache/dist --eggs=eggs \ | ||
486 | 59 | --version 1.5.1 | ||
487 | 60 | touch --no-create $@ | ||
488 | 61 | |||
489 | 62 | $(PY): $(BUILDOUT) | ||
490 | 63 | $(BUILDOUT) | ||
491 | 64 | touch --no-create $@ | ||
492 | 65 | |||
493 | 66 | bootstrap: clean $(PY) | ||
494 | 67 | |||
495 | 68 | test: $(PY) | ||
496 | 69 | $(TEST_COMMAND) | ||
497 | 70 | |||
498 | 71 | check: test | ||
499 | 72 | |||
500 | 73 | # Can be used to update the dependencies when you change something | ||
501 | 74 | # in versions.cfg. | ||
502 | 75 | update-deps: $(BUILDOUT) | ||
503 | 76 | $(BUILDOUT) buildout:install-from-cache=false | ||
504 | 77 | |||
505 | 78 | |||
506 | 79 | .PHONY: bootstrap test check clean fetch-deps | ||
507 | 80 | .DEFAULT_GOAL := $(PY) | ||
508 | 0 | 81 | ||
509 | === modified file 'distribute_setup.py' | |||
510 | --- distribute_setup.py 2010-11-10 22:19:38 +0000 | |||
511 | +++ distribute_setup.py 2012-08-02 16:24:39 +0000 | |||
512 | @@ -46,7 +46,7 @@ | |||
513 | 46 | args = [quote(arg) for arg in args] | 46 | args = [quote(arg) for arg in args] |
514 | 47 | return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 | 47 | return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 |
515 | 48 | 48 | ||
517 | 49 | DEFAULT_VERSION = "0.6.10" | 49 | DEFAULT_VERSION = "0.6.28" |
518 | 50 | DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" | 50 | DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" |
519 | 51 | SETUPTOOLS_FAKED_VERSION = "0.6c11" | 51 | SETUPTOOLS_FAKED_VERSION = "0.6c11" |
520 | 52 | 52 | ||
521 | @@ -63,7 +63,7 @@ | |||
522 | 63 | """ % SETUPTOOLS_FAKED_VERSION | 63 | """ % SETUPTOOLS_FAKED_VERSION |
523 | 64 | 64 | ||
524 | 65 | 65 | ||
526 | 66 | def _install(tarball): | 66 | def _install(tarball, install_args=()): |
527 | 67 | # extracting the tarball | 67 | # extracting the tarball |
528 | 68 | tmpdir = tempfile.mkdtemp() | 68 | tmpdir = tempfile.mkdtemp() |
529 | 69 | log.warn('Extracting in %s', tmpdir) | 69 | log.warn('Extracting in %s', tmpdir) |
530 | @@ -81,7 +81,7 @@ | |||
531 | 81 | 81 | ||
532 | 82 | # installing | 82 | # installing |
533 | 83 | log.warn('Installing Distribute') | 83 | log.warn('Installing Distribute') |
535 | 84 | if not _python_cmd('setup.py', 'install'): | 84 | if not _python_cmd('setup.py', 'install', *install_args): |
536 | 85 | log.warn('Something went wrong during the installation.') | 85 | log.warn('Something went wrong during the installation.') |
537 | 86 | log.warn('See the error message above.') | 86 | log.warn('See the error message above.') |
538 | 87 | finally: | 87 | finally: |
539 | @@ -144,7 +144,7 @@ | |||
540 | 144 | except ImportError: | 144 | except ImportError: |
541 | 145 | return _do_download(version, download_base, to_dir, download_delay) | 145 | return _do_download(version, download_base, to_dir, download_delay) |
542 | 146 | try: | 146 | try: |
544 | 147 | pkg_resources.require("distribute>="+version) | 147 | pkg_resources.require("distribute>=" + version) |
545 | 148 | return | 148 | return |
546 | 149 | except pkg_resources.VersionConflict: | 149 | except pkg_resources.VersionConflict: |
547 | 150 | e = sys.exc_info()[1] | 150 | e = sys.exc_info()[1] |
548 | @@ -167,6 +167,7 @@ | |||
549 | 167 | if not no_fake: | 167 | if not no_fake: |
550 | 168 | _create_fake_setuptools_pkg_info(to_dir) | 168 | _create_fake_setuptools_pkg_info(to_dir) |
551 | 169 | 169 | ||
552 | 170 | |||
553 | 170 | def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, | 171 | def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, |
554 | 171 | to_dir=os.curdir, delay=15): | 172 | to_dir=os.curdir, delay=15): |
555 | 172 | """Download distribute from a specified location and return its filename | 173 | """Download distribute from a specified location and return its filename |
556 | @@ -204,6 +205,31 @@ | |||
557 | 204 | return os.path.realpath(saveto) | 205 | return os.path.realpath(saveto) |
558 | 205 | 206 | ||
559 | 206 | 207 | ||
560 | 208 | def _no_sandbox(function): | ||
561 | 209 | def __no_sandbox(*args, **kw): | ||
562 | 210 | try: | ||
563 | 211 | from setuptools.sandbox import DirectorySandbox | ||
564 | 212 | if not hasattr(DirectorySandbox, '_old'): | ||
565 | 213 | def violation(*args): | ||
566 | 214 | pass | ||
567 | 215 | DirectorySandbox._old = DirectorySandbox._violation | ||
568 | 216 | DirectorySandbox._violation = violation | ||
569 | 217 | patched = True | ||
570 | 218 | else: | ||
571 | 219 | patched = False | ||
572 | 220 | except ImportError: | ||
573 | 221 | patched = False | ||
574 | 222 | |||
575 | 223 | try: | ||
576 | 224 | return function(*args, **kw) | ||
577 | 225 | finally: | ||
578 | 226 | if patched: | ||
579 | 227 | DirectorySandbox._violation = DirectorySandbox._old | ||
580 | 228 | del DirectorySandbox._old | ||
581 | 229 | |||
582 | 230 | return __no_sandbox | ||
583 | 231 | |||
584 | 232 | |||
585 | 207 | def _patch_file(path, content): | 233 | def _patch_file(path, content): |
586 | 208 | """Will backup the file then patch it""" | 234 | """Will backup the file then patch it""" |
587 | 209 | existing_content = open(path).read() | 235 | existing_content = open(path).read() |
588 | @@ -220,38 +246,20 @@ | |||
589 | 220 | f.close() | 246 | f.close() |
590 | 221 | return True | 247 | return True |
591 | 222 | 248 | ||
592 | 249 | _patch_file = _no_sandbox(_patch_file) | ||
593 | 250 | |||
594 | 223 | 251 | ||
595 | 224 | def _same_content(path, content): | 252 | def _same_content(path, content): |
596 | 225 | return open(path).read() == content | 253 | return open(path).read() == content |
597 | 226 | 254 | ||
620 | 227 | def _no_sandbox(function): | 255 | |
599 | 228 | def __no_sandbox(*args, **kw): | ||
600 | 229 | try: | ||
601 | 230 | from setuptools.sandbox import DirectorySandbox | ||
602 | 231 | def violation(*args): | ||
603 | 232 | pass | ||
604 | 233 | DirectorySandbox._old = DirectorySandbox._violation | ||
605 | 234 | DirectorySandbox._violation = violation | ||
606 | 235 | patched = True | ||
607 | 236 | except ImportError: | ||
608 | 237 | patched = False | ||
609 | 238 | |||
610 | 239 | try: | ||
611 | 240 | return function(*args, **kw) | ||
612 | 241 | finally: | ||
613 | 242 | if patched: | ||
614 | 243 | DirectorySandbox._violation = DirectorySandbox._old | ||
615 | 244 | del DirectorySandbox._old | ||
616 | 245 | |||
617 | 246 | return __no_sandbox | ||
618 | 247 | |||
619 | 248 | @_no_sandbox | ||
621 | 249 | def _rename_path(path): | 256 | def _rename_path(path): |
622 | 250 | new_name = path + '.OLD.%s' % time.time() | 257 | new_name = path + '.OLD.%s' % time.time() |
623 | 251 | log.warn('Renaming %s into %s', path, new_name) | 258 | log.warn('Renaming %s into %s', path, new_name) |
624 | 252 | os.rename(path, new_name) | 259 | os.rename(path, new_name) |
625 | 253 | return new_name | 260 | return new_name |
626 | 254 | 261 | ||
627 | 262 | |||
628 | 255 | def _remove_flat_installation(placeholder): | 263 | def _remove_flat_installation(placeholder): |
629 | 256 | if not os.path.isdir(placeholder): | 264 | if not os.path.isdir(placeholder): |
630 | 257 | log.warn('Unkown installation at %s', placeholder) | 265 | log.warn('Unkown installation at %s', placeholder) |
631 | @@ -285,13 +293,15 @@ | |||
632 | 285 | 'Setuptools distribution', element) | 293 | 'Setuptools distribution', element) |
633 | 286 | return True | 294 | return True |
634 | 287 | 295 | ||
635 | 296 | _remove_flat_installation = _no_sandbox(_remove_flat_installation) | ||
636 | 297 | |||
637 | 288 | 298 | ||
638 | 289 | def _after_install(dist): | 299 | def _after_install(dist): |
639 | 290 | log.warn('After install bootstrap.') | 300 | log.warn('After install bootstrap.') |
640 | 291 | placeholder = dist.get_command_obj('install').install_purelib | 301 | placeholder = dist.get_command_obj('install').install_purelib |
641 | 292 | _create_fake_setuptools_pkg_info(placeholder) | 302 | _create_fake_setuptools_pkg_info(placeholder) |
642 | 293 | 303 | ||
644 | 294 | @_no_sandbox | 304 | |
645 | 295 | def _create_fake_setuptools_pkg_info(placeholder): | 305 | def _create_fake_setuptools_pkg_info(placeholder): |
646 | 296 | if not placeholder or not os.path.exists(placeholder): | 306 | if not placeholder or not os.path.exists(placeholder): |
647 | 297 | log.warn('Could not find the install location') | 307 | log.warn('Could not find the install location') |
648 | @@ -304,6 +314,9 @@ | |||
649 | 304 | log.warn('%s already exists', pkg_info) | 314 | log.warn('%s already exists', pkg_info) |
650 | 305 | return | 315 | return |
651 | 306 | 316 | ||
652 | 317 | if not os.access(pkg_info, os.W_OK): | ||
653 | 318 | log.warn("Don't have permissions to write %s, skipping", pkg_info) | ||
654 | 319 | |||
655 | 307 | log.warn('Creating %s', pkg_info) | 320 | log.warn('Creating %s', pkg_info) |
656 | 308 | f = open(pkg_info, 'w') | 321 | f = open(pkg_info, 'w') |
657 | 309 | try: | 322 | try: |
658 | @@ -319,6 +332,11 @@ | |||
659 | 319 | finally: | 332 | finally: |
660 | 320 | f.close() | 333 | f.close() |
661 | 321 | 334 | ||
662 | 335 | _create_fake_setuptools_pkg_info = _no_sandbox( | ||
663 | 336 | _create_fake_setuptools_pkg_info | ||
664 | 337 | ) | ||
665 | 338 | |||
666 | 339 | |||
667 | 322 | def _patch_egg_dir(path): | 340 | def _patch_egg_dir(path): |
668 | 323 | # let's check if it's already patched | 341 | # let's check if it's already patched |
669 | 324 | pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') | 342 | pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') |
670 | @@ -337,6 +355,8 @@ | |||
671 | 337 | f.close() | 355 | f.close() |
672 | 338 | return True | 356 | return True |
673 | 339 | 357 | ||
674 | 358 | _patch_egg_dir = _no_sandbox(_patch_egg_dir) | ||
675 | 359 | |||
676 | 340 | 360 | ||
677 | 341 | def _before_install(): | 361 | def _before_install(): |
678 | 342 | log.warn('Before install bootstrap.') | 362 | log.warn('Before install bootstrap.') |
679 | @@ -346,7 +366,7 @@ | |||
680 | 346 | def _under_prefix(location): | 366 | def _under_prefix(location): |
681 | 347 | if 'install' not in sys.argv: | 367 | if 'install' not in sys.argv: |
682 | 348 | return True | 368 | return True |
684 | 349 | args = sys.argv[sys.argv.index('install')+1:] | 369 | args = sys.argv[sys.argv.index('install') + 1:] |
685 | 350 | for index, arg in enumerate(args): | 370 | for index, arg in enumerate(args): |
686 | 351 | for option in ('--root', '--prefix'): | 371 | for option in ('--root', '--prefix'): |
687 | 352 | if arg.startswith('%s=' % option): | 372 | if arg.startswith('%s=' % option): |
688 | @@ -354,10 +374,10 @@ | |||
689 | 354 | return location.startswith(top_dir) | 374 | return location.startswith(top_dir) |
690 | 355 | elif arg == option: | 375 | elif arg == option: |
691 | 356 | if len(args) > index: | 376 | if len(args) > index: |
693 | 357 | top_dir = args[index+1] | 377 | top_dir = args[index + 1] |
694 | 358 | return location.startswith(top_dir) | 378 | return location.startswith(top_dir) |
697 | 359 | elif option == '--user' and USER_SITE is not None: | 379 | if arg == '--user' and USER_SITE is not None: |
698 | 360 | return location.startswith(USER_SITE) | 380 | return location.startswith(USER_SITE) |
699 | 361 | return True | 381 | return True |
700 | 362 | 382 | ||
701 | 363 | 383 | ||
702 | @@ -371,11 +391,14 @@ | |||
703 | 371 | return | 391 | return |
704 | 372 | ws = pkg_resources.working_set | 392 | ws = pkg_resources.working_set |
705 | 373 | try: | 393 | try: |
708 | 374 | setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools', | 394 | setuptools_dist = ws.find( |
709 | 375 | replacement=False)) | 395 | pkg_resources.Requirement.parse('setuptools', replacement=False) |
710 | 396 | ) | ||
711 | 376 | except TypeError: | 397 | except TypeError: |
712 | 377 | # old distribute API | 398 | # old distribute API |
714 | 378 | setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools')) | 399 | setuptools_dist = ws.find( |
715 | 400 | pkg_resources.Requirement.parse('setuptools') | ||
716 | 401 | ) | ||
717 | 379 | 402 | ||
718 | 380 | if setuptools_dist is None: | 403 | if setuptools_dist is None: |
719 | 381 | log.warn('No setuptools distribution found') | 404 | log.warn('No setuptools distribution found') |
720 | @@ -416,6 +439,10 @@ | |||
721 | 416 | def _relaunch(): | 439 | def _relaunch(): |
722 | 417 | log.warn('Relaunching...') | 440 | log.warn('Relaunching...') |
723 | 418 | # we have to relaunch the process | 441 | # we have to relaunch the process |
724 | 442 | # pip marker to avoid a relaunch bug | ||
725 | 443 | _cmd = ['-c', 'install', '--single-version-externally-managed'] | ||
726 | 444 | if sys.argv[:3] == _cmd: | ||
727 | 445 | sys.argv[0] = 'setup.py' | ||
728 | 419 | args = [sys.executable] + sys.argv | 446 | args = [sys.executable] + sys.argv |
729 | 420 | sys.exit(subprocess.call(args)) | 447 | sys.exit(subprocess.call(args)) |
730 | 421 | 448 | ||
731 | @@ -440,7 +467,7 @@ | |||
732 | 440 | # Extract directories with a safe mode. | 467 | # Extract directories with a safe mode. |
733 | 441 | directories.append(tarinfo) | 468 | directories.append(tarinfo) |
734 | 442 | tarinfo = copy.copy(tarinfo) | 469 | tarinfo = copy.copy(tarinfo) |
736 | 443 | tarinfo.mode = 448 # decimal for oct 0700 | 470 | tarinfo.mode = 448 # decimal for oct 0700 |
737 | 444 | self.extract(tarinfo, path) | 471 | self.extract(tarinfo, path) |
738 | 445 | 472 | ||
739 | 446 | # Reverse sort directories. | 473 | # Reverse sort directories. |
740 | @@ -467,10 +494,21 @@ | |||
741 | 467 | self._dbg(1, "tarfile: %s" % e) | 494 | self._dbg(1, "tarfile: %s" % e) |
742 | 468 | 495 | ||
743 | 469 | 496 | ||
744 | 497 | def _build_install_args(argv): | ||
745 | 498 | install_args = [] | ||
746 | 499 | user_install = '--user' in argv | ||
747 | 500 | if user_install and sys.version_info < (2, 6): | ||
748 | 501 | log.warn("--user requires Python 2.6 or later") | ||
749 | 502 | raise SystemExit(1) | ||
750 | 503 | if user_install: | ||
751 | 504 | install_args.append('--user') | ||
752 | 505 | return install_args | ||
753 | 506 | |||
754 | 507 | |||
755 | 470 | def main(argv, version=DEFAULT_VERSION): | 508 | def main(argv, version=DEFAULT_VERSION): |
756 | 471 | """Install or upgrade setuptools and EasyInstall""" | 509 | """Install or upgrade setuptools and EasyInstall""" |
757 | 472 | tarball = download_setuptools() | 510 | tarball = download_setuptools() |
759 | 473 | _install(tarball) | 511 | _install(tarball, _build_install_args(argv)) |
760 | 474 | 512 | ||
761 | 475 | 513 | ||
762 | 476 | if __name__ == '__main__': | 514 | if __name__ == '__main__': |
763 | 477 | 515 | ||
764 | === renamed file 'Makefile' => 'sphinx.mk' | |||
765 | --- Makefile 2010-11-10 22:42:51 +0000 | |||
766 | +++ sphinx.mk 2012-08-02 16:24:39 +0000 | |||
767 | @@ -11,9 +11,9 @@ | |||
768 | 11 | PAPEROPT_letter = -D latex_paper_size=letter | 11 | PAPEROPT_letter = -D latex_paper_size=letter |
769 | 12 | ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | 12 | ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
770 | 13 | 13 | ||
772 | 14 | .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest | 14 | .PHONY: sphinx-help clean-sphinx html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest |
773 | 15 | 15 | ||
775 | 16 | help: | 16 | sphinx-help: |
776 | 17 | @echo "Please use \`make <target>' where <target> is one of" | 17 | @echo "Please use \`make <target>' where <target> is one of" |
777 | 18 | @echo " html to make standalone HTML files" | 18 | @echo " html to make standalone HTML files" |
778 | 19 | @echo " dirhtml to make HTML files named index.html in directories" | 19 | @echo " dirhtml to make HTML files named index.html in directories" |
779 | @@ -26,7 +26,7 @@ | |||
780 | 26 | @echo " linkcheck to check all external links for integrity" | 26 | @echo " linkcheck to check all external links for integrity" |
781 | 27 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" | 27 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" |
782 | 28 | 28 | ||
784 | 29 | clean: | 29 | clean-sphinx: |
785 | 30 | -rm -rf _build/* | 30 | -rm -rf _build/* |
786 | 31 | 31 | ||
787 | 32 | html: | 32 | html: |
788 | 33 | 33 | ||
789 | === modified file 'tarmac_tests.sh' | |||
790 | --- tarmac_tests.sh 2011-12-07 20:59:39 +0000 | |||
791 | +++ tarmac_tests.sh 2012-08-02 16:24:39 +0000 | |||
792 | @@ -2,7 +2,10 @@ | |||
793 | 2 | 2 | ||
794 | 3 | set -e | 3 | set -e |
795 | 4 | 4 | ||
800 | 5 | virtualenv --no-site-packages virtualenv > log | 5 | LOG_FILE=log |
801 | 6 | . virtualenv/bin/activate >> log | 6 | |
802 | 7 | python setup.py develop >> log | 7 | echo "Running pkgme tests in tarmac" > $LOG_FILE |
803 | 8 | python -m testtools.run pkgme.tests.test_suite | 8 | make download-cache |
804 | 9 | bzr up download-cache | ||
805 | 10 | make bootstrap >> $LOG_FILE | ||
806 | 11 | make test | ||
807 | 9 | 12 | ||
808 | === added file 'versions.cfg' | |||
809 | --- versions.cfg 1970-01-01 00:00:00 +0000 | |||
810 | +++ versions.cfg 2012-08-02 16:24:39 +0000 | |||
811 | @@ -0,0 +1,36 @@ | |||
812 | 1 | [buildout] | ||
813 | 2 | versions = versions | ||
814 | 3 | |||
815 | 4 | # Update the version number here to upgrade to a new version. | ||
816 | 5 | # You'll likely want to run 'make update-deps' when you have | ||
817 | 6 | # changed something here. | ||
818 | 7 | # | ||
819 | 8 | # If you are forking a dependency then make sure you include a pointer | ||
820 | 9 | # to the branch where the fork is maintained. | ||
821 | 10 | # | ||
822 | 11 | # Alphabetical, case-insensitive, please! :-) | ||
823 | 12 | [versions] | ||
824 | 13 | # Only needed for Python 2.6, in turn only needed for Jenkins. | ||
825 | 14 | argparse = 1.2.1 | ||
826 | 15 | Cheetah = 2.4.4 | ||
827 | 16 | distribute = 0.6.28 | ||
828 | 17 | fixtures = 0.3.9 | ||
829 | 18 | httplib2 = 0.7.4 | ||
830 | 19 | keyring = 0.9.2 | ||
831 | 20 | launchpadlib = 1.10.2 | ||
832 | 21 | lazr.authentication = 0.1.2 | ||
833 | 22 | lazr.restfulclient = 0.13.0 | ||
834 | 23 | lazr.uri = 1.0.3 | ||
835 | 24 | Markdown = 2.2.0 | ||
836 | 25 | oauth = 1.0.1 | ||
837 | 26 | python-debian = 0.1.16 | ||
838 | 27 | python-subunit = 0.0.8 | ||
839 | 28 | simplejson = 2.6.1 | ||
840 | 29 | testresources = 0.2.5 | ||
841 | 30 | testtools = 0.9.15 | ||
842 | 31 | wadllib = 1.3.1 | ||
843 | 32 | wsgi-intercept = 0.5.1 | ||
844 | 33 | z3c.recipe.scripts = 1.0.1 | ||
845 | 34 | zc.buildout = 1.5.1 | ||
846 | 35 | zc.recipe.egg = 1.3.2 | ||
847 | 36 | zope.interface = 4.0.1 |
Cheating.