diff --git a/0001-FEM-femmesh-fix-AttributeError-module-numpy-has-no-a.patch b/0001-FEM-femmesh-fix-AttributeError-module-numpy-has-no-a.patch new file mode 100644 index 0000000..4954fda --- /dev/null +++ b/0001-FEM-femmesh-fix-AttributeError-module-numpy-has-no-a.patch @@ -0,0 +1,29 @@ +From 876aab4b0e7b73dd16f96c92706a6a464ddd23df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 26 Jan 2023 00:55:12 +0100 +Subject: [PATCH] FEM: femmesh: fix AttributeError: module 'numpy' has no + attribute 'int' + +--- + src/Mod/Fem/femmesh/meshtools.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/Mod/Fem/femmesh/meshtools.py b/src/Mod/Fem/femmesh/meshtools.py +index dd8671b0ea..7693249bb9 100644 +--- a/src/Mod/Fem/femmesh/meshtools.py ++++ b/src/Mod/Fem/femmesh/meshtools.py +@@ -485,7 +485,10 @@ def get_femelement_sets( + # fem_objects = FreeCAD FEM document objects + # get femelements for reference shapes of each obj.References + count_femelements = 0 +- referenced_femelements = np.zeros((max(femelement_table.keys())+1,),dtype=np.int) ++ referenced_femelements = np.zeros( ++ (max(femelement_table.keys()) + 1,), ++ dtype=int ++ ) + has_remaining_femelements = None + for fem_object_i, fem_object in enumerate(fem_objects): + obj = fem_object["Object"] +-- +2.38.1 + diff --git a/FreeCAD-test.spec b/FreeCAD-test.spec index 2d35964..2fb042e 100644 --- a/FreeCAD-test.spec +++ b/FreeCAD-test.spec @@ -1,7 +1,7 @@ # # spec file for package FreeCAD-test # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/FreeCAD.changes b/FreeCAD.changes index 679e03e..8811cbc 100644 --- a/FreeCAD.changes +++ b/FreeCAD.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 26 00:01:42 UTC 2023 - Stefan Brüns + +- Fix build after numpy 1.24 API changes, add + 0001-FEM-femmesh-fix-AttributeError-module-numpy-has-no-a.patch + ------------------------------------------------------------------- Fri Dec 30 00:55:38 UTC 2022 - Stefan Brüns diff --git a/FreeCAD.spec b/FreeCAD.spec index 7314a8e..0931ce8 100644 --- a/FreeCAD.spec +++ b/FreeCAD.spec @@ -1,7 +1,7 @@ # # spec file for package FreeCAD # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -48,6 +48,8 @@ Patch4: 0001-Drawing-add-missing-include.patch Patch5: 0001-FEM-add-missing-include.patch # PATCH-FIX-UPSTREAM Patch6: 0001-Revert-unused-parameter-warning-change.patch +# PATCH-FIX-UPSTREAM +Patch7: 0001-FEM-femmesh-fix-AttributeError-module-numpy-has-no-a.patch # Test suite fails on 32bit and I don't want to debug that anymore ExcludeArch: %ix86 %arm ppc s390 s390x