Merge lp:~gary/zc.buildout/betafix8 into lp:zc.buildout

Proposed by Gary Poster
Status: Needs review
Proposed branch: lp:~gary/zc.buildout/betafix8
Merge into: lp:zc.buildout
Prerequisite: lp:~gary/zc.buildout/betafix7
Diff against target: 526 lines (+155/-80)
6 files modified
CHANGES.txt (+14/-8)
src/zc/buildout/bootstrap.txt (+43/-26)
src/zc/buildout/buildout.py (+42/-17)
src/zc/buildout/buildout.txt (+12/-13)
src/zc/buildout/tests.py (+11/-9)
src/zc/buildout/update.txt (+33/-7)
To merge this branch: bzr merge lp:~gary/zc.buildout/betafix8
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+33077@code.launchpad.net

Description of the change

In the review of betafix6 (https://code.edge.launchpad.net/~gary/zc.buildout/betafix6/+merge/31996), Francis had some concerns about the usability of the switch to use testing versions (alphas, betas) of build dependencies. This branch addresses those concerns.

I am slightly abusing command-line overrides for the new option, but I think it is a reasonable compromise in practice.

In light of these changes, I also changed the pertinent option names. Before, we had tightly related behavior called "--accept-early-release" in bootstrap and "prefer-final-build-system" in buildout.cfg. I changed these to "--accept-buildout-test-releases" and "accept-buildout-test-releases" respectively. I think the similarity is appropriate. Moreover, I prefer boolean options to default to false, so this name in buildout appeals to me. The only mild downside is that the option in buildout to prefer final releases of the dependencies of your own software (the software buildout is supposed to be helping you develop or deploy) is "prefer-final." The old name ("prefer-final-build-system") was a better parallel.

To post a comment you must log in.
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

This is great, thanks for doing this.

I think losing the parallel with prefer-final is not important since that's really an 'internal' configuration value. The API is the command-line switch.

review: Approve

Unmerged revisions

565. By Gary Poster

make it much simpler to try out new buildout versions: instead of having to make a gesture in bootstrap *and* buildout.cfg, you can make the gesture once in bootstrap. Changed pertinent option names to reflect new thinking.

564. By Gary Poster

merge from trunk/previous branches

563. By Gary Poster

docs, test fixes and cleanups

562. By Gary Poster

By default, Buildout and the bootstrap script now prefer final versions of Buildout, recipes, and extensions.

561. By Gary Poster

get tests passing for Python 2.7. Also includes Lennart Regebro changes to use the standard library doctest.

560. By Gary Poster

small Python 2.6 bugfix and Distribute test clean-ups

559. By Gary Poster

fix tests for changes

558. By Gary Poster

mimic standard site.py behavior for inclusion of .pth files

557. By Gary Poster

eliminate spurious warning if you are using distribute.

556. By Gary Poster

add files so releases can be made from a non-SVN checkout

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CHANGES.txt'
--- CHANGES.txt 2010-08-19 02:27:43 +0000
+++ CHANGES.txt 2010-08-19 02:27:43 +0000
@@ -9,17 +9,23 @@
9- zc.buildout supports Python 2.7.9- zc.buildout supports Python 2.7.
1010
11- By default, Buildout and the bootstrap script now prefer final versions of11- By default, Buildout and the bootstrap script now prefer final versions of
12 Buildout, recipes, and extensions. This can be changed by setting12 Buildout, recipes, and extensions. This can be changed by using the
13 ``prefer-final-build-system = false`` in your configuration's13 --accept-buildout-test-releases flag (or -t for short) when calling
14 [buildout] section, and by using the --accept-early-release flag when14 bootstrap. This will hopefully allow beta releases of these items to
15 calling bootstrap. This will hopefully allow beta releases to be more15 be more easily and safely made in the future.
16 easily and safely made in the future. Note that dependencies of your16
17 software do not have this behavior: use the pre-existing switch17 NOTE: dependencies of your own software are not affected by this new
18 ``prefer-final = true`` to get this behavior.18 behavior. Buildout continues to choose the newest available versions
19 of your dependencies regardless of whether they are final releases. To
20 prevent this, use the pre-existing switch ``prefer-final = true`` in
21 the [buildout] section of your configuration file (see
22 http://pypi.python.org/pypi/zc.buildout#preferring-final-releases) or
23 pin your versions using a versions section (see
24 http://pypi.python.org/pypi/zc.buildout#repeatable-buildouts-controlling-eggs-used).
1925
20Bugs fixed:26Bugs fixed:
2127
22- You can now again use virtualenv with zc.buildout. The new features to let28- You can now again use virtualenv with Buildout. The new features to let
23 buildout be used with a system Python are disabled in this configuration,29 buildout be used with a system Python are disabled in this configuration,
24 and the previous script generation behavior (1.4.3) is used, even if30 and the previous script generation behavior (1.4.3) is used, even if
25 the new function ``zc.buildout.easy_install.sitepackage_safe_scripts``31 the new function ``zc.buildout.easy_install.sitepackage_safe_scripts``
2632
=== modified file 'src/zc/buildout/bootstrap.txt'
--- src/zc/buildout/bootstrap.txt 2010-08-19 02:27:43 +0000
+++ src/zc/buildout/bootstrap.txt 2010-08-19 02:27:43 +0000
@@ -93,23 +93,14 @@
93specify an explicit version (using --version here and specifying the93specify an explicit version (using --version here and specifying the
94version in the buildout configuration file using the94version in the buildout configuration file using the
95``buildout-version`` option or the ``versions`` option) or specify that you95``buildout-version`` option or the ``versions`` option) or specify that you
96accept early releases.96accept early releases by using ``--accept-buildout-test-releases`` on the
9797bootstrap script.
98You accept early releases by using ``--accept-early-release`` on the
99bootstrap script and specifying ``prefer-final-build-system = false`` in the
100buildout configuration file. You must do both.
10198
102Here's an example.99Here's an example.
103100
104 >>> write('buildout.cfg',
105 ... '''
106 ... [buildout]
107 ... parts =
108 ... prefer-final-build-system = false
109 ... ''')
110 >>> ignored = system(101 >>> ignored = system(
111 ... zc.buildout.easy_install._safe_arg(sys.executable)+' '+102 ... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
112 ... 'bootstrap.py --accept-early-release')103 ... 'bootstrap.py --accept-buildout-test-releases')
113 >>> print open(buildout_site_py).read() # doctest: +ELLIPSIS104 >>> print open(buildout_site_py).read() # doctest: +ELLIPSIS
114 "...105 "...
115 buildout_paths = [106 buildout_paths = [
@@ -120,13 +111,41 @@
120111
121Notice we are now using zc.buildout 100.0b1, a non-final release.112Notice we are now using zc.buildout 100.0b1, a non-final release.
122113
123Now we'll go back to the default of preferring final versions.114The buildout script remembers the decision to accept early releases, and
124115alerts the user.
125 >>> write('buildout.cfg',116
126 ... '''117 >>> print system(join('bin', 'buildout')),
127 ... [buildout]118 ... # doctest: +NORMALIZE_WHITESPACE
128 ... parts =119 NOTE: Accepting early releases of build system packages. Rerun bootstrap
129 ... ''')120 without --accept-buildout-test-releases (-t) to return to default
121 behavior.
122
123This is accomplished within the script itself.
124
125 >>> print open(buildout_script).read() # doctest: +ELLIPSIS
126 #...
127 sys.argv.insert(1, 'buildout:accept-buildout-test-releases=true')
128 print ('NOTE: Accepting early releases of build system packages. Rerun '
129 'bootstrap without --accept-buildout-test-releases (-t) to return to '
130 'default behavior.')
131 ...
132
133As the note says, to undo, you just need to re-run bootstrap without
134--accept-buildout-test-releases.
135
136 >>> ignored = system(
137 ... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
138 ... 'bootstrap.py')
139 >>> print open(buildout_site_py).read() # doctest: +ELLIPSIS
140 "...
141 buildout_paths = [
142 '/sample/eggs/setuptools-...egg',
143 '/sample/eggs/zc.buildout-99.99-pyN.N.egg'
144 ]
145 ...
146 >>> ('buildout:accept-buildout-test-releases=true' in
147 ... open(buildout_script).read())
148 False
130149
131Now we will try the `--version` option, which lets you define a version for150Now we will try the `--version` option, which lets you define a version for
132`zc.buildout`. If not provided, bootstrap will look for the latest one.151`zc.buildout`. If not provided, bootstrap will look for the latest one.
@@ -329,14 +348,12 @@
329 --eggs=EGGS Specify a directory for storing eggs. Defaults to a348 --eggs=EGGS Specify a directory for storing eggs. Defaults to a
330 temporary directory that is deleted when the bootstrap349 temporary directory that is deleted when the bootstrap
331 script completes.350 script completes.
332 --accept-early-release351 -t, --accept-buildout-test-releases
333 Normally, if you do not specify a --version, the352 Normally, if you do not specify a --version, the
334 bootstrap script gets the newest *final* versions of353 bootstrap script and buildout gets the newest *final*
335 zc.buildout for you. If you use this flag, bootstrap354 versions of zc.buildout and its recipes and extensions
355 for you. If you use this flag, bootstrap and buildout
336 will get the newest releases even if they are alphas356 will get the newest releases even if they are alphas
337 or betas. Note that, if you do want to use early357 or betas.
338 buildout releases, you probably want to also set
339 ``prefer-final-build-system= false`` in the [buildout]
340 section of your configuration file.
341 -c CONFIG_FILE Specify the path to the buildout configuration file to358 -c CONFIG_FILE Specify the path to the buildout configuration file to
342 be used.359 be used.
343360
=== modified file 'src/zc/buildout/buildout.py'
--- src/zc/buildout/buildout.py 2010-08-19 02:27:43 +0000
+++ src/zc/buildout/buildout.py 2010-08-19 02:27:43 +0000
@@ -116,6 +116,7 @@
116 return data116 return data
117117
118_buildout_default_options = _annotate_section({118_buildout_default_options = _annotate_section({
119 'accept-buildout-test-releases': 'false',
119 'allow-hosts': '*',120 'allow-hosts': '*',
120 'allow-picked-versions': 'true',121 'allow-picked-versions': 'true',
121 'bin-directory': 'bin',122 'bin-directory': 'bin',
@@ -131,7 +132,6 @@
131 'offline': 'false',132 'offline': 'false',
132 'parts-directory': 'parts',133 'parts-directory': 'parts',
133 'prefer-final': 'false',134 'prefer-final': 'false',
134 'prefer-final-build-system': 'true',
135 'python': 'buildout',135 'python': 'buildout',
136 'relative-paths': 'false',136 'relative-paths': 'false',
137 'socket-timeout': '',137 'socket-timeout': '',
@@ -235,8 +235,8 @@
235 self._logger = logging.getLogger('zc.buildout')235 self._logger = logging.getLogger('zc.buildout')
236 self.offline = (buildout_section['offline'] == 'true')236 self.offline = (buildout_section['offline'] == 'true')
237 self.newest = (buildout_section['newest'] == 'true')237 self.newest = (buildout_section['newest'] == 'true')
238 self.prefer_final_build_system = (238 self.accept_buildout_test_releases = (
239 buildout_section['prefer-final-build-system'] == 'true')239 buildout_section['accept-buildout-test-releases'] == 'true')
240240
241 ##################################################################241 ##################################################################
242 ## WARNING!!!242 ## WARNING!!!
@@ -281,8 +281,8 @@
281 self.newest = options.get_bool('newest')281 self.newest = options.get_bool('newest')
282 zc.buildout.easy_install.prefer_final(282 zc.buildout.easy_install.prefer_final(
283 options.get_bool('prefer-final'))283 options.get_bool('prefer-final'))
284 self.prefer_final_build_system = options.get_bool(284 self.accept_buildout_test_releases = options.get_bool(
285 'prefer-final-build-system')285 'accept-buildout-test-releases')
286 zc.buildout.easy_install.use_dependency_links(286 zc.buildout.easy_install.use_dependency_links(
287 options.get_bool('use-dependency-links'))287 options.get_bool('use-dependency-links'))
288 zc.buildout.easy_install.allow_picked_versions(288 zc.buildout.easy_install.allow_picked_versions(
@@ -338,7 +338,7 @@
338 [options['develop-eggs-directory'],338 [options['develop-eggs-directory'],
339 options['eggs-directory']],339 options['eggs-directory']],
340 include_site_packages=_sys_executable_has_broken_dash_S,340 include_site_packages=_sys_executable_has_broken_dash_S,
341 prefer_final = self.prefer_final_build_system,341 prefer_final=not self.accept_buildout_test_releases,
342 )342 )
343 else:343 else:
344 ws = zc.buildout.easy_install.install(344 ws = zc.buildout.easy_install.install(
@@ -350,7 +350,7 @@
350 newest=self.newest,350 newest=self.newest,
351 allow_hosts=self._allow_hosts,351 allow_hosts=self._allow_hosts,
352 include_site_packages=_sys_executable_has_broken_dash_S,352 include_site_packages=_sys_executable_has_broken_dash_S,
353 prefer_final = self.prefer_final_build_system,353 prefer_final=not self.accept_buildout_test_releases,
354 )354 )
355355
356 # Now copy buildout and setuptools eggs, and record destination eggs:356 # Now copy buildout and setuptools eggs, and record destination eggs:
@@ -373,7 +373,9 @@
373 else:373 else:
374 shutil.copy2(dist.location, dest)374 shutil.copy2(dist.location, dest)
375375
376 # Create buildout script376 # Create buildout script.
377 # Ideally the (possibly) new version of buildout would get a
378 # chance to write the script. Not sure how to do that.
377 ws = pkg_resources.WorkingSet(entries)379 ws = pkg_resources.WorkingSet(entries)
378 ws.require('zc.buildout')380 ws.require('zc.buildout')
379 partsdir = os.path.join(options['parts-directory'], 'buildout')381 partsdir = os.path.join(options['parts-directory'], 'buildout')
@@ -386,12 +388,19 @@
386 else:388 else:
387 assert relative_paths == 'false'389 assert relative_paths == 'false'
388 relative_paths = ''390 relative_paths = ''
389 # Ideally the (possibly) new version of buildout would get a391 if (self.accept_buildout_test_releases and
390 # chance to write the script. Not sure how to do that.392 self._annotated['buildout']['accept-buildout-test-releases'][1] ==
393 'COMMAND_LINE_VALUE'):
394 # Bootstrap was called with '--accept-buildout-test-releases'.
395 # Continue to honor that setting.
396 script_initialization = _early_release_initialization_code
397 else:
398 script_initialization = ''
391 zc.buildout.easy_install.sitepackage_safe_scripts(399 zc.buildout.easy_install.sitepackage_safe_scripts(
392 options['bin-directory'], ws, options['executable'], partsdir,400 options['bin-directory'], ws, options['executable'], partsdir,
393 reqs=['zc.buildout'], relative_paths=relative_paths,401 reqs=['zc.buildout'], relative_paths=relative_paths,
394 include_site_packages=_sys_executable_has_broken_dash_S)402 include_site_packages=_sys_executable_has_broken_dash_S,
403 script_initialization=script_initialization,)
395404
396 init = bootstrap405 init = bootstrap
397406
@@ -838,7 +847,7 @@
838 path = [options['develop-eggs-directory']],847 path = [options['develop-eggs-directory']],
839 allow_hosts = self._allow_hosts,848 allow_hosts = self._allow_hosts,
840 include_site_packages=_sys_executable_has_broken_dash_S,849 include_site_packages=_sys_executable_has_broken_dash_S,
841 prefer_final=self.prefer_final_build_system,850 prefer_final=not self.accept_buildout_test_releases,
842 )851 )
843852
844 upgraded = []853 upgraded = []
@@ -886,18 +895,27 @@
886895
887 # the new dist is different, so we've upgraded.896 # the new dist is different, so we've upgraded.
888 # Update the scripts and return True897 # Update the scripts and return True
898 # Ideally the new version of buildout would get a chance to write the
899 # script. Not sure how to do that.
889 partsdir = os.path.join(options['parts-directory'], 'buildout')900 partsdir = os.path.join(options['parts-directory'], 'buildout')
890 if os.path.exists(partsdir):901 if os.path.exists(partsdir):
891 # This is primarily for unit tests, in which .py files change too902 # This is primarily for unit tests, in which .py files change too
892 # fast for Python to know to regenerate the .pyc/.pyo files.903 # fast for Python to know to regenerate the .pyc/.pyo files.
893 shutil.rmtree(partsdir)904 shutil.rmtree(partsdir)
894 os.mkdir(partsdir)905 os.mkdir(partsdir)
895 # Ideally the new version of buildout would get a chance to write the906 if (self.accept_buildout_test_releases and
896 # script. Not sure how to do that.907 self._annotated['buildout']['accept-buildout-test-releases'][1] ==
908 'COMMAND_LINE_VALUE'):
909 # Bootstrap was called with '--accept-buildout-test-releases'.
910 # Continue to honor that setting.
911 script_initialization = _early_release_initialization_code
912 else:
913 script_initialization = ''
897 zc.buildout.easy_install.sitepackage_safe_scripts(914 zc.buildout.easy_install.sitepackage_safe_scripts(
898 options['bin-directory'], ws, sys.executable, partsdir,915 options['bin-directory'], ws, sys.executable, partsdir,
899 reqs=['zc.buildout'],916 reqs=['zc.buildout'],
900 include_site_packages=_sys_executable_has_broken_dash_S)917 include_site_packages=_sys_executable_has_broken_dash_S,
918 script_initialization=script_initialization)
901919
902 # Restart920 # Restart
903 args = map(zc.buildout.easy_install._safe_arg, sys.argv)921 args = map(zc.buildout.easy_install._safe_arg, sys.argv)
@@ -939,7 +957,7 @@
939 index = self['buildout'].get('index'),957 index = self['buildout'].get('index'),
940 newest=self.newest, allow_hosts=self._allow_hosts,958 newest=self.newest, allow_hosts=self._allow_hosts,
941 include_site_packages=_sys_executable_has_broken_dash_S,959 include_site_packages=_sys_executable_has_broken_dash_S,
942 prefer_final=self.prefer_final_build_system)960 prefer_final=not self.accept_buildout_test_releases)
943961
944 # Clear cache because extensions might now let us read pages we962 # Clear cache because extensions might now let us read pages we
945 # couldn't read before.963 # couldn't read before.
@@ -1055,7 +1073,7 @@
1055 newest=buildout.newest,1073 newest=buildout.newest,
1056 allow_hosts=buildout._allow_hosts,1074 allow_hosts=buildout._allow_hosts,
1057 include_site_packages=_sys_executable_has_broken_dash_S,1075 include_site_packages=_sys_executable_has_broken_dash_S,
1058 prefer_final=buildout.prefer_final_build_system)1076 prefer_final=not buildout.accept_buildout_test_releases)
10591077
1060 __doing__ = 'Loading %s recipe entry %s:%s.', group, spec, entry1078 __doing__ = 'Loading %s recipe entry %s:%s.', group, spec, entry
1061 return pkg_resources.load_entry_point(1079 return pkg_resources.load_entry_point(
@@ -1526,6 +1544,13 @@
1526 % (section, ' '.join(map(repr, unused)))1544 % (section, ' '.join(map(repr, unused)))
1527 )1545 )
15281546
1547_early_release_initialization_code = """\
1548sys.argv.insert(1, 'buildout:accept-buildout-test-releases=true')
1549print ('NOTE: Accepting early releases of build system packages. Rerun '
1550 'bootstrap without --accept-buildout-test-releases (-t) to return to '
1551 'default behavior.')
1552"""
1553
1529_usage = """\1554_usage = """\
1530Usage: buildout [options] [assignments] [command [command arguments]]1555Usage: buildout [options] [assignments] [command [command arguments]]
15311556
15321557
=== modified file 'src/zc/buildout/buildout.txt'
--- src/zc/buildout/buildout.txt 2010-08-19 02:27:43 +0000
+++ src/zc/buildout/buildout.txt 2010-08-19 02:27:43 +0000
@@ -729,6 +729,8 @@
729 ==================729 ==================
730 <BLANKLINE>730 <BLANKLINE>
731 [buildout]731 [buildout]
732 accept-buildout-test-releases= false
733 DEFAULT_VALUE
732 allow-hosts= *734 allow-hosts= *
733 DEFAULT_VALUE735 DEFAULT_VALUE
734 allow-picked-versions= true736 allow-picked-versions= true
@@ -765,8 +767,6 @@
765 DEFAULT_VALUE767 DEFAULT_VALUE
766 prefer-final= false768 prefer-final= false
767 DEFAULT_VALUE769 DEFAULT_VALUE
768 prefer-final-build-system= true
769 DEFAULT_VALUE
770 python= buildout770 python= buildout
771 DEFAULT_VALUE771 DEFAULT_VALUE
772 relative-paths= false772 relative-paths= false
@@ -2229,6 +2229,7 @@
2229 <BLANKLINE>2229 <BLANKLINE>
2230 Configuration data:2230 Configuration data:
2231 [buildout]2231 [buildout]
2232 accept-buildout-test-releases = false
2232 allow-hosts = *2233 allow-hosts = *
2233 allow-picked-versions = true2234 allow-picked-versions = true
2234 bin-directory = /sample-buildout/bin2235 bin-directory = /sample-buildout/bin
@@ -2246,7 +2247,6 @@
2246 parts =2247 parts =
2247 parts-directory = /sample-buildout/parts2248 parts-directory = /sample-buildout/parts
2248 prefer-final = false2249 prefer-final = false
2249 prefer-final-build-system = true
2250 python = buildout2250 python = buildout
2251 relative-paths = false2251 relative-paths = false
2252 socket-timeout =2252 socket-timeout =
@@ -2502,19 +2502,18 @@
2502releases that satisfy distribution requirements, then those releases2502releases that satisfy distribution requirements, then those releases
2503are used even if newer non-final releases are available.2503are used even if newer non-final releases are available.
25042504
2505In buildout version 2, all final releases will be preferred by
2506default--that is ``prefer-final`` will also default to 'true'. You will
2507then need to use a 'false' value for ``prefer-final`` to get the newest
2508releases.
2509
2505A separate option controls the behavior of the build system itself.2510A separate option controls the behavior of the build system itself.
2506When buildout looks for recipes, extensions, and for updates to itself,2511When buildout looks for recipes, extensions, and for updates to itself,
2507it does prefer final releases by default, as of the 1.5.0 release. The2512it does prefer final releases by default, as of the 1.5.0 release. The
2508``prefer-final-build-system`` option will let you override this behavior.2513``accept-buildout-test-releases`` option will let you override this behavior.
25092514However, it is typically changed by the --accept-buildout-test-releases
2510 [buildout]2515option to the bootstrap script, since bootstrapping is the first step to
2511 ...2516selecting a buildout.
2512 prefer-final-build-system = false
2513
2514In buildout version 2, all final releases will be preferred by
2515default--that is ``prefer-final`` will also default to 'true'. You will
2516then need to use a 'false' value for ``prefer-final`` to get the newest
2517releases, like with ``prefer-final-build-system``.
25182517
2519Finding distributions2518Finding distributions
2520---------------------2519---------------------
25212520
=== modified file 'src/zc/buildout/tests.py'
--- src/zc/buildout/tests.py 2010-08-19 02:27:43 +0000
+++ src/zc/buildout/tests.py 2010-08-19 02:27:43 +0000
@@ -3128,9 +3128,11 @@
31283128
3129def buildout_prefer_final_build_system_option():3129def buildout_prefer_final_build_system_option():
3130 """3130 """
3131The prefer-final-build-system buildout option can be used for overriding3131The accept-buildout-test-releases buildout option can be used for overriding
3132the default preference for final distributions for recipes, buildout3132the default preference for final distributions for recipes, buildout
3133extensions, and buildout itself.3133extensions, and buildout itself. It is usually controlled via the bootstrap
3134script rather than in the configuration file, but we will test the machinery
3135using the file.
31343136
3135Set up. This creates sdists for demorecipe 1.0 and 1.1b1, and for3137Set up. This creates sdists for demorecipe 1.0 and 1.1b1, and for
3136demoextension 1.0 and 1.1b1.3138demoextension 1.0 and 1.1b1.
@@ -3138,7 +3140,7 @@
3138 >>> create_sample_recipe_sdists(sample_eggs)3140 >>> create_sample_recipe_sdists(sample_eggs)
3139 >>> create_sample_extension_sdists(sample_eggs)3141 >>> create_sample_extension_sdists(sample_eggs)
31403142
3141The default is prefer-final-build-system = true:3143The default is accept-buildout-test-releases = false:
31423144
3143 >>> write('buildout.cfg',3145 >>> write('buildout.cfg',
3144 ... '''3146 ... '''
@@ -3161,7 +3163,7 @@
3161Here we see that the final versions of demorecipe and demoextension were used.3163Here we see that the final versions of demorecipe and demoextension were used.
31623164
3163We get the same behavior if we explicitly state that3165We get the same behavior if we explicitly state that
3164prefer-final-build-system = true.3166accept-buildout-test-releases = false.
31653167
3166 >>> write('buildout.cfg',3168 >>> write('buildout.cfg',
3167 ... '''3169 ... '''
@@ -3169,7 +3171,7 @@
3169 ... parts = demo3171 ... parts = demo
3170 ... find-links = %(link_server)s3172 ... find-links = %(link_server)s
3171 ... extensions = demoextension3173 ... extensions = demoextension
3172 ... prefer-final-build-system = true3174 ... accept-buildout-test-releases = false
3173 ...3175 ...
3174 ... [demo]3176 ... [demo]
3175 ... recipe = demorecipe3177 ... recipe = demorecipe
@@ -3182,7 +3184,7 @@
3182 Picked: demorecipe = 1.03184 Picked: demorecipe = 1.0
3183 ...3185 ...
31843186
3185If we specify prefer-final-build-system = false, we'll get the newest3187If we specify accept-buildout-test-releases = true, we'll get the newest
3186distributions in the build system:3188distributions in the build system:
31873189
3188 >>> write('buildout.cfg',3190 >>> write('buildout.cfg',
@@ -3191,7 +3193,7 @@
3191 ... parts = demo3193 ... parts = demo
3192 ... find-links = %(link_server)s3194 ... find-links = %(link_server)s
3193 ... extensions = demoextension3195 ... extensions = demoextension
3194 ... prefer-final-build-system = false3196 ... accept-buildout-test-releases = true
3195 ...3197 ...
3196 ... [demo]3198 ... [demo]
3197 ... recipe = demorecipe3199 ... recipe = demorecipe
@@ -3212,7 +3214,7 @@
3212 ... parts = demo3214 ... parts = demo
3213 ... find-links = %(link_server)s3215 ... find-links = %(link_server)s
3214 ... extensions = demoextension3216 ... extensions = demoextension
3215 ... prefer-final-build-system = no3217 ... accept-buildout-test-releases = no
3216 ...3218 ...
3217 ... [demo]3219 ... [demo]
3218 ... recipe = demorecipe3220 ... recipe = demorecipe
@@ -3221,7 +3223,7 @@
3221 >>> print system(buildout+' -v'), # doctest: +ELLIPSIS3223 >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
3222 While:3224 While:
3223 Initializing.3225 Initializing.
3224 Error: Invalid value for prefer-final-build-system option: no3226 Error: Invalid value for accept-buildout-test-releases option: no
32253227
3226 """3228 """
32273229
32283230
=== modified file 'src/zc/buildout/update.txt'
--- src/zc/buildout/update.txt 2010-08-19 02:27:43 +0000
+++ src/zc/buildout/update.txt 2010-08-19 02:27:43 +0000
@@ -81,8 +81,10 @@
8181
82Notice that, even though we have a newer beta version of zc.buildout82Notice that, even though we have a newer beta version of zc.buildout
83available, the final "99.99" was selected. If you want to get non-final83available, the final "99.99" was selected. If you want to get non-final
84versions, specify a specific version in your buildout's versions section,84versions, specify a specific version in your buildout's versions
85or use the ``prefer-final-build-system = false`` discussed below.85section, you typically want to use the --accept-buildout-test-releases
86option to the bootstrap script, which internally uses the
87``accept-buildout-test-releases = true`` discussed below.
8688
87Our buildout script's site.py has been updated to use the new eggs:89Our buildout script's site.py has been updated to use the new eggs:
8890
@@ -194,9 +196,14 @@
194196
195 >>> ls('bin')197 >>> ls('bin')
196198
197Notice that, as mentioned above, the ``prefer-final-build-system =199As mentioned above, the ``accept-buildout-test-releases = true`` means that
198false`` means that newer non-final versions of these dependencies are200newer non-final versions of these dependencies are preferred. Typically
199preferred.201users are not expected to actually manipulate this value. Instead, the
202bootstrap script creates a buildout buildout script that passes in the
203value as a command line override. This then results in the buildout
204script being rewritten to remember the decision.
205
206We'll mimic this by passing the argument actually in the command line.
200207
201 >>> cd(sample_buildout)208 >>> cd(sample_buildout)
202 >>> write(sample_buildout, 'buildout.cfg',209 >>> write(sample_buildout, 'buildout.cfg',
@@ -206,20 +213,39 @@
206 ... index = %(new_releases)s213 ... index = %(new_releases)s
207 ... parts = show-versions214 ... parts = show-versions
208 ... develop = showversions215 ... develop = showversions
209 ... prefer-final-build-system = false
210 ...216 ...
211 ... [show-versions]217 ... [show-versions]
212 ... recipe = showversions218 ... recipe = showversions
213 ... """ % dict(new_releases=new_releases))219 ... """ % dict(new_releases=new_releases))
214220
215 >>> print system(buildout),221 >>> print system(buildout +
222 ... ' buildout:accept-buildout-test-releases=true'),
223 ... # doctest: +NORMALIZE_WHITESPACE
216 Getting distribution for 'zc.buildout'.224 Getting distribution for 'zc.buildout'.
217 Got zc.buildout 100.0b1.225 Got zc.buildout 100.0b1.
218 Upgraded:226 Upgraded:
219 zc.buildout version 100.0b1,227 zc.buildout version 100.0b1,
220 setuptools version 99.99;228 setuptools version 99.99;
221 restarting.229 restarting.
230 Generated script '/sample-buildout/bin/buildout'.
231 NOTE: Accepting early releases of build system packages. Rerun bootstrap
232 without --accept-buildout-test-releases (-t) to return to default
233 behavior.
222 Develop: '/sample-buildout/showversions'234 Develop: '/sample-buildout/showversions'
223 Updating show-versions.235 Updating show-versions.
224 zc.buildout 100.0b1236 zc.buildout 100.0b1
225 setuptools 99.99237 setuptools 99.99
238
239The buildout script shows the change.
240
241 >>> buildout_script = join(sample_buildout, 'bin', 'buildout')
242 >>> import sys
243 >>> if sys.platform.startswith('win'):
244 ... buildout_script += '-script.py'
245 >>> print open(buildout_script).read() # doctest: +ELLIPSIS
246 #...
247 sys.argv.insert(1, 'buildout:accept-buildout-test-releases=true')
248 print ('NOTE: Accepting early releases of build system packages. Rerun '
249 'bootstrap without --accept-buildout-test-releases (-t) to return to '
250 'default behavior.')
251 ...

Subscribers

People subscribed via source and target branches

to all changes: