[Checkins] SVN: z3c.recipe.fakezope2eggs/ initial import
Jean-Fran�ois Roche
jfroche at jfroche.be
Mon Jul 21 06:32:12 EDT 2008
Log message for revision 88647:
initial import
Changed:
A z3c.recipe.fakezope2eggs/
A z3c.recipe.fakezope2eggs/trunk/
A z3c.recipe.fakezope2eggs/trunk/.installed.cfg
A z3c.recipe.fakezope2eggs/trunk/CHANGES.txt
A z3c.recipe.fakezope2eggs/trunk/README.txt
A z3c.recipe.fakezope2eggs/trunk/bootstrap.py
A z3c.recipe.fakezope2eggs/trunk/buildout.cfg
A z3c.recipe.fakezope2eggs/trunk/setup.py
A z3c.recipe.fakezope2eggs/trunk/src/
A z3c.recipe.fakezope2eggs/trunk/src/z3c/
A z3c.recipe.fakezope2eggs/trunk/src/z3c/__init__.py
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/__init__.py
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/README.txt
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/__init__.py
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/__init__.py
A z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/test_docs.py
-=-
Added: z3c.recipe.fakezope2eggs/trunk/.installed.cfg
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/.installed.cfg (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/.installed.cfg 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,35 @@
+[buildout]
+installed_develop_eggs = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/develop-eggs/z3c.recipe.fakezope2eggs.egg-link
+parts = test eggs
+
+[test]
+__buildout_installed__ = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/parts/test
+ /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin/test
+__buildout_signature__ = zc.recipe.testrunner-1.0.0-py2.4.egg zc.recipe.egg-1.1.0-py2.4.egg setuptools-0.6c8-py2.4.egg zope.testing-3.6.0-py2.4.egg zc.buildout-1.1.0-py2.4.egg zc.buildout-1.1.0-py2.4.egg zope.interface-3.4.1-py2.4-linux-i686.egg
+_b = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin
+_d = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/develop-eggs
+_e = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/eggs
+bin-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin
+defaults = ['-s', 'z3c.recipe.fakezope2eggs']
+develop-eggs-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/develop-eggs
+eggs = %(__buildout_space_n__)sz3c.recipe.fakezope2eggs
+ plone.recipe.zope2install
+eggs-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/eggs
+executable = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin/python2.4
+location = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/parts/test
+recipe = zc.recipe.testrunner
+script = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin/test
+
+[eggs]
+__buildout_installed__ = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin/python
+__buildout_signature__ = zc.recipe.egg-1.1.0-py2.4.egg setuptools-0.6c8-py2.4.egg zc.buildout-1.1.0-py2.4.egg
+_b = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin
+_d = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/develop-eggs
+_e = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/eggs
+bin-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin
+develop-eggs-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/develop-eggs
+eggs = %(__buildout_space_n__)sz3c.recipe.fakezope2eggs
+eggs-directory = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/eggs
+executable = /svn/svn.affinitic.be/zope/z3c.recipe.fakezope2eggs/trunk/bin/python2.4
+interpreter = python
+recipe = zc.recipe.egg
Added: z3c.recipe.fakezope2eggs/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/CHANGES.txt (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/CHANGES.txt 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,39 @@
+=======
+CHANGES
+=======
+
+Version 0.5 (2008-07-21)
+--------------------------
+
+ - rename affinitic.recipe.fakezope2eggs to z3c.recipe.fakezope2eggs and
+ moving it to zope.org repos
+
+ - Feature: Apply patch from Daniel Nouri which add an optional
+ parameter to skip fake eggs creation
+
+Version 0.4 (2008-03-25)
+--------------------------
+
+ - Feature: Apply patch from Bertrand Mathieu which add an optional
+ parameter to be able to define another zope2 part name (might
+ not be always "zope2" in every buildout)
+
+
+Version 0.3 (2008-02-19)
+--------------------------
+
+ - Feature: Add additional-fake-eggs option which allow you to define
+ other fake eggs which are not in zope.* or in zope.app.*
+
+
+Version 0.2 (2008-01-28)
+--------------------------
+
+ - Bug: Fix zope.app.* bug
+
+
+Version 0.1 (2007-12-10)
+--------------------------
+
+ - Initial Release
+
Property changes on: z3c.recipe.fakezope2eggs/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.recipe.fakezope2eggs/trunk/README.txt
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/README.txt (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/README.txt 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,12 @@
+Fake Zope 2 Eggs
+================
+
+Zope 2 isn't eggified yet, Zope 3 does. That can become a problem if you want to
+install some egg with depedencies related to Zope 3 eggs (such as zope.interface,
+zope.component, ...)
+
+This buildout recipe will simply add some fake egg link to zope libraries (installed
+inside zope/lib/python/zope/...) so that setuptools can see that the dependencies are
+already satisfied and it won't fetch them anymore.
+
+
Property changes on: z3c.recipe.fakezope2eggs/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.recipe.fakezope2eggs/trunk/bootstrap.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/bootstrap.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/bootstrap.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# 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.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Property changes on: z3c.recipe.fakezope2eggs/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/buildout.cfg
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/buildout.cfg (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/buildout.cfg 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,17 @@
+[buildout]
+develop = .
+parts = test eggs
+
+[eggs]
+recipe = zc.recipe.egg
+eggs =
+ z3c.recipe.fakezope2eggs
+interpreter = python
+
+[test]
+recipe = zc.recipe.testrunner
+eggs =
+ z3c.recipe.fakezope2eggs
+ plone.recipe.zope2install
+defaults = ['-s', 'z3c.recipe.fakezope2eggs']
+
Added: z3c.recipe.fakezope2eggs/trunk/setup.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/setup.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/setup.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,43 @@
+import os
+from setuptools import setup, find_packages
+
+name = "z3c.recipe.fakezope2eggs"
+version = '0.5'
+
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+
+setup(
+ name = name,
+ version = version,
+ author = "Jean-Francois Roche",
+ author_email = "jfroche at affinitic.be",
+ description = "ZC Buildout recipe to fake zope 2 packages as eggs.",
+ long_description=(read('README.txt')
+ + '\n\n' +
+ 'Detailed Documentation\n'
+ '**********************'
+ + '\n\n' +
+ read('src', 'z3c', 'recipe', 'fakezope2eggs',
+ 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')),
+ license = "ZPL 2.1",
+ keywords = "zope2 buildout",
+ url='http://svn.zope.org/z3c.recipe.fakezope2eggs',
+ classifiers=[
+ "License :: OSI Approved :: Zope Public License",
+ "Framework :: Buildout",
+ "Framework :: Plone",
+ "Framework :: Zope2",
+ "Programming Language :: Python",
+ ],
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'': 'src'},
+ zip_safe = False,
+ namespace_packages = ['z3c', 'z3c.recipe'],
+ install_requires = ['zc.buildout', 'setuptools'],
+ entry_points = {'zc.buildout': ['default = %s:Recipe' % name]})
Property changes on: z3c.recipe.fakezope2eggs/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/__init__.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/src/z3c/__init__.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/src/z3c/__init__.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,6 @@
+# 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__)
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/__init__.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/__init__.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/__init__.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,6 @@
+# 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__)
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/README.txt
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/README.txt (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/README.txt 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,91 @@
+Here is the most basic example::
+
+ >>> write('buildout.cfg',
+ ... """
+ ... [buildout]
+ ... parts =
+ ... zope2
+ ... fakezope2eggs
+ ...
+ ... find-links =
+ ... http://dist.plone.org/
+ ...
+ ... [zope2]
+ ... recipe = plone.recipe.zope2install
+ ... url = http://www.zope.org/Products/Zope/2.9.7/Zope-2.9.7-final.tgz
+ ...
+ ... [fakezope2eggs]
+ ... recipe = z3c.recipe.fakezope2eggs
+ ... """)
+
+Now if we run the buildout::
+
+ >>> print system(buildout)
+ Installing zope2.
+ running build_ext
+ creating zope.proxy
+ copying zope/proxy/proxy.h -> zope.proxy
+ building 'AccessControl.cAccessControl' extension
+ creating build
+ creating build/temp.linux-i686-2.4
+ creating build/temp.linux-i686-2.4/AccessControl
+ ...
+
+Now if we list all the developped egg we have:
+
+ >>> ls(sample_buildout, 'develop-eggs')
+ - plone.recipe.zope2install.egg-link
+ - z3c.recipe.fakezope2eggs.egg-link
+ - zope.app.adapter.egg-info
+ - zope.app.annotation.egg-info
+ - zope.app.apidoc.egg-info
+ - zope.app.applicationcontrol.egg-info
+ - zope.app.appsetup.egg-info
+ - zope.app.authentication.egg-info
+ - zope.app.basicskin.egg-info
+ - zope.app.broken.egg-info
+ - zope.app.cache.egg-info
+ ...
+
+Let's have a look at the content of one of them::
+
+ >>> cat(sample_buildout, 'develop-eggs', 'zope.app.adapter.egg-info')
+ Metadata-Version: 1.0
+ Name: zope.app.adapter
+ Version: 0.0
+
+You might also want to add other fake eggs to your buildout, to do so use the
+additional-fake-eggs option, for example::
+
+ >>> write('buildout.cfg',
+ ... """
+ ... [buildout]
+ ... parts =
+ ... zope2
+ ... fakezope2eggs
+ ...
+ ... find-links =
+ ... http://dist.plone.org/
+ ...
+ ... [zope2]
+ ... recipe = plone.recipe.zope2install
+ ... url = http://www.zope.org/Products/Zope/2.9.7/Zope-2.9.7-final.tgz
+ ...
+ ... [fakezope2eggs]
+ ... recipe = z3c.recipe.fakezope2eggs
+ ... additional-fake-eggs = ZODB3
+ ... """)
+
+ >>> print system(buildout)
+ Uninstalling fakezope2eggs.
+ Updating zope2.
+ Installing fakezope2eggs.
+ <BLANKLINE>
+
+Let's check if the additionnal fake egg exists:
+
+ >>> cat(sample_buildout, 'develop-eggs', 'ZODB3.egg-info')
+ Metadata-Version: 1.0
+ Name: ZODB3
+ Version: 0.0
+
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/__init__.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/__init__.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/__init__.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,58 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# 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
+
+EGG_INFO_CONTENT = """Metadata-Version: 1.0
+Name: %s
+Version: 0.0
+"""
+
+
+class Recipe:
+
+ def __init__(self, buildout, name, options):
+ self.buildout, self.name, self.options = buildout, name, options
+ options.setdefault('zope2-part', 'zope2')
+ options.setdefault('zope2-location', '')
+ options.setdefault('additional-fake-eggs', '')
+ options.setdefault('skip-fake-eggs', '')
+
+ def install(self):
+ zope2Location = self.options['zope2-location'].strip()
+ if zope2Location == '':
+ zope2Part = self.options['zope2-part'].strip()
+ zope2Location = self.buildout[zope2Part]['location']
+
+ developEggDir = self.buildout['buildout']['develop-eggs-directory']
+ zopeLibZopeLocation = os.path.join(zope2Location, 'lib', 'python',
+ 'zope')
+ zopeLibZopeAppLocation = os.path.join(zope2Location, 'lib', 'python',
+ 'zope', 'app')
+ zopeLibs = ["zope.%s" % lib for lib in os.listdir(zopeLibZopeLocation)\
+ if os.path.isdir(os.path.join(zopeLibZopeLocation, lib))]
+ zopeLibs += ["zope.app.%s" % lib for lib in os.listdir(zopeLibZopeAppLocation)\
+ if os.path.isdir(os.path.join(zopeLibZopeAppLocation, lib))]
+ zopeLibs += [lib for lib in self.options['additional-fake-eggs'].split('\n')]
+ zopeLibs = [lib for lib in zopeLibs if lib not in
+ self.options.get('skip-fake-eggs', '').split('\n')]
+ for zopeLib in zopeLibs:
+ fakeLibEggInfoFile = os.path.join(developEggDir,
+ '%s.egg-info' % zopeLib)
+ fd = open(fakeLibEggInfoFile, 'w')
+ fd.write(EGG_INFO_CONTENT % zopeLib)
+ fd.close()
+ return ()
+
+ def update(self):
+ return self.install()
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/__init__.py
===================================================================
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/test_docs.py
===================================================================
--- z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/test_docs.py (rev 0)
+++ z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/test_docs.py 2008-07-21 10:32:10 UTC (rev 88647)
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+"""
+Doctest runner for 'collective.buildbot'.
+"""
+__docformat__ = 'restructuredtext'
+
+from os.path import join
+import unittest
+import zc.buildout.testing
+
+from zope.testing import doctest, renormalizing
+
+optionflags = (doctest.ELLIPSIS |
+ doctest.NORMALIZE_WHITESPACE |
+ doctest.REPORT_ONLY_FIRST_FAILURE)
+
+
+def setUp(test):
+ zc.buildout.testing.buildoutSetUp(test)
+ zc.buildout.testing.install_develop('z3c.recipe.fakezope2eggs', test)
+ zc.buildout.testing.install_develop('plone.recipe.zope2install', test)
+
+
+def test_suite():
+
+ # doc file suite
+ test_files = ['README.txt']
+ suite = unittest.TestSuite([
+ doctest.DocFileSuite(
+ join('..', filename),
+ setUp=setUp,
+ tearDown=zc.buildout.testing.buildoutTearDown,
+ optionflags=optionflags,
+ checker=renormalizing.RENormalizing([
+ # If want to clean up the doctest output you
+ # can register additional regexp normalizers
+ # here. The format is a two-tuple with the RE
+ # as the first item and the replacement as the
+ # second item, e.g.
+ # (re.compile('my-[rR]eg[eE]ps'), 'my-regexps')
+ zc.buildout.testing.normalize_path,
+ ]),
+ )
+ for filename in test_files])
+
+ return suite
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
Property changes on: z3c.recipe.fakezope2eggs/trunk/src/z3c/recipe/fakezope2eggs/tests/test_docs.py
___________________________________________________________________
Name: svn:keywords
+ Id
More information about the Checkins
mailing list