Commit 56c9d23c authored by Kai Lautaportti's avatar Kai Lautaportti

Fixed a problem with the 'keep-compile-dir' options. Updated version to

1.0.1.


git-svn-id: https://svn.hexagonit.fi/hexagonit.recipe.cmmi/trunk@4539 b96f28ea-bbdf-0310-b3b3-e15a02b9f88d
parent ff10b936
Change History
**************
1.0.1
=====
- 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.
1.0.0
=====
......
......@@ -119,7 +119,7 @@ default build options.
>>> print system(buildout)
Installing package.
package: Creating download directory: /sample_buildout/downloads
package: Extracting package to /tmp/...package
package: Extracting package to /sample_buildout/parts/package__compile__
configure --prefix=/sample_buildout/parts/package
building package
installing package
......@@ -165,7 +165,7 @@ targets and also patches the source code before the scripts are run.
Installing package.
package: Using a cached copy from /sample_buildout/downloads/package-0.0.0.tar.gz
package: MD5 checksum OK
package: Extracting package to /tmp/...
package: Extracting package to /sample_buildout/parts/package__compile__
package: Applying patches
patching file configure
patching file Makefile.dist
......@@ -239,7 +239,7 @@ and a new buildout to try it out
Uninstalling package.
Installing package.
package: Using a cached copy from /sample_buildout/downloads/package-0.0.0.tar.gz
package: Extracting package to /tmp/...
package: Extracting package to /sample_buildout/parts/package__compile__
package: Executing pre-configure-hook
hook: This is pre-configure-hook!
configure --prefix=/sample_buildout/parts/package
......@@ -255,3 +255,4 @@ For even more specific needs you can write your own recipe that uses
``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 recipe.
......@@ -25,6 +25,7 @@ class Recipe:
self.name)
options['prefix'] = options['location']
options['url'] = options['url']
options['compile-directory'] = '%s__compile__' % options['location']
def update(self):
pass
......@@ -48,6 +49,7 @@ class Recipe:
def install(self):
log = logging.getLogger(self.name)
parts = []
make_cmd = self.options.get('make-binary', 'make').strip()
make_targets = ' '.join(self.options.get('make-targets', 'install').split())
......@@ -58,7 +60,8 @@ class Recipe:
patch_options = ' '.join(self.options.get('patch-options', '-p0').split())
patches = self.options.get('patches', '').split()
compile_dir = tempfile.mkdtemp(self.name)
compile_dir = self.options['compile-directory']
os.mkdir(compile_dir)
# Download the source using hexagonit.recipe.download
try:
......@@ -110,8 +113,13 @@ class Recipe:
raise
if self.options.get('keep-compile-dir', '').lower() in ('true', 'yes', '1', 'on'):
self.options['compile-dir'] = os.getcwd()
# If we're keeping the compile directory around, add it to
# the parts so that it's also removed when this recipe is
# uninstalled.
parts.append(self.options['compile-directory'])
else:
shutil.rmtree(compile_dir)
del self.options['compile-directory']
return [self.options['location']]
parts.append(self.options['location'])
return parts
from setuptools import setup, find_packages
import os
version = '1.0.0'
version = '1.0.1'
name = 'hexagonit.recipe.cmmi'
def read(*rnames):
......
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