[Checkins] SVN: zc.rebootstrap/trunk/ add in implementation I
managed not to commit earlier;
Fred L. Drake, Jr.
fdrake at gmail.com
Fri Feb 23 17:11:04 EST 2007
Log message for revision 72793:
add in implementation I managed not to commit earlier;
desparately needs documentation
Changed:
_U zc.rebootstrap/trunk/
A zc.rebootstrap/trunk/setup.py
A zc.rebootstrap/trunk/src/zc/__init__.py
A zc.rebootstrap/trunk/src/zc/rebootstrap/__init__.py
A zc.rebootstrap/trunk/src/zc/rebootstrap/bootstrap.py
-=-
Property changes on: zc.rebootstrap/trunk
___________________________________________________________________
Name: svn:ignore
+ dist
MANIFEST
Added: zc.rebootstrap/trunk/setup.py
===================================================================
--- zc.rebootstrap/trunk/setup.py 2007-02-23 19:14:51 UTC (rev 72792)
+++ zc.rebootstrap/trunk/setup.py 2007-02-23 22:11:04 UTC (rev 72793)
@@ -0,0 +1,22 @@
+kw = dict(
+ name="zc.rebootstrap",
+ version="0.2",
+ author="Zope Corporation and Contributors",
+ author_email="zope3-dev at zope.org",
+ url="http://svn.zope.org/zc.rebootstrap",
+ description=(
+ "Helper package to re-bootstrap packages for RPM construction."),
+ packages=["zc.rebootstrap"],
+ package_dir={"": "src"},
+ )
+
+try:
+ from setuptools import setup
+ kw["namespace_packages"] = ["zc"]
+ kw["zip_safe"] = True
+except ImportError:
+ from distutils.core import setup
+ kw["packages"].insert(0, "zc")
+
+
+setup(**kw)
Property changes on: zc.rebootstrap/trunk/setup.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Added: zc.rebootstrap/trunk/src/zc/__init__.py
===================================================================
--- zc.rebootstrap/trunk/src/zc/__init__.py 2007-02-23 19:14:51 UTC (rev 72792)
+++ zc.rebootstrap/trunk/src/zc/__init__.py 2007-02-23 22:11:04 UTC (rev 72793)
@@ -0,0 +1,7 @@
+# This directory is a Python namespace package.
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Property changes on: zc.rebootstrap/trunk/src/zc/__init__.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Added: zc.rebootstrap/trunk/src/zc/rebootstrap/__init__.py
===================================================================
--- zc.rebootstrap/trunk/src/zc/rebootstrap/__init__.py 2007-02-23 19:14:51 UTC (rev 72792)
+++ zc.rebootstrap/trunk/src/zc/rebootstrap/__init__.py 2007-02-23 22:11:04 UTC (rev 72793)
@@ -0,0 +1 @@
+# This directory is a Python package.
Property changes on: zc.rebootstrap/trunk/src/zc/rebootstrap/__init__.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Added: zc.rebootstrap/trunk/src/zc/rebootstrap/bootstrap.py
===================================================================
--- zc.rebootstrap/trunk/src/zc/rebootstrap/bootstrap.py 2007-02-23 19:14:51 UTC (rev 72792)
+++ zc.rebootstrap/trunk/src/zc/rebootstrap/bootstrap.py 2007-02-23 22:11:04 UTC (rev 72793)
@@ -0,0 +1,35 @@
+
+import os, pkg_resources
+
+class Recipe:
+
+ def __init__(self, buildout, name, options):
+ self.name, self.options = name, options
+ options['dest'] = os.path.join(
+ buildout['buildout']['bin-directory'],
+ self.name)
+
+ def install(self):
+ loc = pkg_resources.working_set.find(
+ pkg_resources.Requirement.parse('setuptools')
+ ).location
+ fname = os.path.basename(loc)
+ dest = self.options['dest']
+ open(dest, 'w').write(
+ template % os.path.join('eggs', fname)
+ )
+ return dest
+
+ def update(self):
+ pass
+
+template = """
+import sys
+sys.path.insert(0, 'eggs')
+sys.path.insert(0, %r)
+import pkg_resources
+pkg_resources.require('zc.buildout')
+import zc.buildout.buildout
+
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+"""
Property changes on: zc.rebootstrap/trunk/src/zc/rebootstrap/bootstrap.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
More information about the Checkins
mailing list