Fix build/package for modification to cdist.
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index 3259ed6026c56544a92b727384cfd9082bb05522..332d3b6d0bb26afb33f1ae4542a2d09478c202df 100644 (file)
--- a/cscript
+++ b/cscript
@@ -39,7 +39,7 @@ for v in ['11']:
     deb_build_depends[v] = copy.deepcopy(deb_build_depends_base)
     deb_build_depends[v].extend(['libssh-gcrypt-dev', 'python3.9'])
 deb_build_depends['unstable'] = copy.deepcopy(deb_build_depends_base)
-deb_build_depends['unstable'].extend(['python'])
+deb_build_depends['unstable'].extend(['python3'])
 
 deb_depends = dict()
 deb_depends_gui = dict()
@@ -569,8 +569,7 @@ def build(target, options):
         with open('build/com.dcpomatic.DCP-o-matic.json', 'w') as outfile:
             json.dump(desc, outfile)
         target.command('%s --repo=build/platform/repo build/platform/flatpak build/com.dcpomatic.DCP-o-matic.json' % target.flatpak_builder())
-    elif target.platform != "linux" or target.detail == 'appimage':
-        # Build here if the packaging step won't do it
+    else:
         target.command('./waf configure --prefix=%s %s' % (target.directory, configure_options(target, options)))
         target.command('./waf')
         target.command('./waf install')
@@ -712,6 +711,10 @@ def make_appimage(target, nice_name, internal_name, version):
 
 def package(target, version, options):
     """version: DCP-o-matic version string"""
+    if target.platform != 'linux' or target.detail == 'appimage':
+        # In most cases we need to build ourselves before packaging, but on some Linux targets the packaging
+        # tool wants to build DCP-o-matic so we don't bother here.
+        build(target, options)
     if target.platform == 'windows':
         return package_windows(target)
     elif target.platform == 'linux':