The package rpms/python-python-fcl.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-python-fcl.git/commit/?id=...
https://src.fedoraproject.org/cgit/rpms/python-python-fcl.git/commit/?id=...
https://src.fedoraproject.org/cgit/rpms/python-python-fcl.git/commit/?id=....
Change:
+%ifarch s390x
+ExcludeArch: %{ix86}
+%ifarch %{valgrind_arches}
Thanks.
Full change:
============
commit c38a33cc5f290896371ff788ab39aae32e7f4d4d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Tue May 21 10:38:53 2024 -0400
Add arch-dependent skips for bundled fcl library tests
diff --git a/python-python-fcl.spec b/python-python-fcl.spec
index 15cdacb..834a3b8 100644
--- a/python-python-fcl.spec
+++ b/python-python-fcl.spec
@@ -229,16 +229,51 @@ sed -r -i '/\.cpp$/d' %{pyproject_files}
%check
%if %{without system_fcl}
+
pushd ../libccd-%{libccd_version}/
+skips='^($.'
%ifarch %{valgrind_arches}
-%ctest
-%else
-%ctest --exclude-regex '.*-valgrind.*'
+skips="${skips}|.*-valgrind.*"
%endif
+skips="${skips})$"
+%ctest --exclude-regex "${skips}"
popd
pushd ../fcl-%{fcl_version}/
-%ctest
+# Run the gtest-based executables manually rather than via the ctest harness so
+# that we can skip individual tests within individual executables.
+for exe in %{_vpath_builddir}/test/test_*
+do
+ # See:
https://bugzilla.redhat.com/show_bug.cgi?id=2236527#c2
+ unset filter
+ case "$(basename "${exe}")" in
+ test_fcl_capsule_capsule)
+%ifarch aarch64
+
filter="${filter--}${filter+:}CapsuleCapsuleSegmentTest/1.NominalSeparatedCase"
+%endif
+%ifarch aarch64 ppc64le
+
filter="${filter--}${filter+:}CapsuleCapsuleSegmentTest/0.OverlappingCenterLines"
+%endif
+ ;;
+ test_gjk_libccd-inl_gjk_doSimplex2)
+%ifarch aarch64 ppc64le
+ filter="${filter--}${filter+:}DoSimplex2Test.NeedMoreComputing"
+ filter="${filter--}${filter+:}DoSimplex2Test.OriginInSimplex"
+%endif
+ ;;
+ test_gjk_libccd-inl_epa)
+%ifarch aarch64 ppc64le s390x
+
filter="${filter--}${filter+:}FCL_GJK_EPA.ComputeVisiblePatchColinearNewVertex"
+%endif
+ ;;
+ test_fcl_math)
+%ifarch s390x
+ filter="${filter--}${filter+:}FCL_MATH.rss_conversion"
+%endif
+ ;;
+ esac
+ "${exe}" --gtest_filter="${filter}"
+done
popd
%endif
commit 82f1d8f26a87dadb1ee8d47c39a2aba6c51c0a47
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon May 20 13:10:11 2024 -0400
Do not support i686 (aborts in TestFCL::test_managed_collisions)
diff --git a/python-python-fcl.spec b/python-python-fcl.spec
index d847d00..15cdacb 100644
--- a/python-python-fcl.spec
+++ b/python-python-fcl.spec
@@ -46,6 +46,9 @@ Source1:
%{libccd_forgeurl}/archive/v%{libccd_version}/libccd-%{libccd_ve
%global fcl_forgeurl
https://github.com/ambi-robotics/fcl
Source2: %{fcl_forgeurl}/archive/v%{fcl_version}/fcl-%{fcl_version}.tar.gz
+#
https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
+ExcludeArch: %{ix86}
+
# Support Cython 3
#
https://github.com/BerkeleyAutomation/python-fcl/pull/77
Patch0: %{url}/pull/77.patch
commit ff9d6ca3963c7c249af555fe2bbf5800da0c097f
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Tue May 21 10:40:17 2024 -0400
Fix names for bundled library source archives
diff --git a/.gitignore b/.gitignore
index 69ea496..e300666 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
/fcl-0.7.0.6.tar.gz
/libccd-0.7.0.6.tar.gz
/python-fcl-0.7.0.6.tar.gz
+/libccd-2.1.tar.gz
+/fcl-0.7.0.tar.gz
diff --git a/python-python-fcl.spec b/python-python-fcl.spec
index 9e20c32..d847d00 100644
--- a/python-python-fcl.spec
+++ b/python-python-fcl.spec
@@ -42,9 +42,9 @@ URL:
https://github.com/BerkeleyAutomation/python-fcl
#
https://github.com/BerkeleyAutomation/python-fcl/issues/55
Source0: %{url}/archive/v%{version}/python-fcl-%{version}.tar.gz
%global libccd_forgeurl
https://github.com/danfis/libccd
-Source1: %{libccd_forgeurl}/archive/v%{libccd_version}/libccd-%{version}.tar.gz
+Source1:
%{libccd_forgeurl}/archive/v%{libccd_version}/libccd-%{libccd_version}.tar.gz
%global fcl_forgeurl
https://github.com/ambi-robotics/fcl
-Source2: %{fcl_forgeurl}/archive/v%{fcl_version}/fcl-%{version}.tar.gz
+Source2: %{fcl_forgeurl}/archive/v%{fcl_version}/fcl-%{fcl_version}.tar.gz
# Support Cython 3
#
https://github.com/BerkeleyAutomation/python-fcl/pull/77
diff --git a/sources b/sources
index bc771e2..68d8c3d 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (fcl-0.7.0.6.tar.gz) =
6e5390b8c49a19d347121945283141577208781967ec169aabf64b95efc41633fb9fde996bcbaf6daf0414e58e5760ea39e2aa9929891892db47756830156bdc
-SHA512 (libccd-0.7.0.6.tar.gz) =
ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d
+SHA512 (libccd-2.1.tar.gz) =
ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d
+SHA512 (fcl-0.7.0.tar.gz) =
6e5390b8c49a19d347121945283141577208781967ec169aabf64b95efc41633fb9fde996bcbaf6daf0414e58e5760ea39e2aa9929891892db47756830156bdc
SHA512 (python-fcl-0.7.0.6.tar.gz) =
bc9a7c91a0371f53cd4e18787ff333a54ca04314a97a64ba5d41c48109b410553c1fc542a185d3f455ac4a988a82b8a1644feb234e5ebb1f789847e0aff77620
commit c6ca5f9712bd96587f6587387684d80476e83495
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon May 20 08:31:43 2024 -0400
Initial package (close RHBZ#2270968)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..69ea496
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/fcl-0.7.0.6.tar.gz
+/libccd-0.7.0.6.tar.gz
+/python-fcl-0.7.0.6.tar.gz
diff --git a/0001-Add-environment-variables-to-control-bundling.patch
b/0001-Add-environment-variables-to-control-bundling.patch
new file mode 100644
index 0000000..8ace952
--- /dev/null
+++ b/0001-Add-environment-variables-to-control-bundling.patch
@@ -0,0 +1,31 @@
+From 8e5659ec78cbe4232fc1650771ff5b82a293b1ed Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code(a)musicinmybrain.net>
+Date: Wed, 20 Mar 2024 14:27:33 -0400
+Subject: [PATCH] Add environment variables to control bundling
+
+---
+ setup.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 15e69dd..c6428e4 100644
+--- a/setup.py
++++ b/setup.py
+@@ -67,11 +67,12 @@ setup(
+ Extension(
+ "fcl.fcl",
+ ["src/fcl/fcl.pyx"],
+- include_dirs=get_include_dirs(),
++ include_dirs=get_include_dirs() +
os.environ.get("PYTHON_FCL_EXTRA_INCLUDE_DIRS", "").split(),
+ library_dirs=get_libraries_dir(),
+- libraries=get_libraries(),
++ libraries=[lib for lib in get_libraries() if lib not in
os.environ.get("PYTHON_FCL_OMIT_LIBRARIES", "").split()],
+ language="c++",
+ extra_compile_args=["-std=c++11"],
++ extra_objects=os.environ.get("PYTHON_FCL_EXTRA_OBJECTS",
"").split(),
+ )
+ ],
+ )
+--
+2.44.0
+
diff --git a/77.patch b/77.patch
new file mode 100644
index 0000000..b1da7d9
--- /dev/null
+++ b/77.patch
@@ -0,0 +1,39 @@
+From 00bad0a0af7b01c8b6b28ca68542d9a21c2ed06a Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code(a)musicinmybrain.net>
+Date: Wed, 20 Mar 2024 10:06:35 -0400
+Subject: [PATCH] Support Cython 3
+
+Add exception specifications to callback function pointer typedefs.
+---
+ pyproject.toml | 2 +-
+ src/fcl/fcl_defs.pxd | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 603b0e4..3e07b17 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -2,7 +2,7 @@
+ requires = [
+ "setuptools",
+ "wheel",
+- "Cython<3.0",
++ "Cython",
+ "numpy; python_version<'3.12'",
+ "numpy>=1.26.0b1; python_version>='3.12'"]
+ build-backend = "setuptools.build_meta"
+diff --git a/src/fcl/fcl_defs.pxd b/src/fcl/fcl_defs.pxd
+index cb1205c..abc24ac 100644
+--- a/src/fcl/fcl_defs.pxd
++++ b/src/fcl/fcl_defs.pxd
+@@ -248,8 +248,8 @@ cdef extern from "fcl/geometry/shape/plane.h" namespace
"fcl":
+ double d
+
+ cdef extern from "fcl/broadphase/broadphase_collision_manager.h" namespace
"fcl":
+- ctypedef bool (*CollisionCallBack)(CollisionObjectd* o1, CollisionObjectd* o2, void*
cdata)
+- ctypedef bool (*DistanceCallBack)(CollisionObjectd* o1, CollisionObjectd* o2, void*
cdata, double& dist)
++ ctypedef bool (*CollisionCallBack)(CollisionObjectd* o1, CollisionObjectd* o2, void*
cdata) except? -1
++ ctypedef bool (*DistanceCallBack)(CollisionObjectd* o1, CollisionObjectd* o2, void*
cdata, double& dist) except? -1
+
+ cdef extern from "fcl/broadphase/broadphase_dynamic_AABB_tree.h" namespace
"fcl":
+ cdef cppclass DynamicAABBTreeCollisionManagerd:
diff --git a/libccd-2.1-ctest.patch b/libccd-2.1-ctest.patch
new file mode 100644
index 0000000..64cff73
--- /dev/null
+++ b/libccd-2.1-ctest.patch
@@ -0,0 +1,75 @@
+diff -up ./CMakeLists.txt.ctest ./CMakeLists.txt
+--- ./CMakeLists.txt.ctest 2018-12-22 07:13:45.000000000 -0500
++++ ./CMakeLists.txt 2020-04-18 14:10:30.394989892 -0400
+@@ -9,7 +9,7 @@ endif()
+ project(libccd)
+
+ set(CCD_VERSION_MAJOR 2)
+-set(CCD_VERSION_MINOR 0)
++set(CCD_VERSION_MINOR 1)
+ set(CCD_VERSION ${CCD_VERSION_MAJOR}.${CCD_VERSION_MINOR})
+
+ set(CCD_SOVERSION 2)
+@@ -25,6 +25,8 @@ option(BUILD_SHARED_LIBS "Build libccd a
+ option(ENABLE_DOUBLE_PRECISION
+ "Enable double precision computations instead of single precision" OFF)
+
++option(BUILD_TESTING "Build the test suite" OFF)
++
+ # Option for some bundle-like build system in order not to expose
+ # any FCL binary symbols in their public ABI
+ option(CCD_HIDE_ALL_SYMBOLS "Hide all binary symbols" OFF)
+@@ -73,3 +75,8 @@ install(FILES "${CMAKE_BINARY_DIR}/ccd.p
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
+ install(FILES BSD-LICENSE DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ccd")
++
++if (BUILD_TESTING)
++ enable_testing()
++endif (BUILD_TESTING)
++
+diff -up ./src/testsuites/CMakeLists.txt.ctest ./src/testsuites/CMakeLists.txt
+--- ./src/testsuites/CMakeLists.txt.ctest 2018-12-22 07:13:45.000000000 -0500
++++ ./src/testsuites/CMakeLists.txt 2020-04-18 14:07:25.369371109 -0400
+@@ -1,3 +1,41 @@
++set(CCDTEST_ARGS "" CACHE STRING "Argments to pass to ccdtest
executable")
++
++set(TEST_SOURCES
++ common.c
++ support.c
++ vec3.c
++ polytope.c
++ boxbox.c
++ spheresphere.c
++ cylcyl.c
++ boxcyl.c
++ mpr_boxbox.c
++ mpr_cylcyl.c
++ mpr_boxcyl.c)
++
++add_executable(ccdtest ${TEST_SOURCES} main.c)
++target_link_libraries(ccdtest ccd cu rt)
++add_definitions(-DCU_ENABLE_TIMER)
++include_directories(${CMAKE_CURRENT_SOURCE_DIR})
++add_test(NAME ccdtest
++ COMMAND ccdtest ${CCDTEST_ARGS}
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++
++add_test(NAME ccdtest-valgrind
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++ COMMAND valgrind -q --leak-check=full --show-reachable=yes --trace-children=yes
++ --error-limit=no
++ ${CMAKE_CURRENT_BINARY_DIR}/ccdtest ${CCDTEST_ARGS})
++
++add_test(NAME ccdtest-valgrind-gen-suppressions
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++ COMMAND valgrind -q --leak-check=full --show-reachable=yes --trace-children=yes
++ --gen-suppressions=all --log-file=out --error-limit=no
++ ${CMAKE_CURRENT_BINARY_DIR}/ccdtest ${CCDTEST_ARGS})
++
++add_test(NAME check-regressions
++ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cu/check-regressions regressions
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ add_subdirectory(cu)
+
+ set(MAIN_SOURCES
diff --git a/libccd-2.1-py3.patch b/libccd-2.1-py3.patch
new file mode 100644
index 0000000..0d9f86f
--- /dev/null
+++ b/libccd-2.1-py3.patch
@@ -0,0 +1,158 @@
+diff -up ./src/testsuites/cu/check-regressions.py3 ./src/testsuites/cu/check-regressions
+--- ./src/testsuites/cu/check-regressions.py3 2020-04-18 14:23:18.757771743 -0400
++++ ./src/testsuites/cu/check-regressions 2020-04-18 14:23:56.070249408 -0400
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ ##
+ # CU - C unit testing framework
+ # ---------------------------------
+@@ -88,7 +88,7 @@ class Hunk:
+ if self.numLinesAdded() != self.numLinesDeleted():
+ return False
+
+- for i in xrange(0, self.numLinesAdded()):
++ for i in range(0, self.numLinesAdded()):
+ # if any line does not contain number - return False because
+ # there must be more differences than in numbers
+ if not self.re_is_num.match(self.added[i]) \
+@@ -102,8 +102,8 @@ class Hunk:
+ nums1 = self.re_num.findall(line1)
+ nums2 = self.re_num.findall(line2)
+ # and remove all empty strings
+- nums1 = filter(lambda x: len(x) > 0, nums1)
+- nums2 = filter(lambda x: len(x) > 0, nums2)
++ nums1 = [x for x in nums1 if len(x) > 0]
++ nums2 = [x for x in nums2 if len(x) > 0]
+
+ # if length of list nums1 does not equal to length of nums2
+ # return False
+@@ -111,7 +111,7 @@ class Hunk:
+ return False
+
+ # iterate trough all numbers
+- for j in xrange(0, len(nums1)):
++ for j in range(0, len(nums1)):
+ # if numbers do not equal to each other return False
+ if not self.__eq(float(nums1[j]), float(nums2[j])):
+ return False
+@@ -177,7 +177,7 @@ class Parser:
+ self.re_deleted = re.compile(r"^< (.*)$")
+
+ def __readNextLine(self):
+- self.line = self.fin.readline()
++ self.line = self.fin.readline().decode('utf-8')
+ if len(self.line) == 0:
+ return False
+ return True
+@@ -210,7 +210,7 @@ class Parser:
+ num_lines += 1
+
+ if PROGRESS_ON and num_lines % 50 == 0:
+- print MSG_BASE, "[ %08d ]" % num_lines, "\r",
++ print(MSG_BASE, "[ %08d ]" % num_lines, "\r",
end=' ')
+ sys.stdout.flush()
+
+ # last push to list of hunks
+@@ -218,7 +218,7 @@ class Parser:
+ self.diff.addHunk(self.cur_hunk)
+
+ if PROGRESS_ON:
+- print MSG_BASE, " ", "\r",
++ print(MSG_BASE, " ", "\r", end=' ')
+ sys.stdout.flush()
+
+ def getDiff(self):
+@@ -262,26 +262,26 @@ def regressionFilesInDir():
+
+ def MSG(str = "", wait = False):
+ if wait:
+- print str,
++ print(str, end=' ')
+ else:
+- print str
++ print(str)
+ def MSGOK(prestr = "", str = "", poststr = ""):
+- print prestr, "\033[0;32m" + str + "\033[0;0m", poststr
++ print(prestr, "\033[0;32m" + str + "\033[0;0m", poststr)
+ def MSGFAIL(prestr = "", str = "", poststr = ""):
+- print prestr, "\033[0;31m" + str + "\033[0;0m", poststr
++ print(prestr, "\033[0;31m" + str + "\033[0;0m", poststr)
+ def MSGINFO(prestr = "", str = "", poststr = ""):
+- print prestr, "\033[0;33m" + str + "\033[0;0m", poststr
++ print(prestr, "\033[0;33m" + str + "\033[0;0m", poststr)
+ def dumpLines(lines, prefix = "", wait = False, max_lines = -1):
+ line_num = 0
+ if wait:
+ for line in lines:
+- print prefix, line,
++ print(prefix, line, end=' ')
+ line_num += 1
+ if max_lines >= 0 and line_num > max_lines:
+ break
+ else:
+ for line in lines:
+- print prefix, line
++ print(prefix, line)
+ line_num += 1
+ if max_lines >= 0 and line_num > max_lines:
+ break
+@@ -308,7 +308,7 @@ def main(files):
+ MSG_BASE = "Comparing %s and %s" % \
+ (filenames[0].ljust(len1) ,filenames[1].ljust(len2))
+ if not PROGRESS_ON:
+- print MSG_BASE,
++ print(MSG_BASE, end=' ')
+ sys.stdout.flush()
+
+ pipe = Popen(cmd, stdout=PIPE)
+@@ -319,7 +319,7 @@ def main(files):
+ diff.checkFloats()
+
+ if PROGRESS_ON:
+- print MSG_BASE,
++ print(MSG_BASE, end=' ')
+
+ if diff.numHunks() == 0:
+ MSGOK(" [", "OK", "]")
+@@ -345,23 +345,23 @@ def main(files):
+ dumpLines(lines, " |", True, MAX_DIFF_LINES)
+
+ def usage():
+- print "Usage: " + sys.argv[0] + " [ OPTIONS ] [ directory, [
directory, [ ... ] ] ]"
+- print ""
+- print " OPTIONS:"
+- print " --help / -h none Print this help"
+- print " --exact / -e none Switch do exact comparasion of
files"
+- print " --not-exact / -n none Switch do non exact comparasion of files
(default behaviour)"
+- print " --max-diff-lines int Maximum of lines of diff which can be
printed (default " + str(MAX_DIFF_LINES) + ")"
+- print " --eps float Precision of floating point numbers
(epsilon) (default " + str(EPS) + ")"
+- print " --no-progress none Turn off progress bar"
+- print " --progress none Turn on progress bar (default)"
+- print ""
+- print " This program is able to compare files with regressions generated by CU
testsuites."
+- print " You can specify directories which are to be searched for regression
files."
+- print " In non exact copmarasion mode (which is default), this program tries to
compare"
+- print " floating point numbers in files with respect to specified precision
(see --eps) and"
+- print " those lines which differ only in precission of floating point numbers
are omitted."
+- print ""
++ print("Usage: " + sys.argv[0] + " [ OPTIONS ] [ directory, [
directory, [ ... ] ] ]")
++ print("")
++ print(" OPTIONS:")
++ print(" --help / -h none Print this help")
++ print(" --exact / -e none Switch do exact comparasion of
files")
++ print(" --not-exact / -n none Switch do non exact comparasion of files
(default behaviour)")
++ print(" --max-diff-lines int Maximum of lines of diff which can be
printed (default " + str(MAX_DIFF_LINES) + ")")
++ print(" --eps float Precision of floating point numbers
(epsilon) (default " + str(EPS) + ")")
++ print(" --no-progress none Turn off progress bar")
++ print(" --progress none Turn on progress bar (default)")
++ print("")
++ print(" This program is able to compare files with regressions generated by CU
testsuites.")
++ print(" You can specify directories which are to be searched for regression
files.")
++ print(" In non exact copmarasion mode (which is default), this program tries to
compare")
++ print(" floating point numbers in files with respect to specified precision
(see --eps) and")
++ print(" those lines which differ only in precission of floating point numbers
are omitted.")
++ print("")
+ sys.exit(-1)
+
+
diff --git a/python-python-fcl.spec b/python-python-fcl.spec
new file mode 100644
index 0000000..9e20c32
--- /dev/null
+++ b/python-python-fcl.spec
@@ -0,0 +1,255 @@
+# The libccd dependency can be built in single-precision or double-precision
+# mode, but not both at the same time. This is awkward and not conducive to
+# system packaging. The goal is to build libccd in double-precision mode in
+# Fedora, as discussed in:
+# Build libccd with double-precision?
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2236527
+# This actually reduces the number of (ignored) test failures in the fcl
+# package, and it’s absolutely necessary for this package: with a
+# single-precision libccd (and an fcl built using that single-precision
+# libccd), one of the tests hangs forever.
+#
+# Until the system libccd is double-precision (and after that in stable
+# branches, since this will be an ABI-breaking change), we must therefore
+# bundle and build our own libccd and fcl.
+#
+# See:
+#
+# Build libccd with double-precision?
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2236527
+%bcond system_fcl 0
+# See build_dependencies/install_linux.sh for the versions used upstream to
+# build PyPI wheels.
+%global libccd_version 2.1
+%global fcl_version 0.7.0
+
+# Note that this is
https://pypi.org/project/python-fcl/; the canonical project
+# name fcl,
https://pypi.org/project/fcl/, belongs to a different and
+# apparently defunct project. See
+#
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_librar...
+Name: python-python-fcl
+Version: 0.7.0.6
+Release: %autorelease
+Summary: Python bindings for the Flexible Collision Library
+
+# Conveniently, both libccd and fcl are BSD-3-Clause, so the License does not
+# change when we bundle them.
+License: BSD-3-Clause
+URL:
https://github.com/BerkeleyAutomation/python-fcl
+# No sdists are released on PyPI; we must use the GitHub archive
+#
+# Source distribution is not available on pypi after 0.6.1
+#
https://github.com/BerkeleyAutomation/python-fcl/issues/55
+Source0: %{url}/archive/v%{version}/python-fcl-%{version}.tar.gz
+%global libccd_forgeurl
https://github.com/danfis/libccd
+Source1: %{libccd_forgeurl}/archive/v%{libccd_version}/libccd-%{version}.tar.gz
+%global fcl_forgeurl
https://github.com/ambi-robotics/fcl
+Source2: %{fcl_forgeurl}/archive/v%{fcl_version}/fcl-%{version}.tar.gz
+
+# Support Cython 3
+#
https://github.com/BerkeleyAutomation/python-fcl/pull/77
+Patch0: %{url}/pull/77.patch
+# Downstream-only patch to *allow* bundling libccd/fcl:
+# Add environment variables to control bundling
+Patch1: 0001-Add-environment-variables-to-control-bundling.patch
+
+# Patches for bundled libccd, based on
https://src.fedoraproject.org/rpms/libccd/
+#
+# This patch integrates additional programs that are present in
+# the testsuites folder into CMake, via CTest.
+# It also increments the version number to match the release.
+# Not yet submitted upstream
+Patch1001:
https://src.fedoraproject.org/rpms/libccd/raw/80bc68bb9f9644aec2e8dbf036e...
+# (We do not need libccd-2.1-pkgconfig.patch, because we are not using or installing the
.pc file from the bundled libccd.)
+# Convert check_regressions to python3
+# Not submitted upstream
+Patch1002:
https://src.fedoraproject.org/rpms/libccd/raw/80bc68bb9f9644aec2e8dbf036e...
+
+BuildRequires: python3-devel
+
+BuildRequires: gcc-c++
+
+BuildRequires: octomap-devel
+#
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_hea...
+BuildRequires: eigen3-static
+%if %{with system_fcl}
+BuildRequires: fcl-devel
+%else
+# For bundled libccd:
+BuildRequires: cmake
+BuildRequires: ninja-build
+# For bundled libccd (testing):
+%ifarch %{valgrind_arches}
+BuildRequires: valgrind
+%endif
+%endif
+
+BuildRequires: %{py3_dist pytest}
+
+%global common_description %{expand:
+Python-FCL is an (unofficial) Python interface for the Flexible Collision
+Library (FCL), an excellent C++ library for performing proximity and collision
+queries on pairs of geometric models.
+
+This package supports three types of proximity queries for pairs of geometric
+models:
+
+ • Collision Detection: Detecting whether two models overlap (and optionally
+ where).
+ • Distance Computation: Computing the minimum distance between a pair of
+ models.
+ • Continuous Collision Detection: Detecting whether two models overlap during
+ motion (and optionally the time of contact).
+
+This package also supports most of FCL’s object shapes, including:
+
+ • TriangleP
+ • Box
+ • Sphere
+ • Ellipsoid
+ • Capsule
+ • Cone
+ • Convex
+ • Cylinder
+ • Half-Space
+ • Plane
+ • Mesh
+ • OcTree}
+
+%description %{common_description}
+
+
+%package -n python3-python-fcl
+Summary: %{summary}
+
+#
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provid...
+%py_provides python3-fcl
+
+%if %{without system_fcl}
+Provides: bundled(libccd) = %{libccd_version}
+Provides: bundled(fcl) = %{fcl_version}
+%endif
+
+%description -n python3-python-fcl %{common_description}
+
+
+%prep
+%autosetup -n python-fcl-%{version} -N
+%autopatch -M999 -p1
+
+%if %{without system_fcl}
+%setup -q -T -D -b 1 -n python-fcl-%{version}
+pushd ../libccd-%{libccd_version}/
+%autopatch -m1000 -M1999 -p0
+popd
+cp -p ../libccd-%{libccd_version}/BSD-LICENSE libccd-LICENSE
+
+%setup -q -T -D -b 2 -n python-fcl-%{version}
+pushd ../fcl-%{fcl_version}/
+%autopatch -m2000 -M2999 -p1
+popd
+cp -p ../fcl-%{fcl_version}/LICENSE fcl-LICENSE
+%endif
+
+
+%generate_buildrequires
+%pyproject_buildrequires
+
+
+%build
+%if %{without system_fcl}
+BUNDLEROOT="%{_vpath_builddir}/_bundled"
+mkdir -p "${BUNDLEROOT}"
+# Ensure we have an absolute path
+pushd "${BUNDLEROOT}"
+BUNDLEROOT="${PWD}"
+popd
+# For each bundled dependency, we build a static library so we can link it into
+# the Python extension shared library. We must force PIC so that the static
+# library can be linked into a shared library. We also build and run the tests
+# of the bundled dependencies for added confidence.
+
+pushd ../libccd-%{libccd_version}/
+%cmake -GNinja \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DBUILD_STATIC_LIBS:BOOL=ON \
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
+ -DBUILD_TESTING:BOOL=ON \
+ -DENABLE_DOUBLE_PRECISION:BOOL=ON
+%cmake_build
+# Like %%cmake_install, but without DESTDIR="%%{buildroot}":
+DESTDIR="${BUNDLEROOT}" %__cmake --install "%{_vpath_builddir}"
+# We needed to “install” the bundled library because FCL needs headers from the
+# source tree AND the generated config.h, but accepts only a single
+# CCD_INCLUDE_DIR. Installing combines these headers in a single path.
+popd
+
+pushd ../fcl-%{fcl_version}/
+%cmake -GNinja \
+ -DCCD_LIBRARY:PATH="${BUNDLEROOT}%{_libdir}/libccd.a" \
+ -DCCD_INCLUDE_DIR:PATH="${BUNDLEROOT}%{_includedir}" \
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
+ -DFCL_STATIC_LIBRARY:BOOL=ON \
+ -DFCL_NO_DEFAULT_RPATH:BOOL=OFF \
+ -DFCL_USE_HOST_NATIVE_ARCH:BOOL=OFF \
+ -DFCL_USE_X64_SSE:BOOL=OFF
+%cmake_build
+DESTDIR="${BUNDLEROOT}" %__cmake --install "%{_vpath_builddir}"
+popd
+
+export PYTHON_FCL_EXTRA_INCLUDE_DIRS="${BUNDLEROOT}%{_includedir}"
+# Linking order matters!
+XO="${XO-}${XO+ }${BUNDLEROOT}%{_libdir}/libfcl.a"
+XO="${XO-}${XO+ }${BUNDLEROOT}%{_libdir}/libccd.a"
+export PYTHON_FCL_EXTRA_OBJECTS="${XO-}"
+# No -lfcl:
+export PYTHON_FCL_OMIT_LIBRARIES='fcl'
+%endif
+
+# For importing fcl.__version__
+#export PYTHONPATH="${PWD}/src"
+
+%pyproject_wheel
+
+
+%install
+%pyproject_install
+%pyproject_save_files -l fcl
+
+# Do not install Cython-generated C++ sources that were used to compile the
+# extension. This is pretty hard to fix upstream in setup.cfg (see various
+# issues like
https://github.com/pypa/setuptools/issues/2710), and no patch has
+# been attempted.
+find '%{buildroot}%{python3_sitearch}' -type f -name '*.cpp' -print
-delete
+sed -r -i '/\.cpp$/d' %{pyproject_files}
+
+
+%check
+%if %{without system_fcl}
+pushd ../libccd-%{libccd_version}/
+%ifarch %{valgrind_arches}
+%ctest
+%else
+%ctest --exclude-regex '.*-valgrind.*'
+%endif
+popd
+
+pushd ../fcl-%{fcl_version}/
+%ctest
+popd
+%endif
+
+rm -rvf fcl
+%pytest --verbose
+
+
+%files -n python3-python-fcl -f %{pyproject_files}
+%if %{without system_fcl}
+%license libccd-LICENSE fcl-LICENSE
+%endif
+%doc README.md
+%doc examples/
+
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..bc771e2
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (fcl-0.7.0.6.tar.gz) =
6e5390b8c49a19d347121945283141577208781967ec169aabf64b95efc41633fb9fde996bcbaf6daf0414e58e5760ea39e2aa9929891892db47756830156bdc
+SHA512 (libccd-0.7.0.6.tar.gz) =
ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d
+SHA512 (python-fcl-0.7.0.6.tar.gz) =
bc9a7c91a0371f53cd4e18787ff333a54ca04314a97a64ba5d41c48109b410553c1fc542a185d3f455ac4a988a82b8a1644feb234e5ebb1f789847e0aff77620