Commit 319c7223 authored by Łukasz Nowak's avatar Łukasz Nowak

Improve cmmi part even more.

Squashed commit of the following:

commit 506d815ff7e1d7b7b5b3c5edcfcea744c5b2201e
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:54:59 2011 +0200

    Support multiline values.

commit c5d9415000fb072a07164bbdd5c276e53470b265
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:48:54 2011 +0200

    Fix compatibility layer.

commit 1e301c7ba51060d944fea9ff2be1aba00e3a48b6
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:41:41 2011 +0200

    Go back to development.

commit 9f523c49
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:40:00 2011 +0200

    Prepare 0.5 release.

commit fcaf5c04
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:39:28 2011 +0200

    Be more compatible.

commit 5284491f
Merge: 2d7dc0b3 f15bb155
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:28:40 2011 +0200

    Merge branch 'master' into cmmi

commit 2d7dc0b3
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:22:13 2011 +0200

    Explain more about patches.

commit d5df4cdc
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:18:55 2011 +0200

    Provide better looking patches.

commit c6befb05
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:15:32 2011 +0200

    Support make-command and make-options.

    Fix configure-command.

commit d2212cb7
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:04:05 2011 +0200

    Allow to override configure command.

commit 4321b38a
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:56:49 2011 +0200

    Share applyPatchList with in base class.

commit 4a2ea3b3
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:56:29 2011 +0200

    Support no md5sum.

commit 2cd36cb7
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:56:16 2011 +0200

    Show how to patch.

commit 8cd9ea9c
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:53:45 2011 +0200

    Allow options per patch.

commit 84fea623
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:48:47 2011 +0200

    Allow patching.

commit 8934eb92
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:30:46 2011 +0200

    Allow to keep directories in case of error.

    Default is to remove.

commit 74d0b2bd
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:24:49 2011 +0200

    Allow to have a=b=c, where a is key and b=c is value.

commit 034c2381
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:17:07 2011 +0200

    Another typo.

commit f5abcde0
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:15:44 2011 +0200

    Follow fixed typo.

commit 5b950e26
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:14:35 2011 +0200

    Extract does not need md5sum.

commit 6f725632
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:14:14 2011 +0200

    Pass md5sum directly.

commit 9f42d22a
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:13:53 2011 +0200

    Allow to pass empty md5sum.

commit c91fafb1
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:13:15 2011 +0200

    Fix typos.

commit 8919378d
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:12:31 2011 +0200

    Fix examples.
parent f15bb155
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"
......
...@@ -330,9 +330,11 @@ class Script: ...@@ -330,9 +330,11 @@ class Script:
if patch_options is None: if patch_options is None:
patch_options = [] patch_options = []
else: else:
patch_options = patch_options.split(' ') patch_options = patch_options.split()
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
...@@ -366,14 +368,14 @@ configure_command = self.options.get('configure-command') ...@@ -366,14 +368,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