[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - setup.py:1.10
Fred L. Drake, Jr.
fred at zope.com
Mon Mar 22 11:05:40 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv13154
Modified Files:
setup.py
Log Message:
when files in packages are marked as scripts, they should *only* be
included as scripts, not installed into the package as package data
=== Packages/zpkgtools/zpkgtools/setup.py 1.9 => 1.10 ===
--- Packages/zpkgtools/zpkgtools/setup.py:1.9 Fri Mar 19 17:20:25 2004
+++ Packages/zpkgtools/zpkgtools/setup.py Mon Mar 22 11:05:39 2004
@@ -97,6 +97,21 @@
else:
self.add_package_file(name, fn)
+ # We need to check that any files that were labelled as
+ # scripts aren't copied in as package data; they don't expect
+ # to be installed into the package itself.
+ #
+ # XXX I'm not sure whether documentation files should be
+ # removed from package_data or not, given that there's no spec
+ # for installing documentation other than for RPMs.
+ #
+ relbase = posixpath.join(reldir, "")
+ pkgfiles = self.package_data.get(reldir, [])
+ for script in pkginfo.script:
+ pkgdatapath = script[len(relbase):]
+ if pkgdatapath in pkgfiles:
+ pkgfiles.remove(pkgdatapath)
+
def scan_directory(self, pkgname, directory, reldir):
"""Scan a data directory, adding files to package_data."""
for fn in os.listdir(directory):
More information about the Zope-CVS
mailing list