From 2e03eb405b00a61543a36e2b82a0200be9ae742c Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 3 Sep 2019 22:29:54 +0200 Subject: [PATCH] deploy-ng: handle .pz and .gz models correctly --- direct/src/dist/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 8a865f98dc..f8160ed546 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -66,6 +66,8 @@ def _parse_dict(input): def egg2bam(_build_cmd, srcpath, dstpath): + if dstpath.endswith('.gz') or dstpath.endswith('.pz'): + dstpath = dstpath[:-3] dstpath = dstpath + '.bam' try: subprocess.check_call([ @@ -895,6 +897,9 @@ class build_apps(setuptools.Command): os.makedirs(dst_dir) ext = os.path.splitext(src)[1] + # If the file ends with .gz/.pz, we strip this off. + if ext in ('.gz', '.pz'): + ext = os.path.splitext(src[:-3])[1] if not ext: ext = os.path.basename(src)