Skip to content

Commit

Permalink
graphics/py-mayavi: Fix build on some systems
Browse files Browse the repository at this point in the history
... 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
  • Loading branch information
yurivict committed Oct 30, 2023
1 parent cbbf088 commit 7b0de35
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions 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')
Expand All @@ -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.

0 comments on commit 7b0de35

Please sign in to comment.