Commit 275d6e01 authored by Łukasz Nowak's avatar Łukasz Nowak

Merge branch 'master' into suggested-improvements

Conflicts:
	slapos/recipe/build.py
parents 42342905 319c7223
Changes Changes
======= =======
0.5 (unreleased) 0.6 (unreleased)
---------------- ----------------
* No changes yet. * No changes yet.
0.5 (2011-09-06)
----------------
* Download: Expose location too for compatiblity. [Łukasz Nowak]
0.4 (2011-09-06) 0.4 (2011-09-06)
---------------- ----------------
......
from setuptools import setup, find_packages from setuptools import setup, find_packages
version = '0.5-dev' version = '0.6-dev'
name = 'slapos.recipe.build' name = 'slapos.recipe.build'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
......
...@@ -341,6 +341,8 @@ class Script: ...@@ -341,6 +341,8 @@ class Script:
patch_options = shlex.split(patch_options) patch_options = shlex.split(patch_options)
if patch_binary is None: if patch_binary is None:
patch_binary = 'patch' patch_binary = 'patch'
else:
patch_binary = patch_binary.strip()
kwargs = dict() kwargs = dict()
if cwd is not None: if cwd is not None:
kwargs['cwd'] = cwd kwargs['cwd'] = cwd
...@@ -374,14 +376,14 @@ configure_command = self.options.get('configure-command') ...@@ -374,14 +376,14 @@ configure_command = self.options.get('configure-command')
if configure_command is None or configure_command.lower() == 'None': if configure_command is None or configure_command.lower() == 'None':
configure_command = ["./configure", "--prefix=%(location)s"] + %(configure-options)r.split() configure_command = ["./configure", "--prefix=%(location)s"] + %(configure-options)r.split()
else: else:
configure_command = configure_command.split(' ') configure_command = configure_command.split()
self.logger.info('Configuring with: %%r' %% ' '.join(configure_command)) self.logger.info('Configuring with: %%r' %% ' '.join(configure_command))
self.applyPatchList(self.options.get('patches'), self.options.get('patch-options'), self.options.get('patch-binary'), workdir) self.applyPatchList(self.options.get('patches'), self.options.get('patch-options'), self.options.get('patch-binary'), workdir)
call(configure_command, cwd=workdir, env=env) call(configure_command, cwd=workdir, env=env)
make_command = [self.options.get('make-binary', "make")] make_command = [self.options.get('make-binary', "make")]
make_options = self.options.get('make-options') make_options = self.options.get('make-options')
if make_options is not None: if make_options is not None:
make_command.extend(make_options.split(' ')) make_command.extend(make_options.split())
self.logger.info('Building with %%r' %% ' '.join(make_command)) self.logger.info('Building with %%r' %% ' '.join(make_command))
call(make_command, cwd=workdir, env=env) call(make_command, cwd=workdir, env=env)
make_command.append('install') make_command.append('install')
......
...@@ -44,6 +44,9 @@ class Recipe: ...@@ -44,6 +44,9 @@ class Recipe:
self.name) self.name)
self.destination = os.path.join(self.parts, self.options.get('filename', self.destination = os.path.join(self.parts, self.options.get('filename',
self.name)) self.name))
# backward compatibility with other recipes -- expose location
options['location'] = os.path.join(self.buildout['buildout'][
'parts-directory'], self.name)
options['target'] = self.destination options['target'] = self.destination
def install(self): def install(self):
......
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