Metadata-Version: 1.0
Name: ro.bdb.cmmi
Version: 1.0.0
Summary: ZC Buildout recipe for BDB configure/make/make install
Home-page: http://www.python.org/pypi/ro.bdb.cmmi
Author: Reed O'Brien
Author-email: reed@reedobrien.com
License: ZPL 2.1
Description: This is a (barely) modified version of zc.recipe.cmmi. It was modified only to change into the correct bdb directory and call the unix build from there.
        
        Nothing other than the basic build has been used, but that has been working successfully.
        
        We have an archive with a demo foo tar ball:
        
        >>> ls(distros)
        -  foo.tgz
        
        Let's update a sample buildout to installs it:
        
        >>> write('buildout.cfg',
        ... """
        ... [buildout]
        ... parts = foo
        ...
        ... [foo]
        ... recipe = ro.bdb.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 = ro.bdb.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
        ...
        
        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 = ro.bdb.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
        
        
        Release History
        ***************
        
        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
        **********************
        
        
        I haven't modified this since copying and changing to make it build bdb for me.  I doubt if this is valid anymore.
        Although it might work if foo.tgz is a Berkeley archive.
        
        We have an archive with a demo foo tar ball:
        
        >>> ls(distros)
        -  foo.tgz
        
        Let's update a sample buildout to installs it:
        
        >>> write('buildout.cfg',
        ... """
        ... [buildout]
        ... parts = foo
        ...
        ... [foo]
        ... recipe = ro.bdb.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 = ro.bdb.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
        ...
        
        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 = ro.bdb.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
        
        
        Download Cache
        **************
        The recipe supports use of a download cache in the same way
        as zc.buildout. See downloadcache.txt for details
        
        Download
        **********************
        
Keywords: zope3 buildout
Platform: UNKNOWN
