deploy-ng: handle .pz and .gz models correctly

This commit is contained in:
rdb 2019-09-03 22:29:54 +02:00
parent 57ff1a5441
commit 2e03eb405b

View File

@ -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)