[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - setup.py:1.21
Fred L. Drake, Jr.
fred at zope.com
Fri Jun 4 00:21:20 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv10054/zpkgtools
Modified Files:
setup.py
Log Message:
Fix bug in build/install support code:
If a Python package contains a non-package directory containing Python
source files (*.py), the Python sources in that directory were dropped
from the build/installation. Other files were added handled
appropriately.
=== Packages/zpkgtools/zpkgtools/setup.py 1.20 => 1.21 ===
--- Packages/zpkgtools/zpkgtools/setup.py:1.20 Wed May 12 00:11:40 2004
+++ Packages/zpkgtools/zpkgtools/setup.py Fri Jun 4 00:20:49 2004
@@ -144,7 +144,9 @@
else:
# an ordinary directory
self.scan_directory(name, path, fn)
- else:
+ # Only add the file as package data if it's not a Python
+ # source file; Python files are copied in automatically.
+ elif not fn.endswith(".py"):
self.add_package_file(name, fn)
# We need to check that any files that were labelled as
@@ -175,9 +177,6 @@
os.path.join(directory, fn),
posixpath.join(reldir, fn))
else:
- fnbase, ext = os.path.splitext(fn)
- if ext in (".pyc", ".pyo", ".so", ".sl", ".pyd"):
- continue
self.add_package_file(pkgname, posixpath.join(reldir, fn))
def scan_basic(self, pkginfo):
@@ -199,8 +198,5 @@
self.package_dir[pkgname] = reldir
def add_package_file(self, pkgname, relfn):
- # Only add the file as package data if it's not a Python
- # source file; Python files are copied in automatically.
- if not relfn.endswith(".py"):
- L = self.package_data.setdefault(pkgname, [])
- L.append(relfn)
+ L = self.package_data.setdefault(pkgname, [])
+ L.append(relfn)
More information about the Zope-CVS
mailing list