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 9f523c490e505d10fbc34b6315a8a1984cb35ece
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:40:00 2011 +0200

    Prepare 0.5 release.

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

    Be more compatible.

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

    Merge branch 'master' into cmmi

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

    Explain more about patches.

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

    Provide better looking patches.

commit c6befb0568e21d95ee2b9e96a0490dadf96b7c06
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 d2212cb7fa4e7d31af671b33b32fdf97094f7e6e
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 17:04:05 2011 +0200

    Allow to override configure command.

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

    Share applyPatchList with in base class.

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

    Support no md5sum.

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

    Show how to patch.

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

    Allow options per patch.

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

    Allow patching.

commit 8934eb92f100e5f7916bdea0bffd65287cee7558
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 74d0b2bd41a827646a1a1fb851f0dbe8185a4965
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 034c238125fd040c39c87afce6ea4aa6150ed059
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 6 16:17:07 2011 +0200

    Another typo.

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

    Follow fixed typo.

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

    Extract does not need md5sum.

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

    Pass md5sum directly.

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

    Allow to pass empty md5sum.

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

    Fix typos.

commit 8919378ddc44169af07426a5cce6aa55b064f9c9
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