Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install slapos.tool.rebootstrap

How to install slapos.tool.rebootstrap

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install slapos.tool.rebootstrap
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
2.3 Available View build log
2.2 Available View build log
Windows (64-bit)
2.3 Available View build log
2.2 Available View build log
Mac OS X (10.5+)
2.3 Available View build log
2.2 Available View build log
Linux (32-bit)
2.3 Available View build log
2.2 Available View build log
Linux (64-bit)
2.3 Available View build log
2.2 Available View build log
 
License
ZPL 2.1
Dependencies
Lastest release
version 2.3 on Mar 19th, 2011

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.

Usage

Part to build python is required. By convention slapos.tool.rebootstrap will try to find python executable in:

special.parts.directory/partname/bin/partname

But when needed python-path parameter can be used to point rebootstrap to find python in:

special.parts.directory/partname/python-path

Add slapos.tool.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.

Example profile and invocation

[buildout]
extensions = slapos.tool.rebootstrap

parts =
  realrun

[rebootstrap]
section = slapospython
version = 1

[slapospython]
recipe = plone.recipe.command
stop-on-error = true
command = mkdir -p ${buildout:parts-directory}/${:__section_name__}/bin &&
  cp -f /usr/bin/python ${:executable}

[realrun]
recipe = plone.recipe.command
command =
  echo Running with python ${buildout:executable}
update-command = ${:command}

After bootstrapping and running this buildout it will print:

Running with python /path/to/buildout/parts.rebootstrap.1/slapospython/bin/slapospython

Running tests

Test for this package can be run as simple as:

$ python setup.py test

Please keep in mind that clean python environment is required -- the best one is provided by buildout or virtualenv WITHOUT site packages.

2.3 (2011-03-18)

  • support case when rebootstrap parts directory already exists, to support failed previous run [Łukasz Nowak]

2.2 (2011-01-24)

  • support extensions in rebootstrap phase [Łukasz Nowak]
  • rename to slapos.tool.reboostrap from slapos.rebootstrap [Łukasz Nowak]

2.1 (2010-12-02)

  • use reboostrap.version prefix for generated files and directories instead of suffix [Łukasz Nowak]

2.0 (2010-12-01)

  • build python in "separated" environment to avoid reinstalling it in place, backward incompatible with <=1.0 [Łukasz Nowak]

1.0 (2010-11-29)

  • make possible to have newline in rebootstrap section [Łukasz Nowak]

0.4 (2010-11-04)

  • re-run buildout while required part installation, to have all dependencies installed correctly [Łukasz Nowak]

0.3 (2010-10-27)

  • replace process while restarting buildout to have this process exit codes and issues, as otherwise false positive exit code 0 might appear [Łukasz Nowak]

0.2.1 (2010-10-15)

  • fix documentation formatting
  • fix documentation typos [Łukasz Nowak]

0.2 (unreleased)

  • Tested the egg. [Łukasz Nowak]

0.1 (2010-10-11)

  • Initial version. [Łukasz Nowak]

Subscribe to package updates

Last updated Mar 19th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.