[Zope-CVS] CVS: Packages/zpkgtools/bin - zpkg:1.13
Fred L. Drake, Jr.
fred at zope.com
Thu Mar 18 13:34:45 EST 2004
Update of /cvs-repository/Packages/zpkgtools/bin
In directory cvs.zope.org:/tmp/cvs-serv8633
Modified Files:
zpkg
Log Message:
include the zpkgtools package in generated packages (unless suppressed
from the command line) so the target host doesn't need to have
zpkgtools available when running setup
=== Packages/zpkgtools/bin/zpkg 1.12 => 1.13 ===
--- Packages/zpkgtools/bin/zpkg:1.12 Wed Mar 17 14:09:21 2004
+++ Packages/zpkgtools/bin/zpkg Thu Mar 18 13:34:44 2004
@@ -139,6 +139,18 @@
print >>f, "context.setup()"
f.close()
+ def includeSupportCode(self):
+ zpkgtools_dest = os.path.join(self.destination, "zpkgtools")
+ # Since we might actually be including zpkgtools as an
+ # installable package, we only do this if we need to:
+ if not os.path.exists(zpkgtools_dest):
+ self.ip.copyTree(zpkgtools.__path__[0], zpkgtools_dest)
+ tests_dir = os.path.join(zpkgtools_dest, "tests")
+ # but we don't need the tests if this was only added to
+ # support the setup.py script:
+ if os.path.isdir(tests_dir):
+ shutil.rmtree(tests_dir)
+
def createTarball(self):
pwd = os.getcwd()
os.chdir(self.tmpdir)
@@ -163,6 +175,8 @@
try:
self.loadResource()
self.buildDistribution()
+ if self.options.include_support_code:
+ self.includeSupportCode()
self.createTarball()
self.cleanup()
except:
@@ -206,6 +220,10 @@
"-r", "--revision-tag", dest="revision_tag",
help="default CVS tag to use (default: HEAD)", metavar="TAG",
default="HEAD")
+ parser.add_option(
+ "-S", dest="include_support_code", action="store_false",
+ help="don't include copies of the zpkgtools support code",
+ default=True)
parser.add_option(
"-v", dest="version",
help="version label for the new distribution",
More information about the Zope-CVS
mailing list