Commit ce264469 authored by Jondy Zhao's avatar Jondy Zhao Committed by Cédric de Saint Martin

Fork hexagonit.recipe.cmmi

parent 5312454e
Change History
2.0 (2013-04-07)
- Dropped support for Python 2.4/2.5. Use the 1.x versions for those.
Currently supported versions are Python 2.6, 2.7, 3.2 and 3.3. [dokai]
- Python 3.2/3.3 support. [dokai, mmariani]
- Tox support.
- Travis CI integration.
- Automatically clean up a left-over compile directory from a previously
failed run. See
1.6 (2012-06-28)
- Relicensed under the `3-clause BSD license <>`_.
1.5.1 (2012-05-21)
- PEP8 / Pyflakes cleanup.
- Quote ``--prefix`` paths to support whitespace characters in
the path. Closes
- Fixed importing of the hook scripts on Windows. Closes
1.5.0 (2010-12-17)
- Refactored the environment variable handling logic. Python versions prior
to 2.6 have an issue clearing the environment variables using
``os.environ.clear()`` (See [dokai]
Instead of modifying ``os.environ`` directly we use the ``subprocess``
module to run the commands in child processes which are given an explicit
environment which is a copy of the current ``os.environ`` augmented with
the per-part overrides. As a result, ``os.environ`` is no longer modified
by this recipe.
The `Python hook scripts`_ are passed the augmented environment dictionary
as a third parameter.
.. warning:: Existing hook scripts accepting only two parameters
continue to work but they do not have access to the modified
environment variables. To fix this they should be refactored
to accept the third parameter.
for details.
1.4.0 (2010-08-27)
- Added support for passing options to ``make`` with the new
``make-options`` option. See the `Installing a package without an autoconf
like system`_ section below for an example. [dokai]
- The ``--prefix`` parameter will be automatically given to the configure
command if and only if
- the ``configure-command`` is not used to specify a custom configure command and
- ``--prefix`` is not given explicitly in the ``configure-options`` option.
- Removed the ``is_build_dir()`` heuristic.
Previously the recipe inspected the contents of the downloaded package to
determine if it contained the necessary files for building the package (it
checked if files named ``configure`` or ``Makefile.PL`` existed) and gave
an error message if they were missing. However, the recipe is useful for
building many different kinds of software packages and checking for
particular files limited its use severely.
Now the recipe omits any checks for particular files in the downloaded
package. It is recommended that you use the ``md5sum`` option in your part
configuration to assert that you are downloading the package you expect
to. [dokai]
1.3.1 (2010-08-23)
- Refactored the ``is_build_dir()`` helper method to make it easier to test
and override in customized recipes. [dokai]
- Fixed the handling of the working directory so that it is restored to the
state before executing the recipe regardless whether the recipe was
successful or not. Thanks to Jonathan Ballet for the report and preliminary
patch. [dokai]
- Fixed
Environment variables defined in one part will no longer leak to other
subsequent parts. [dokai]
1.3.0 (2009-09-20)
- Added new options ``environment-section`` and ``environment`` to control
environment variables before executing the recipe.
- Added a new option, ``prefix``, to override the installation prefix.
Defaults to the previously hardcoded value of the part location.
- Added new ``configure-command`` option to control the command used to
generate the ``Makefile``. This makes it possible to build slightly
different packages, e.g. Perl projects where Makefile.PL replaces the
configure script.
- Don't try to execute hooks if the option is an empty string. This
will make it possible to disable hooks when extending existing
- Added new option ``path`` to allow building and installing local
source trees. The ``path`` option is mutually exclusive with
- Fixed a bug with 'keep-compile-dir' option. The location of the
compilation directory was not available through the
``options['compile-directory']`` option as documented.
- Initial public release.
......@@ -6,13 +6,13 @@ Recipe for compiling and installing software
The recipe provides the means to compile and install source distributions
using ``configure`` and ``make`` and other similar tools. It is inspired by
the zc.recipe.cmmi_ recipe but provides more control over the build process.
the hexagonit.recipe.cmmi_ recipe but provides more control over the build process.
Clone URL: git clone git://
Clone URL: git clone
Issue tracker:
Issue tracker: None
Supported Python versions: 2.6, 2.7, 3.2, 3.3
;tag_build = dev
;tag_svn_revision = true
from setuptools import setup, find_packages
import os
version = '2.0'
name = 'hexagonit.recipe.cmmi'
version = '0.1'
name = 'slapos.recipe.cmmi'
def read(*rnames):
......@@ -16,12 +16,10 @@ setup(
+ '\n' +
+ '\n' +
'Detailed Documentation\n'
+ '\n' +
read('hexagonit', 'recipe', 'cmmi', 'README.txt')
read('slapos', 'recipe', 'cmmi', 'README.txt')
+ '\n' +
......@@ -148,7 +148,7 @@ Supported options
used, for example, to append to the ``PATH`` variable, e.g.::
recipe = hexagonit.recipe.cmmi
recipe = slapos.recipe.cmmi
environment-section =
......@@ -201,7 +201,7 @@ Let's create a buildout to build and install the package.
... parts = package
... [package]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... url = file://%s/package-0.0.0.tar.gz
... """ % src)
......@@ -237,7 +237,7 @@ a custom location within the buildout::
... perl_lib = ${buildout:directory}/perl_lib
... [foobar]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... configure-command = perl -I${buildout:perl_lib}/lib/perl5 Makefile.PL INSTALL_BASE=${buildout:perl_lib}
... url = file://%s/Foo-Bar-0.0.0.tar.gz
... """ % src)
......@@ -272,7 +272,7 @@ Makefile and using explicit ``make`` options to control the build process.
... parts = haproxy
... [haproxy]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... configure-command = true
... make-options =
... TARGET=linux26
......@@ -318,7 +318,7 @@ and building that.
... parts = package
... [package]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... path = %s/package-0.0.0
... """ % checkout_dir)
......@@ -357,7 +357,7 @@ with a new buildout and provide more options.
... LDFLAGS = -I/sw/lib
... [package]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... url = file://%(src)s/package-0.0.0.tar.gz
... md5sum = 6b94295c042a91ea3203857326bc9209
... prefix = /somewhere/else
......@@ -457,7 +457,7 @@ and a new buildout to try it out
... parts = package
... [package]
... recipe = hexagonit.recipe.cmmi
... recipe = slapos.recipe.cmmi
... url = file://%(src)s/package-0.0.0.tar.gz
... pre-configure-hook = %(module)s:preconfigure
... pre-make-hook = %(module)s:premake
......@@ -479,7 +479,7 @@ and a new buildout to try it out
hook: This is post-make-hook!
For even more specific needs you can write your own recipe that uses
``hexagonit.recipe.cmmi`` and set the ``keep-compile-dir`` option to ``true``.
``slapos.recipe.cmmi`` and set the ``keep-compile-dir`` option to ``true``.
You can then continue from where this recipe finished by reading the location
of the compile directory from ``options['compile-directory']`` from your own
......@@ -24,8 +24,7 @@ optionflags = (doctest.ELLIPSIS |
def setUp(test):
zc.buildout.testing.install('', test)
zc.buildout.testing.install_develop('hexagonit.recipe.cmmi', test)
zc.buildout.testing.install_develop('slapos.recipe.cmmi', test)
class NonInformativeTests(unittest.TestCase):
......@@ -46,8 +45,8 @@ class NonInformativeTests(unittest.TestCase):
os.chmod(path, mode)
return path
def make_recipe(self, buildout, name, options):
from hexagonit.recipe.cmmi import Recipe
def make_recipe(self, buildout, name, options, **buildout_options):
from slapos.recipe.cmmi import Recipe
parts_directory_path = os.path.join(self.dir, 'test_parts')
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