Skip to main content

The configure-make-make-install recipe automates installation of configure-based source distribution into buildouts.

SVN version:

<svn://svn.zope.org/repos/main/zc.recipe.cmmi/trunk#egg=zc.recipe.cmmi-dev>

Release History

1.1.5 (2008-11-07)

Added to the README.txt file a link to the SVN repository, so that Setuptools can automatically find the development version when asked to install the “-dev” version of zc.recipe.cmmi.

Bugs Fixed

Applied fix for bug #261367 i.e. changed open() of file being downloaded to binary, so that errors like the following no longer occur under Windows.

uncompress = self.decompress.decompress(buf) error: Error -3 while decompressing: invalid distance too far back

1.1.4 (2008-06-25)

Add support to autogen configure files.

1.1.3 (2008-06-03)

Add support for updating the environment.

1.1.2 (2008-02-28)

Bugs Fixed

Check if the location folder exists before creating it.

After 1.1.0

Added support for patches to be downloaded from a url rather than only using patches on the filesystem

1.1.0

Added support for:

  • download-cache: downloaded files are cached in the ‘cmmi’ subdirectory of the cache cache keys are hashes of the url that the file was downloaded from cache information recorded in the cache.ini file within each directory

  • offline mode: cmmi will not go online if the package is not in the cache

  • variable location: build files other than in the parts directory if required

  • additional logging/output

1.0.2 (2007-06-03)

Added support for patches.

Bugs Fixed

Tests fixed (buildout’s output changed)

1.0.1 (2006-11-22)

Bugs Fixed

Added missing zip_safe flag.

1.0 (2006-11-22)

Initial release.

Detailed Documentation

We have an archive with a demo foo tar ball:

>>> ls(distros)
-  bar.tgz
-  foo.tgz

Let’s update a sample buildout to installs it:

>>> write('buildout.cfg',
... """
... [buildout]
... parts = foo
...
... [foo]
... recipe = zc.recipe.cmmi
... url = file://%s/foo.tgz
... """ % distros)

We used the url option to specify the location of the archive.

If we run the buildout, the configure script in the archive is run. It creates a make file which is also run:

>>> print system('bin/buildout'),
Installing foo.
foo: Downloading .../distros/foo.tgz
foo: Unpacking and configuring
configuring foo --prefix=/sample-buildout/parts/foo
echo building foo
building foo
echo installing foo
installing foo

The recipe also creates the parts directory:

>>> ls(sample_buildout, 'parts')
d  foo

If we run the buildout again, the update method will be called, which does nothing:

>>> print system('bin/buildout'),
Updating foo.

You can supply extra configure options:

>>> write('buildout.cfg',
... """
... [buildout]
... parts = foo
...
... [foo]
... recipe = zc.recipe.cmmi
... url = file://%s/foo.tgz
... extra_options = -a -b c
... """ % distros)
>>> print system('bin/buildout'),
Uninstalling foo.
Installing foo.
foo: Downloading .../distros/foo.tgz
foo: Unpacking and configuring
configuring foo --prefix=/sample-buildout/parts/foo -a -b c
echo building foo
building foo
echo installing foo
installing foo

The recipe sets the location option, which can be read by other recipes, to the location where the part is installed:

>>> cat('.installed.cfg')
... # doctest: +ELLIPSIS
[buildout]
installed_develop_eggs =
parts = foo
<BLANKLINE>
[foo]
__buildout_installed__ = /sample_buildout/parts/foo
...
extra_options = -a -b c
location = /sample_buildout/parts/foo
...

It may be necessary to set some environment variables when running configure or make. This can be done by adding an environment statement:

>>> write('buildout.cfg',
... """
... [buildout]
... parts = foo
...
... [foo]
... recipe = zc.recipe.cmmi
... url = file://%s/foo.tgz
... environment =
...   CFLAGS=-I/usr/lib/postgresql7.4/include
... """ % distros)
>>> print system('bin/buildout'),
Uninstalling foo.
Installing foo.
foo: Downloading .../distros/foo.tgz
foo: Unpacking and configuring
foo: Updating environment: CFLAGS=-I/usr/lib/postgresql7.4/include
configuring foo --prefix=/sample_buildout/parts/foo
echo building foo
building foo
echo installing foo
installing foo

Sometimes it’s necessary to patch the sources before building a package. You can specify the name of the patch to apply and (optional) patch options:

First of all let’s write a patchfile:

>>> import sys
>>> mkdir('patches')
>>> write('patches/config.patch',
... """--- configure
... +++ /dev/null
... @@ -1,13 +1,13 @@
...  #!%s
...  import sys
... -print "configuring foo", ' '.join(sys.argv[1:])
... +print "configuring foo patched", ' '.join(sys.argv[1:])
...
...  Makefile_template = '''
...  all:
... -\techo building foo
... +\techo building foo patched
...
...  install:
... -\techo installing foo
... +\techo installing foo patched
...  '''
...
...  open('Makefile', 'w').write(Makefile_template)
...
... """ % sys.executable)

Now let’s create a buildout.cfg file. Note: If no patch option is beeing passed, -p0 is appended by default.

>>> write('buildout.cfg',
... """
... [buildout]
... parts = foo
...
... [foo]
... recipe = zc.recipe.cmmi
... url = file://%s/foo.tgz
... patch = ${buildout:directory}/patches/config.patch
... patch_options = -p0
... """ % distros)
>>> print system('bin/buildout'),
Uninstalling foo.
Installing foo.
foo: Downloading .../distros/foo.tgz
foo: Unpacking and configuring
patching file configure
configuring foo patched --prefix=/sample_buildout/parts/foo
echo building foo patched
building foo patched
echo installing foo patched
installing foo patched

It is possible to autogenerate the configure files:

>>> write('buildout.cfg',
... """
... [buildout]
... parts = foo
...
... [foo]
... recipe = zc.recipe.cmmi
... url = file://%s/bar.tgz
... autogen = autogen.sh
... """ % distros)
>>> print system('bin/buildout'),
Uninstalling foo.
Installing foo.
foo: Downloading .../distros/bar.tgz
foo: Unpacking and configuring
foo: auto generating configure files
configuring foo --prefix=/sample_buildout/parts/foo
echo building foo
building foo
echo installing foo
installing foo

Download Cache

The recipe supports use of a download cache in the same way as zc.buildout. See downloadcache.txt for details

Download

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zc.recipe.cmmi-1.1.5.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zc.recipe.cmmi-1.1.5-py2.5.egg (17.3 kB view details)

Uploaded Egg

File details

Details for the file zc.recipe.cmmi-1.1.5.tar.gz.

File metadata

File hashes

Hashes for zc.recipe.cmmi-1.1.5.tar.gz
Algorithm Hash digest
SHA256 a2726b8bf86a8bca1cf1ba338c3aa84a0d6b95b375fe0932218cfbe74f85f36a
MD5 3f9c1495e5c44d894dfc560ec62a98d5
BLAKE2b-256 318b88f245965cef7c535f835f1361b0d0c77425561c457ab099b85891e70e03

See more details on using hashes here.

File details

Details for the file zc.recipe.cmmi-1.1.5-py2.5.egg.

File metadata

File hashes

Hashes for zc.recipe.cmmi-1.1.5-py2.5.egg
Algorithm Hash digest
SHA256 3991e40abb1096f2ce0ca1adbbc209387ac9f763cc96d8e89c425621e0bf2c94
MD5 fb1c72ab5d9302e9954857ee31052fa5
BLAKE2b-256 82936e59793cd195130be4b86bb8925d81d8989f131e298389e9cbe10f129e11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page