changeset 6274fc798adb in tryton:5.6
details: https://hg.tryton.org/tryton?cmd=changeset&node=6274fc798adb
description:
        Bundle GooCanvas 2.0 or 3.0

        issue10378
        review348291002
        (grafted from f81f804ef4f13cbc2c59b45fdec3e94d8da633e6)
diffstat:

 setup-freeze.py |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 67a2342442c9 -r 6274fc798adb setup-freeze.py
--- a/setup-freeze.py   Sun May 02 11:04:35 2021 +0200
+++ b/setup-freeze.py   Wed May 05 23:09:25 2021 +0200
@@ -2,6 +2,7 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
+import glob
 import os
 import re
 import ssl
@@ -47,7 +48,7 @@
     'Gdk-3.0',
     'GdkPixbuf-2.0',
     'Gio-2.0',
-    'GooCanvas-2.0',
+    'GooCanvas-[2-3].0',
     'Gtk-3.0',
     'HarfBuzz-0.0',
     'Pango-1.0',
@@ -73,7 +74,10 @@
 temp = tempfile.mkdtemp()
 for ns in required_gi_namespaces:
     gir_name = '%s.gir' % ns
-    gir_file = os.path.join(sys.prefix, 'share', 'gir-1.0', gir_name)
+    gir_file = glob.glob(
+        os.path.join(sys.prefix, 'share', 'gir-1.0', gir_name))[0]
+    gir_name = os.path.basename(gir_file)
+    ns = os.path.splitext(gir_name)[0]
     gir_tmp = os.path.join(temp, gir_name)
     with open(gir_file, 'r', encoding='utf-8') as src:
         with open(gir_tmp, 'w', encoding='utf-8') as dst:

Reply via email to