Metadata-Version: 1.1
Name: zc.recipe.filestorage
Version: 1.1.2
Summary: ZC Buildout recipe for defining a file-storage
Home-page: http://pypi.python.org/pypi/zc.recipe.filestorage/
Author: Jim Fulton
Author-email: jim@zope.com
License: ZPL 2.1
Description: ===================================
        Recipe for setting up a filestorage
        ===================================
        
        This recipe can be used to define a file-storage.  It creates a ZConfig
        file-storage database specification that can be used by other recipes to
        generate ZConfig configuration files.
        
        This recipe takes an optional path option.  If none is given, it creates and
        uses a subdirectory of the buildout parts directory with the same name as the
        part.
        
        The recipe records a zconfig option for use by other recipes.
        
        We'll show a couple of examples, using a dictionary as a simulated buildout
        object:
        
            >>> import zc.recipe.filestorage
            >>> buildout = dict(
            ...   buildout = {
            ...      'directory': '/buildout',
            ...      },
            ...   db = {
            ...      'path': 'foo/Main.fs',
            ...      },
            ...   )
            >>> recipe = zc.recipe.filestorage.Recipe(
            ...                   buildout, 'db', buildout['db'])
        
            >>> print(buildout['db']['path'])
            /buildout/foo/Main.fs
        
            >>> from six import print_
            >>> print_(buildout['db']['zconfig'], end='')
            <zodb>
              <filestorage>
                path /buildout/foo/Main.fs
              </filestorage>
            </zodb>
        
            >>> recipe.install()
            ()
        
            >>> import tempfile
            >>> d = tempfile.mkdtemp()
            >>> buildout = dict(
            ...   buildout = {
            ...      'parts-directory': d,
            ...      },
            ...   db = {},
            ...   )
        
            >>> recipe = zc.recipe.filestorage.Recipe(
            ...                   buildout, 'db', buildout['db'])
        
            >>> print(buildout['db']['path'])
            /tmp/tmpQo0DTB/db/Data.fs
        
            >>> print_(buildout['db']['zconfig'], end='')
            <zodb>
              <filestorage>
                path /tmp/tmpQo0DTB/db/Data.fs
              </filestorage>
            </zodb>
        
            >>> recipe.install()
            ()
        
            >>> import os
            >>> os.listdir(d)
            ['db']
        
        The update method doesn't do much, as the database part's directory
        already exists, but it is present, so buildout doesn't complain and doesn't
        accidentally run install() again:
        
            >>> recipe.update()
        
        If the storage's directory is removed, is it re-added by the update method:
        
            >>> os.rmdir(os.path.join(d, 'db'))
            >>> os.listdir(d)
            []
            >>> recipe.update()
            >>> os.listdir(d)
            ['db']
        
        This is useful in development when the directory containing the database is
        removed in order to start the database from scratch.
        
        
        =======
        CHANGES
        =======
        
        1.1.2 (2014-02-21)
        ------------------
        
        - Fixed: packaging bug that caused 'pip install zc.recipe.filestorage' to fail
          with an error about missing README.txt
        
        1.1.1 (2014-02-16)
        ------------------
        
        - Fixed: packaging bug that caused a test failure in
          a test runner that didn't use buildout to run setup.py.
        
        1.1.0 (2014-02-14)
        ------------------
        
        - Python 3 compatibility
        
        - Using Python's ``doctest`` module instead of deprecated
          ``zope.testing.doctest``.
        
        - Removed 'shared-blob-dir' from blobstorage section.
        
        
        1.0.0 (2007-11-03)
        ------------------
        
        - Initial release.
        
Keywords: zodb,zc.buildout
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: ZODB
Classifier: Framework :: Buildout
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
