Commit 6d7b39c0 authored by Reinout van Rees's avatar Reinout van Rees

bootstrap.py has a version and a --version argument

Replaces #204, fixes #30.

A date leads to less confusion than a version number separate
from buildout's own version number. Similarly, tracking buildout's version
number leads to bootstraps with a new version number but without changes or to
bootstraps with version number from an already-older buildout. So: a date is
best.
parent 58332bc0
......@@ -22,6 +22,18 @@ Unreleased
https://github.com/buildout/buildout/pull/222 .
[lrowe]
- Updated buildout's `travis-ci <https://travis-ci.org/buildout/buildout>`_
configuration so that tests run much quicker so that buildout is easier and
quicker to develop.
[reinout]
- A new boostrap.py file is released (version 2015-07-01).
- When bootstrapping, the ``develop-eggs/`` directory is first removed. This
prevents old left-over ``.egg-link`` files from breaking buildout's careful
package collection mechanism.
[reinout]
- Bootstrap script now accepts ``--to-dir``. Setuptools is installed there. If
already available there, it is reused. This can be used to bootstrap
buildout without internet access. Similarly, a local ``ez_setup.py`` is used
......@@ -33,14 +45,10 @@ Unreleased
``--version`` to pick a specific buildout version.
[reinout]
- Updated buildout's `travis-ci <https://travis-ci.org/buildout/buildout>`_
configuration so that tests run much quicker so that buildout is easier and
quicker to develop.
[reinout]
- When bootstrapping, the ``develop-eggs/`` directory is first removed. This
prevents old left-over ``.egg-link`` files from breaking buildout's careful
package collection mechanism.
- The bootstrap script now accepts ``--version`` which prints the bootstrap
version. This version is the date the bootstrap.py was last changed. A date
is handier or less confusing than either tracking zc.buildout's version or
having a separate bootstrap version number.
[reinout]
2.3.1 (2014-12-16)
......
......@@ -25,6 +25,9 @@ import tempfile
from optparse import OptionParser
__version__ = '2015-07-01'
# See zc.buildout's changelog if this version is up to date.
tmpeggs = tempfile.mkdtemp(prefix='bootstrap-')
usage = '''\
......@@ -40,8 +43,9 @@ this script from going over the network.
'''
parser = OptionParser(usage=usage)
parser.add_option("--buildout-version",
help="Use a specific zc.buildout version")
parser.add_option("--version",
action="store_true", default=False,
help=("Return bootstrap.py version."))
parser.add_option("-t", "--accept-buildout-test-releases",
dest='accept_buildout_test_releases',
action="store_true", default=False,
......@@ -59,6 +63,8 @@ parser.add_option("-f", "--find-links",
parser.add_option("--allow-site-packages",
action="store_true", default=False,
help=("Let bootstrap.py use existing site packages"))
parser.add_option("--buildout-version",
help="Use a specific zc.buildout version")
parser.add_option("--setuptools-version",
help="Use a specific setuptools version")
parser.add_option("--setuptools-to-dir",
......@@ -66,6 +72,9 @@ parser.add_option("--setuptools-to-dir",
"setuptools versions"))
options, args = parser.parse_args()
if options.version:
print("bootstrap.py version %s" % __version__)
######################################################################
# load/install setuptools
......
......@@ -159,3 +159,16 @@ specify the setuptools version, and to reuse the setuptools zipfile.
'/sample/eggs/setuptools-14.3...egg',
'/sample/eggs/zc.buildout-2.0.0...egg',
]...
You can ask bootstrap.py for its version. This is really the day the last
change was made. A date leads to less confusion than a version number separate
from buildout's own version number. Similarly, tracking buildout's version
number leads to bootstraps with a new version number but without changes or to
bootstraps with version number from an already-older buildout. So: a date is
best.
>>> print_('X'); print_(system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --version')); print_('X')
... # doctest: +ELLIPSIS
X...2015...X
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment