From 7b0de35cb0c207c4dc7a14a0015a89369101753b Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Mon, 30 Oct 2023 11:35:10 -0700 Subject: [PATCH] graphics/py-mayavi: Fix build on some systems ... by preventing tvtk_classes.zip rebuild. Such rebuild causes failure, and it is also conditional on file time comparison. Accepting the pre-existing tvtk_classes.zip prevents such rebuild, which hopefully would prevent build failured. Reported by: fallout --- graphics/py-mayavi/files/patch-setup.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/graphics/py-mayavi/files/patch-setup.py b/graphics/py-mayavi/files/patch-setup.py index 310be4df1bed9..e005fa7e1a0d4 100644 --- a/graphics/py-mayavi/files/patch-setup.py +++ b/graphics/py-mayavi/files/patch-setup.py @@ -1,6 +1,21 @@ ---- setup.py.orig 2016-08-01 19:02:36 UTC +- The first patch is to fix build by accepting tvtk_classes.zip, +- otherwise the build SEGVs on some platforms. +- Rebuilding tvtk_classes.zip seems to cause SEGVs. + +- Misc other patches. + +--- setup.py.orig 2022-10-17 14:42:18 UTC +++ setup.py -@@ -403,12 +403,12 @@ def configuration(parent_package=None, t +@@ -260,7 +260,7 @@ def _tvtk_built_recently(zipfile, delay): + def build_tvtk_classes_zip(): + MY_DIR = os.path.dirname(__file__) + zipfile = os.path.join(MY_DIR, 'tvtk', 'tvtk_classes.zip') +- if _tvtk_built_recently(zipfile, delay=120): ++ if True or _tvtk_built_recently(zipfile, delay=120): + print("Already built tvtk_classes.zip") + return + else: +@@ -378,12 +378,12 @@ def configuration(parent_package=None, top_path=None): config.add_data_dir('mayavi/core/lut') config.add_data_dir('mayavi/tests/data') config.add_data_dir('mayavi/tests/csv_files') @@ -11,7 +26,7 @@ for pkgdir in ('mayavi', 'tvtk'): for root, dirs, files in os.walk(pkgdir): - if split(root)[-1] == 'images': -+ if (split(root)[-1] == 'images') and files: ++ if split(root)[-1] == 'images' and files: config.add_data_dir(root) # *.ini files.