From c9184bae9e66ad9a64706205b840b0b6bf82ed27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 7 Jun 2010 15:49:24 +0000
Subject: [PATCH]  - move to proper directory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36043 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../CHANGES.txt                               |   8 --
 .../README.txt                                |  22 ----
 .../setup.py                                  |  39 -------
 .../src/erp5/__init__.py                      |   7 --
 .../src/erp5/recipe/__init__.py               |   7 --
 .../installbusinesstemplate/__init__.py       | 110 ------------------
 6 files changed, 193 deletions(-)
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/CHANGES.txt
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/README.txt
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/setup.py
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/__init__.py
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/__init__.py
 delete mode 100644 buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/installbusinesstemplate/__init__.py

diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/CHANGES.txt b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/CHANGES.txt
deleted file mode 100644
index c6943b0872..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/CHANGES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Changelog
-=========
-
-0.1 (2010-06-03)
-----------------
-
- - intial version
-   [nicolas]
diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/README.txt b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/README.txt
deleted file mode 100644
index b4b8556830..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/README.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Business Templates installer through XML-RPC
-================================================
-
-Easy way to install Business Templates
-
-[install-business-templates]
-recipe = erp5.recipe.installbusinesstemplate
-repository_path = file://${bt5list:location}
-bt5_list = ${bt5list:bt5_urls}
-update_catalog = auto
-protocol = http
-user = ${zope-instance:user}
-hostname = ${zope-instance:ip-address}
-port = ${zope-instance:http-address}
-portal_id = ${zope-instance:portal_id}
-
-
-repository_path    folder which contains bt5list xml file
-bt5_list           ordered list of business template to install
-update_catalog     parameter to pass for each business template
-                   - auto: update catalog if needed (default)
-                   - false: never update catalog
diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/setup.py b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/setup.py
deleted file mode 100644
index 795130ee29..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/setup.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup, find_packages
-
-name = "erp5.recipe.installbusinesstemplate"
-version = '0.1'
-
-def read(name):
-    return open(name).read()
-
-long_description=(
-        read('README.txt')
-        + '\n' +
-        read('CHANGES.txt')
-    )
-
-setup(
-    name = name,
-    version = version,
-    author = "Nicolas Delaby",
-    author_email = "nicolas@nexedi.com",
-    description = "ZC Buildout recipe to install easily BT5 from repository",
-    long_description=long_description,
-    license = "ZPL 2.1",
-    keywords = "zope2 buildout",
-    classifiers=[
-      "License :: OSI Approved :: Zope Public License",
-      "Framework :: Buildout",
-      "Framework :: Zope2",
-      ],
-    packages = find_packages('src'),
-    include_package_data = True,
-    package_dir = {'':'src'},
-    namespace_packages = ['erp5', 'erp5.recipe'],
-    #install_requires = [
-        #'infrae.subversion',
-    #],
-    zip_safe=False,
-    entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
-    )
diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/__init__.py b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/__init__.py
deleted file mode 100644
index 85880ef0d0..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- coding: utf-8 -*-
-# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
-try:
-    __import__('pkg_resources').declare_namespace(__name__)
-except ImportError:
-    from pkgutil import extend_path
-    __path__ = extend_path(__path__, __name__)
diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/__init__.py b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/__init__.py
deleted file mode 100644
index 85880ef0d0..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- coding: utf-8 -*-
-# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
-try:
-    __import__('pkg_resources').declare_namespace(__name__)
-except ImportError:
-    from pkgutil import extend_path
-    __path__ = extend_path(__path__, __name__)
diff --git a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/installbusinesstemplate/__init__.py b/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/installbusinesstemplate/__init__.py
deleted file mode 100644
index 6f8b54f5f9..0000000000
--- a/buildout/local-eggs/erp5.recipe.installbusinesstemplate/src/erp5/recipe/installbusinesstemplate/__init__.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# -*- coding: utf-8 -*-
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
-# Copyright (c) 2006-2008 Zope Corporation and Contributors.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-
-import os
-import logging
-
-import xmlrpclib
-#import zc.buildout
-import zc.buildout.easy_install
-import zc.buildout.download
-import zc.recipe.egg
-import subprocess
-
-class Recipe(object):
-
-  MAX_BT_PER_TRANSACTION = 2
-
-  def __init__(self, buildout, name, options):
-    self.buildout, self.options, self.name = buildout, options, name
-    self.logger = logging.getLogger(self.name)
-    self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options)
-
-
-    options.setdefault('location', os.path.join(
-        buildout['buildout']['parts-directory'],
-        self.name,
-        ))
-
-    # Business Template installation
-    options.setdefault('repository_path', '')
-    options.setdefault('bt5_list', '')
-    options.setdefault('update_catalog', 'auto')
-
-    # XML-RPC connection
-    options.setdefault('protocol', 'http')
-    options.setdefault('user', 'zope:zope')
-    options.setdefault('hostname', 'localhost')
-    options.setdefault('port', '8080')
-    options.setdefault('portal_id', 'erp5')
-
-  def _getConnectionString(self):
-    """Return connection string to connect
-    to instance
-    """
-    options = self.options
-    connection_string = '%(protocol)s://%(user)s@%(hostname)'\
-                        's:%(port)s/%(portal_id)s/' % options
-    return connection_string
-
-  def _getConnection(self, connection_string):
-    """Return XML-RPC connected object
-    """
-    connection =  xmlrpclib.ServerProxy(connection_string, allow_none=True)
-    return connection
-
-  def install(self):
-    options = self.options
-    location = options['location']
-    if not os.path.exists(location):
-      os.mkdir(location)
-
-    connection = self._getConnection(self._getConnectionString())
-    # install templates
-    repository_path = options['repository_path']
-    connection.portal_templates.updateRepositoryBusinessTemplateList(
-                                                       [repository_path], None)
-    bt5_list = [bt5 for bt5 in options['bt5_list'].splitlines() if bt5]
-    update_catalog_option = options['update_catalog'].lower()
-    if update_catalog_option == 'false':
-      update_catalog = False
-    elif update_catalog_option == 'true':
-      update_catalog = True
-    else:
-      # update_catalog_option == 'auto'
-      update_catalog = None 
-    while bt5_list:
-      partial_bt5_list = bt5_list[:self.MAX_BT_PER_TRANSACTION]
-      print 'Installing following business template:',\
-                                                    ', '.join(partial_bt5_list)
-      if update_catalog is not None:
-        result = connection.portal_templates\
-                .installBusinessTemplatesFromRepositories(partial_bt5_list,
-                                                          True, update_catalog)
-      else:
-        # Avoid overriding default value and let business template
-        # clearing catalog only if needed.
-        result = connection.portal_templates\
-                    .installBusinessTemplatesFromRepositories(partial_bt5_list,
-                                                              True)
-
-      bt5_list = bt5_list[self.MAX_BT_PER_TRANSACTION:]
-
-    return [] # instance related recipe, it can be disaster to allow buildout
-              # to remove instances
-
-
-  update = install
-- 
2.30.9