Commit 225767ad authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Rewrite for zc.buildout >= 2.0.0.

 * Same parts directory as the normal buildout is used so that we can
   build faster and also make the code simpler.
 * Python part is now specified by `python` parameter in `buildout`
   section.
 * Restart automatically with the original python when running python
   part is removed.
parent 26f6d42a
......@@ -4,7 +4,13 @@ Changes
3.2 (unreleased)
----------------
* No changes yet.
* Support zc.buildout >= 2.0.0.
* Same parts directory as the normal buildout is used so that we can
build faster and also make the code simpler.
* Python part is now specified by `python` parameter in `buildout`
section.
* Restart automatically with the original python when running python
part is removed.
3.1 (2011-06-24)
----------------
......
Chicken and egg python zc.buildout extension
============================================
Rerun buildout with a python provided by buildout
===============================================
This extensions for zc.buildout is created to solve chicken and egg problem
while working with buildout and when some exact version of python, which is
provided by buildout shall be used to *execute* this buildout itself.
Buildout 2.0 no-longer supports using multiple versions of Python in a
single buildout. This extension makes it possible to use 'yet another
single' version of python, by building a specified python part and its
dependencies first then reinvoking buildout with the executable.
Usage
-----
Part to build python is required. By convention slapos.rebootstrap will try to
find python executable in:
A part to build python is required. You need to specify it by `python`
parameter in `buildout` section, just same as buildout 1.x. The python
section must provide executable option that gives the path to a Python
executable.
special.parts.directory/partname/bin/partname
And add slapos.rebootstrap to `extensions` parameter in `buildout` section.
But when needed python-path parameter can be used to point rebootstrap to find
python in:
special.parts.directory/partname/python-path
Add slapos.rebootstrap to extensions and set rebooter-section to above section.
Use whatever python to bootstrap and run buildout. If reboot will detect that
sys.executable used to run buildout is different then executable provided in
python section it will try to find this executable. If it does not exists it
will install this section and then reinstall buildout using new python
executable. Later buildout run will continue using new python.
Because external buildout is used to provide buildout version parameter is
introduced to being able to upgrade not in place python part. This parameter
is required and becomes part of suffix.
Whenever developer-mode is set to true no cleanup will be done in case of
failure. Then user is responsible to cleanup directories.
Use whatever python to bootstrap and run buildout. If this extension
detects that sys.executable used to run buildout is different than
executable provided in python section, it will try to find this
executable. If it does not exists, it will install this section and
then reinstall buildout using new python executable. Later buildout
run will continue using new python.
Example profile and invocation
------------------------------
......@@ -39,14 +29,11 @@ Example profile and invocation
[buildout]
extensions = slapos.rebootstrap
python = slapospython
parts =
realrun
[rebootstrap]
section = slapospython
version = 1
[slapospython]
recipe = plone.recipe.command
stop-on-error = true
......@@ -61,7 +48,7 @@ Example profile and invocation
After bootstrapping and running this buildout it will print:
Running with python /path/to/buildout/parts.rebootstrap.1/slapospython/bin/slapospython
Running with python /path/to/buildout/parts/slapospython/bin/slapospython
Running tests
-------------
......
from setuptools import setup, find_packages
version = '3.2-dev'
version = '3.2'
name = "slapos.rebootstrap"
long_description = open("README.txt").read() + '\n\n'
......@@ -38,7 +38,7 @@ setup(
zip_safe=True,
install_requires=[
'setuptools',
'zc.buildout'
'zc.buildout >=2.0.0'
],
tests_require=[
'zope.testing',
......
This diff is collapsed.
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