Skip to content

Commit 2e03eb4

Browse files
committed
deploy-ng: handle .pz and .gz models correctly
1 parent 57ff1a5 commit 2e03eb4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

direct/src/dist/commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def _parse_dict(input):
6666

6767

6868
def egg2bam(_build_cmd, srcpath, dstpath):
69+
if dstpath.endswith('.gz') or dstpath.endswith('.pz'):
70+
dstpath = dstpath[:-3]
6971
dstpath = dstpath + '.bam'
7072
try:
7173
subprocess.check_call([
@@ -895,6 +897,9 @@ def copy_file(src, dst):
895897
os.makedirs(dst_dir)
896898

897899
ext = os.path.splitext(src)[1]
900+
# If the file ends with .gz/.pz, we strip this off.
901+
if ext in ('.gz', '.pz'):
902+
ext = os.path.splitext(src[:-3])[1]
898903
if not ext:
899904
ext = os.path.basename(src)
900905

0 commit comments

Comments
 (0)