Commit 1d433315 authored by Jeremy Hylton's avatar Jeremy Hylton

Fix copy_other_files() routine for new layout.

parent 21205e7f
...@@ -157,27 +157,34 @@ scripts = ["src/scripts/fsdump.py", ...@@ -157,27 +157,34 @@ scripts = ["src/scripts/fsdump.py",
] ]
def copy_other_files(cmd, outputbase): def copy_other_files(cmd, outputbase):
for inputdir in [ # A delicate dance to copy files with certain extensions
"src/ZConfig/components/basic", # into a package just like .py files.
"src/ZConfig/components/logger", extensions = ["*.conf", "*.xml", "*.txt", "*.sh"]
"src/ZConfig/tests/input", for dir in [
"src/ZConfig/tests/library", "ZConfig/components/basic",
"src/ZConfig/tests/library/thing", "ZConfig/components/logger",
"src/ZConfig/tests/library/thing/extras", "ZConfig/tests/input",
"src/ZConfig/tests/library/widget", "ZConfig/tests/library",
"src/ZEO", "ZConfig/tests/library/thing",
"src/ZODB", "ZConfig/tests/library/thing/extras",
"src/zdaemon", "ZConfig/tests/library/widget",
"src/zdaemon/tests", "ZEO",
"src/zLOG", "ZODB",
"zdaemon",
"zdaemon/tests",
"zLOG",
]: ]:
inputdir = convert_path(inputdir) dir = convert_path(dir)
outputdir = os.path.join(outputbase, inputdir) inputdir = os.path.join("src", dir)
outputdir = os.path.join(outputbase, dir)
if not os.path.exists(outputdir): if not os.path.exists(outputdir):
dir_util.mkpath(outputdir) dir_util.mkpath(outputdir)
for pattern in ("*.conf", "*.xml", "*.txt", "*.sh"): for pattern in extensions:
for fn in glob.glob(os.path.join(inputdir, pattern)): for fn in glob.glob(os.path.join(inputdir, pattern)):
cmd.copy_file(fn, os.path.join(outputbase, fn)) # glob is going to give us a path include "src",
# which must be stripped to get the destination dir
dest = os.path.join(outputbase, fn[4:])
cmd.copy_file(fn, dest)
class MyLibInstaller(install_lib): class MyLibInstaller(install_lib):
"""Custom library installer, used to put hosttab in the right place.""" """Custom library installer, used to put hosttab in the right place."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment