[Zope-CVS] SVN: zpkgtools/trunk/zpkg Allow the zpkgsetup package to be installable from the Support/

Fred L. Drake, Jr. fred at zope.com
Fri Jun 18 17:06:14 EDT 2004


Log message for revision 25914:
Allow the zpkgsetup package to be installable from the Support/
directory of a distribution.  This can make it easier to work with the
components of a distribution in an a-la-mode fashion.



-=-
Added: zpkgtools/trunk/zpkgsetup/PUBLICATION.cfg
===================================================================
--- zpkgtools/trunk/zpkgsetup/PUBLICATION.cfg	2004-06-18 20:55:28 UTC (rev 25913)
+++ zpkgtools/trunk/zpkgsetup/PUBLICATION.cfg	2004-06-18 21:04:55 UTC (rev 25914)
@@ -0,0 +1,6 @@
+Metadata-Version: 1.0
+Name: zpkgsetup
+Author: Zope Corporation and Contributors
+Author-email: zope3-dev at zope.org
+Platform: any
+License: ZPL 2.1

Modified: zpkgtools/trunk/zpkgtools/app.py
===================================================================
--- zpkgtools/trunk/zpkgtools/app.py	2004-06-18 20:55:28 UTC (rev 25913)
+++ zpkgtools/trunk/zpkgtools/app.py	2004-06-18 21:04:55 UTC (rev 25914)
@@ -26,6 +26,7 @@
 from zpkgsetup import loggingapi as logging
 from zpkgsetup import package
 from zpkgsetup import publication
+from zpkgsetup import setup
 
 from zpkgtools import config
 from zpkgtools import dependencies
@@ -209,11 +210,17 @@
             self.loader = loader.Loader()
         os.mkdir(os.path.join(self.destination, "Support"))
         self.include_support_package(
-            "zpkgsetup", ("svn://svn.zope.org/repos/main/zpkgtools/tags/*/"
+            "zpkgsetup", ("svn://svn.zope.org/repos/main/zpkgtools/trunk/"
                           "zpkgsetup"))
         if self.options.revision_tag:
             self.loader.cleanup()
         self.loader = old_loader
+        source = os.path.join(zpkgtools.__path__[0], "support")
+        dest = os.path.join(self.destination, "Support")
+        files = os.listdir(source)
+        for fn in setup.filter_names(files):
+            self.ip.copy_file(os.path.join(source, fn),
+                              os.path.join(dest, fn))
 
     def include_support_package(self, name, fallback):
         """Add the support package `name` to the output directory.

Added: zpkgtools/trunk/zpkgtools/support/README.txt
===================================================================
--- zpkgtools/trunk/zpkgtools/support/README.txt	2004-06-18 20:55:28 UTC (rev 25913)
+++ zpkgtools/trunk/zpkgtools/support/README.txt	2004-06-18 21:04:55 UTC (rev 25914)
@@ -0,0 +1,16 @@
+========================
+Build-time support files
+========================
+
+The files contained in this directory are used to support the setup.py
+scripts provided in this distribution.  If you just want to install
+the software, you don't need to worry about this directory.
+
+The files in this directory are not normally installed.
+
+If you want to pick from components distributed as part of this
+distribution, you can install them separately using the setup.py
+scripts in the directories under the top-level Dependencies/ directory
+(if any).  If you want to separate those components without keeping
+this support directory, you can use the setup.py script here to
+install the support code on the systems where installation is needed.


Property changes on: zpkgtools/trunk/zpkgtools/support/README.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: zpkgtools/trunk/zpkgtools/support/setup.py
===================================================================
--- zpkgtools/trunk/zpkgtools/support/setup.py	2004-06-18 20:55:28 UTC (rev 25913)
+++ zpkgtools/trunk/zpkgtools/support/setup.py	2004-06-18 21:04:55 UTC (rev 25914)
@@ -0,0 +1,22 @@
+#! /usr/bin/env python
+
+import os.path
+import zpkgsetup.publication
+import zpkgsetup.setup
+
+try:
+    __file__
+except NameError:
+    # Python 2.2.x does not have __file__ for scripts.
+    __file__ = sys.argv[0]
+
+here = os.path.dirname(__file__)
+
+
+context = zpkgsetup.setup.SetupContext('zpkgsetup', None, __file__)
+
+pkgdir = os.path.join(here, 'zpkgsetup')
+context.load_metadata(os.path.join(pkgdir,
+                                   zpkgsetup.publication.PUBLICATION_CONF))
+context.scan('zpkgsetup', pkgdir, 'zpkgsetup')
+context.setup()


Property changes on: zpkgtools/trunk/zpkgtools/support/setup.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native




More information about the Zope-CVS mailing list