# 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/#_library_naming 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 Source: %{url}/archive/v%{version}/python-fcl-%{version}.tar.gz # Support Cython 3 # https://github.com/BerkeleyAutomation/python-fcl/pull/77 Patch: %{url}/pull/77.patch # tests/test_fcl.py::TestFCL::test_managed_collisions Fatal Python error: Aborted ExcludeArch: %{ix86} BuildRequires: python3-devel BuildRequires: gcc-c++ BuildRequires: octomap-devel # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries BuildRequires: eigen3-static BuildRequires: fcl-devel 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/#_provides_for_importable_modules %py_provides python3-fcl %description -n python3-python-fcl %{common_description} %prep %autosetup -n python-fcl-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build %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 rm -rvf fcl %pytest --verbose %files -n python3-python-fcl -f %{pyproject_files} %doc README.md %doc examples/ %changelog %autochangelog