The package rpms/python-trimesh.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-trimesh.git/commit/?id=7c7....
Change:
+%ifarch %{arm32}
Thanks.
Full change:
============
commit 7c724c18ead65ecc98f524112b6d2f44ddbfc1d7
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Tue Sep 21 15:37:05 2021 -0400
Update to 3.9.34 with packaging improvements
- Use pyproject-rpm-macros
- Update metapackages for PythonExtras Change
https://fedoraproject.org/wiki/Changes/PythonExtras#Extras_metapackages)
- [easy] and [all] extras now require python3dist(xxhash)
- Handle arch-specific test failures methodically
- Update/correct License from “MIT” to “MIT and BSD and zlib”
diff --git a/python-trimesh.spec b/python-trimesh.spec
index d68c827..eb567aa 100644
--- a/python-trimesh.spec
+++ b/python-trimesh.spec
@@ -1,142 +1,360 @@
-%global pypi_name trimesh
-
-Name: python-%{pypi_name}
-Version: 3.9.20
-Release: 3%{?dist}
+Name: python-trimesh
+Version: 3.9.34
+Release: 1%{?dist}
Summary: Import, export, process, analyze and view triangular meshes
-License: MIT
+# The entire source is MIT, except:
+#
+# BSD:
+# - trimesh/transformations.py
+# zlib:
+# - trimesh/exchange/openctm.py
+License: MIT and BSD and zlib
URL:
https://trimsh.org
-Source0:
https://github.com/mikedh/trimesh/archive/%{version}/%{pypi_name}-%{versi...
+Source0:
https://github.com/mikedh/trimesh/archive/%{version}/trimesh-%{version}.t...
-BuildArch: noarch
+# The odd combination of an arched package with only noarch binary packages
+# makes it easier for us to detect with arch-dependent test failures, since the
+# tests will always be run on every platform, and easier for us to skip failing
+# tests if necessary, since we can be sure that %%ifarch macros work as
+# expected.
+#
+# Since the package still contains no compiled machine code, we still have no
+# debuginfo.
+%global debug_package %{nil}
+
+# Turn off automatic python byte-compilation. One .py file,
+# trimesh/resources/templates/blender_boolean.py, is actually a *template for a
+# Python source* rather than an *actual Python source*, and trying to
+# byte-compile it will break the build. We will byte-compile manually instead.
+%undefine __brp_python_bytecompile
BuildRequires: python3-devel
-BuildRequires: python3dist(pycollada)
-BuildRequires: python3dist(jsonschema)
-BuildRequires: python3dist(lxml)
-BuildRequires: python3dist(msgpack-python)
-BuildRequires: python3dist(networkx)
-BuildRequires: python3dist(numpy)
-BuildRequires: python3dist(pytest)
-BuildRequires: python3dist(requests)
-BuildRequires: python3dist(rtree)
-BuildRequires: python3dist(scipy)
-BuildRequires: python3dist(setuptools)
-BuildRequires: python3dist(shapely)
-BuildRequires: python3dist(svg.path)
-BuildRequires: python3dist(sympy)
+# Workaround:
https://bugzilla.redhat.com/show_bug.cgi?id=2006090
+# python-Rtree does not work on s390x without spatialindex-devel
+BuildRequires: spatialindex-devel
+
+# Meshlab Server Does Not Work With XVFB
#
https://github.com/cnr-isti-vclab/meshlab/issues/237
+# Upstream closed as WONTFIX
#BuildRequires: /usr/bin/xvfb-run
#BuildRequires: /usr/bin/meshlabserver
-%?python_enable_dependency_generator
-
-%description
+%global _description %{expand:
Trimesh is a pure Python library for loading and using triangular meshes with
-an emphasis on watertight meshes. The goal of the library is to provide
-a fully featured and well tested Trimesh object which allows for easy
-manipulation and analysis, in the style of the Polygon object in the Shapely
-library.
+an emphasis on watertight meshes. The goal of the library is to provide a fully
+featured and well tested Trimesh object which allows for easy manipulation and
+analysis, in the style of the Polygon object in the Shapely library.}
+
+%description %{_description}
-%package -n python3-%{pypi_name}
+%package -n python3-trimesh
Summary: %{summary}
+BuildArch: noarch
-Recommends: python3-%{pypi_name}-easy = %{version}-%{release}
-Suggests: python3-%{pypi_name}-all = %{version}-%{release}
+# Workaround:
https://bugzilla.redhat.com/show_bug.cgi?id=2006090
+# python-Rtree does not work on s390x without spatialindex-devel
+#
+# This adds an otherwise-unnecessary dependency on other architectures, but the
+# alternative would be to make this package arched and use %%ifarch to add the
+# dependency. We do not want to do that.
+Requires: (spatialindex-devel if python3dist(rtree))
+
+Recommends: python3-trimesh+easy = %{version}-%{release}
+Suggests: python3-trimesh+all = %{version}-%{release}
# for trimesh.boolean
Recommends: openscad
Recommends: blender
-%description -n python3-%{pypi_name}
-Trimesh is a pure Python library for loading and using triangular meshes with
-an emphasis on watertight meshes. The goal of the library is to provide
-a fully featured and well tested Trimesh object which allows for easy
-manipulation and analysis, in the style of the Polygon object in the Shapely
-library.
-
-
-%package -n python3-%{pypi_name}-easy
-Summary: Easy dependencies for %{pypi_name}
+# This probably should be in [easy] extra but isn’t in the metadata at all; see
+# README.rst and trimesh/ray/. However, it cannot be packaged until it supports
+# the current version (3.x) of embree
+# (
https://github.com/scopatz/pyembree/issues/28).
+#Recommends: python3dist(pyembree)
+
+%description -n python3-trimesh %{_description}
+
+
+%if 0%{?fedora} && 0%{?fedora} > 38
+%pyproject_extras_subpkg -n python3-trimesh easy all
+%else
+# We base these extras metapackages
+# (
https://fedoraproject.org/wiki/Changes/PythonExtras#Extras_metapackages)
+# on the expansion of:
+#
+# %%pyproject_extras_subpkg -n python3-trimesh easy all
+#
+# but add Provides/Obsoletes for the corresponding old subpackages to provide a
+# clean upgrade path.
+
+%package -n python3-trimesh+easy
+Summary: Metapackage for python3-trimesh: easy extras
+BuildArch: noarch
-Requires: python3-%{pypi_name} = %{version}-%{release}
+Requires: python3-trimesh = %{version}-%{release}
-Requires: python3dist(lxml)
-Requires: python3dist(pyglet)
-Requires: python3dist(shapely)
-Requires: python3dist(rtree)
-Requires: python3dist(svg.path)
-Requires: python3dist(sympy)
-Requires: python3dist(msgpack)
-Requires: python3dist(pillow)
-Requires: python3dist(requests)
-Requires: python3dist(colorlog)
+Provides: python3-trimesh-easy = %{version}-%{release}
+Obsoletes: python3-trimesh-easy < 3.9.20-4
-# not yet packaged, cannot recommend
-#Requires: python3dist(xxhash)
+%description -n python3-trimesh+easy
+This is a metapackage bringing in easy extras requires for python3-trimesh.
+It makes sure the dependencies are installed.
-%description -n python3-%{pypi_name}-easy
-Extra dependencies for trimesh[easy].
+%files -n python3-trimesh+easy -f %{_pyproject_ghost_distinfo}
+%package -n python3-trimesh+all
+Summary: Metapackage for python3-trimesh: all extras
+BuildArch: noarch
-%package -n python3-%{pypi_name}-all
-Summary: All dependencies for %{pypi_name}
-%{?python_provide:%python_provide python3-%{pypi_name}-all}
+Requires: python3-trimesh = %{version}-%{release}
-Requires: python3-%{pypi_name} = %{version}-%{release}
-Requires: python3-%{pypi_name}-easy = %{version}-%{release}
+Provides: python3-trimesh-all = %{version}-%{release}
+Obsoletes: python3-trimesh-all < 3.9.20-4
-Requires: python3dist(setuptools)
+%description -n python3-trimesh+all
+This is a metapackage bringing in all extras requires for python3-trimesh.
+It makes sure the dependencies are installed.
-# not yet packaged, cannot recommend
-#Requires: python3dist(python-fcl)
+%files -n python3-trimesh+all -f %{_pyproject_ghost_distinfo}
+%endif
-# triangle has nonfree dependencies
-#Never: python3dist(triangle)
-%description -n python3-%{pypi_name}-all
-Extra dependencies for trimesh[all].
+# We elect not to build a documentation package, for the following reasons:
+#
+# 1. A (relatively simple) patch is required to build them offline without
+# pip-installing requirements from PyPI.
+# 2. The documentation includes notebooks translated to HTML from .ipynb
+# using nbconvert.
+# a. Some conversions fail (wholly or on a per-cell basis, if continuing
+# on errors is requested) in architecture-dependent ways. This means
+# that the contents of the documentation package would depend on the
+# builder architecture, and it could not be noarch—an undesirable
+# situation.
+# b. An “HTML-ified” notebook contains a blob of JavaScript and other
+# web assets that is exceptionally difficult (at best, tedious) to
+# account for under current bundling guidelines.
+# 3. Sphinx-generated HTML documentation is not suitable for packaging in
+# general—see
https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for
+# discussion—and (because of the notebooks, if nothing else) the trimesh
+# documentation is not well-suited to building as a PDF instead of HTML.
%prep
-%autosetup -n %{pypi_name}-%{version} -p1
+%autosetup -n trimesh-%{version}
+
+# Patch out unavailable dependencies from “extras”:
+#
+# [all]
+# glooey: not yet packaged,
https://github.com/kxgames/glooey; needs autoprop
+# (
https://github.com/kalekundert/autoprop) and vecrec
+# (
https://github.com/kxgames/vecrec)
+sed -r -i "/^[[:blank:]]*'glooey',/d" setup.py
+# mapbox-earcut: not yet packaged,
+#
https://github.com/skogler/mapbox_earcut_python; needs
+#
https://github.com/mapbox/earcut.hpp, review request:
+#
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2006590
+sed -r -i "/^[[:blank:]]*'mapbox-earcut',/d" setup.py
+# meshio: not yet packaged,
https://github.com/nschloe/meshio
+sed -r -i "/^[[:blank:]]*'meshio',/d" setup.py
+# python-fcl: not yet packaged; upstream is not compatible with the current
+# release of fcl,
+#
https://github.com/BerkeleyAutomation/python-fcl/issues/19
+sed -r -i "/^[[:blank:]]*'python-fcl',/d" setup.py
+# triangle: has a nonfree dependency (Jonathan Richard Shewchuk’s “Triangle”
+# library,
http://www.cs.cmu.edu/~quake/triangle.html, which
+# forbids commercial usage) so cannot be packaged
+sed -r -i "/^[[:blank:]]*'triangle',/d" setup.py
+# xatlas: not yet packaged,
https://github.com/mworchel/xatlas-python;
+# depends on
https://github.com/jpcy/xatlas, also not yet packaged
+sed -r -i "/^[[:blank:]]*'xatlas',/d" setup.py
+
+# Patch out unavailable pyinstrument test dependency; we don’t really need to
+# do profiling anyway. Note that this does mean that API function
+# trimesh.viewer.windowed.SceneViewer(…) will not work with “profile=True”.
+#
+# Packaging pyinstrument would be difficult due to a vue.js-based HTML
+# renderer. Since guidelines forbid pre-built minified or compiled JS or CSS,
+# this would have to be patched out, or the web asset pipeline would have to be
+# somehow executed in the RPM build environment. (Or, of course, we can
+# continue to do without pyinstrument.)
+sed -r -i "/'pyinstrument',/d" setup.py
+sed -r -i 's/^([[:blank:]]*)(.*(pyinstrument|profiler)\b)/\1# \2/' \
+ tests/regression.py
+
+# Currently, python-ezdxf (
https://pypi.org/project/ezdxf/,
+#
https://github.com/mozman/ezdxf) is not packaged. The tests are designed to
+# fall back gracefully without it, but we must not generate the BuildRequires.
+sed -r -i "s/'ezdxf'(\\]\\))/\\1/" setup.py
+
+
+%generate_buildrequires
+%pyproject_buildrequires -x test,all
%build
-%py3_build
+%pyproject_wheel
%install
-%py3_install
+%pyproject_install
+# Manual byte-compile, to skip that one troublesome “.py” template file:
+find '%{buildroot}%{python3_sitelib}/trimesh' -type f \
+ -name '*.py' ! -name 'blender_boolean.py' |
+ while read -r pyfile
+ do
+ %py_byte_compile %{__python3} "${pyfile}"
+ done
+# Cannot handle skipping byte-compilation for blender_boolean.py:
+#pyproject_save_files trimesh
%check
-# test_export doesn't work in mock:
-#
https://github.com/cnr-isti-vclab/meshlab/issues/237
-# lots of tests fail if we get a 32 bit builder
-#
https://github.com/mikedh/trimesh/issues/690#issuecomment-577371622
-%ifnarch %{ix86} %{arm32} s390x
-%{pytest} -v
+while read -r t
+do
+ k="${k-}${k+ and }not ($(sed -r 's/::/ and /'
<<<"${t}"))"
+done < <(sed -r '/^[[:blank:]]*($|#)/d' <<'EOF'
+%ifnarch x86_64
+# CacheTest.test_hash fails, or may fail, because xxhash is not faster than CRC
+# and/or MD5.
+#
+# This is not as intended, and upstream might or might not care, but it’s only
+# a performance defect, so we just skip the test here.
+CacheTest::test_hash
%endif
-%files -n python3-%{pypi_name}
-%license LICENSE.md
-%doc README.md
-%{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
+%ifarch s390x
+# Several test failures remain on s390x. For now, we choose to skip these tests
+# rather than excluding the architecture, even though they certainly represent
+# real defects.
+#
+#
https://github.com/mikedh/trimesh/issues/1351
+#
https://github.com/mikedh/trimesh/files/7385479/test-failures.log
+GLTFTest::test_export_custom_attributes
+OBJTest::test_vertex_color
+PermutateTest::test_permutate
+PlyTest::test_face_attributes
+PlyTest::test_vertex_attributes
+%endif
+
+# 32-bit problems:
+#
https://github.com/mikedh/trimesh/issues/690
+#
https://github.com/mikedh/trimesh/files/7389423/test-failures.log
+
+# E TypeError: Cannot cast array data from dtype('int64') to
+# dtype('int32') according to the rule 'safe'
+%ifarch %{ix86} %{arm32}
+BinvoxTest::test_load_save_invariance
+BoundsTest::test_bounding_egg
+ContainsTest::test_inside
+EncodingTest::test_composite
+EncodingTest::test_dense
+EncodingTest::test_flat
+EncodingTest::test_flipped
+EncodingTest::test_reshape
+EncodingTest::test_transpose
+NearestTest::test_coplanar_signed_distance
+RayTests::test_contains
+RayTests::test_on_edge
+RayTests::test_on_vertex
+RleTest::test_brle_encode_decode
+RleTest::test_brle_length
+RleTest::test_brle_logical_not
+RleTest::test_brle_to_dense
+RleTest::test_brle_to_rle
+RleTest::test_rle_encode_decode
+VoxelGridTest::test_local
+%endif
+%ifarch %{ix86}
+PrimitiveTest::test_cyl_buffer
+%endif
-%files -n python3-%{pypi_name}-easy
-# empty
+# Either MemoryError or numpy.core._exceptions._ArrayMemoryError:
+%ifarch %{ix86} %{arm32}
+GLTFTest::test_basic
+GLTFTest::test_merge_buffers
+MutateTests::test_not_mutated_cube
+RayTests::test_contain_single
+SubDivideTest::test_subdivide
+SceneTests::test_scene
+%endif
+%ifarch %{arm32}
+ExportTest::test_svg
+IdentifierTest::test_scene_id
+IntegralMeanCurvatureTest::test_IMCcapsule
+LoaderTest::test_fileobj
+MedialTests::test_medial
+MeshTests::test_meshes
+MinimalTest::test_load
+MutateTests::test_not_mutated_bunny
+MutateTests::test_not_mutated_teapot
+MutateTests::test_not_mutated_torus
+NSphereTest::test_minball
+NearestTest::test_helper
+NearestTest::test_naive
+OBJTest::test_export_path
+OBJTest::test_scene
+OpTest::test_add
+PermutateTest::test_base
+PermutateTest::test_permutate
+PermutateTest::test_tesselation
+PrimitiveTest::test_primitives
+RasterTest::test_rasterize
+RayTests::test_box
+RayTests::test_multiple_hits
+RayTests::test_rays
+RayTests::test_rps
+RenderTest::test_args
+RepairTests::test_fix_normals
+SampleTest::test_sample
+SampleTest::test_weights
+SceneTests::test_doubling
+SceneTests::test_scaling
+SceneTests::test_tri
+SplitTest::test_split
+SubDivideTest::test_sub
+SubDivideTest::test_uv
+TextureTest::test_fuze
+TransformTest::test_tiny
+TrianglesTest::test_barycentric
+UnitsTest::test_conversion
+UnitsTest::test_path
+VectorTests::test_color
+VectorTests::test_discrete
+VectorTests::test_poly
+VectorTests::test_text
+VerticesTest::test_vertex_faces
+VoxelGridTest::test_voxel
+SceneTests::test_empty
+%endif
+EOF
+)
-%files -n python3-%{pypi_name}-all
-# empty
+%pytest -v -k "${k-}"
+
+
+%files -n python3-trimesh
+%license LICENSE.md
+%doc README.md
+# %%pyproject_save_files cannot handle skipping byte-compilation for
+# blender_boolean.py, so we list files manually:
+%{python3_sitelib}/trimesh
+%{python3_sitelib}/trimesh-%{version}.dist-info
%changelog
+* Wed Oct 20 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 3.9.34-1
+- Update to 3.9.34
+- Use pyproject-rpm-macros
+- Update metapackages for PythonExtras Change
+ (
https://fedoraproject.org/wiki/Changes/PythonExtras#Extras_metapackages)
+- [easy] and [all] extras now require python3dist(xxhash)
+- Handle arch-specific test failures methodically
+- Update/correct license from “MIT” to “MIT and BSD and zlib”
+
* Tue Jul 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.9.20-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/sources b/sources
index 2c45835..95cfe29 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (trimesh-3.9.20.tar.gz) =
6098c4ef60c1260289d5757951571a9d110aed0fb22c41b58ad081b623fa1904278657e7fc9f5ab416f1b4894ea7fa1a13f1b1f69367b465a7276e65f3b8c95a
+SHA512 (trimesh-3.9.34.tar.gz) =
fa887cfe69532249f916e326b1068d3c5cecbe0b905f3f0a1c4733b59ffdd881d6fa362b20cdd19febd8f4f1a01ee82bd210ca9b129d643fa275eee3fcc8a5a1