From 0c59ba55e2adba071692783d0289e0ee590f2986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Thu, 5 Aug 2021 09:37:00 +0200 Subject: [PATCH] Resolves: #1978256 - import imath package --- .gitignore | 1 + imath.spec | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 112 insertions(+) create mode 100644 imath.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..7a755ad 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Imath-3.0.2.tar.gz diff --git a/imath.spec b/imath.spec new file mode 100644 index 0000000..365bd1c --- /dev/null +++ b/imath.spec @@ -0,0 +1,110 @@ +%global srcname Imath +%global sover 28 +%global pyver_under %(%{python3} -Esc "import sys; sys.stdout.write('{0.major}_{0.minor}'.format(sys.version_info))") + +Name: imath +Version: 3.0.2 +Release: 4%{?dist} +Summary: Library of 2D and 3D vector, matrix, and math operations for computer graphics + +License: BSD +URL: https://github.com/AcademySoftwareFoundation/Imath +Source0: https://github.com/AcademySoftwareFoundation/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz + + +BuildRequires: cmake +BuildRequires: gcc gcc-c++ +BuildRequires: make +BuildRequires: boost-devel +BuildRequires: python3-devel +# For documentation generation +BuildRequires: python3-sphinx +BuildRequires: python3-breathe + +%description +Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D +vectors and matrices and other simple but useful mathematical objects, +functions, and data types common in computer graphics applications, including +the “half” 16-bit floating-point type. + + +%package -n python3-%{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Python module for Imath + +%description -n python3-%{name} +%{summary}. + + +%package devel +Summary: Development files for Imath +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-%{name}%{?_isa} = %{version}-%{release} +Requires: boost-devel +Requires: python3-devel + +%description devel +%{summary}. + + +%prep +%autosetup -n %{srcname}-%{version} + + +%build +%cmake -DPYTHON=ON +%cmake_build + +# Generate html docs +PYTHONPATH=${PWD} sphinx-build-3 docs/ html +# Remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + + +%install +%cmake_install + + +%check +# https://github.com/AcademySoftwareFoundation/Imath/issues/151 +%ifnarch i686 +%ctest +%endif + + +%files +%license LICENSE.md +%doc CHANGES.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS.md README.md SECURITY.md +%{_libdir}/libImath-3_0.so.%{sover}* + +%files -n python3-%{name} +%{_libdir}/libPyImath_Python%{pyver_under}-3_0.so.%{sover}* +%{python3_sitearch}/imath.so +%{python3_sitearch}/imathnumpy.so + +%files devel +%doc html/ +%{_includedir}/Imath/ +%{_libdir}/pkgconfig/Imath.pc +%{_libdir}/pkgconfig/PyImath.pc +%{_libdir}/cmake/Imath/ +%{_libdir}/libImath.so +%{_libdir}/libImath-3_0.so +%{_libdir}/libPyImath_Python%{pyver_under}-3_0.so + + +%changelog +* Fri Jun 04 2021 Python Maint - 3.0.2-4 +- Rebuilt for Python 3.10 + +* Thu May 27 2021 Richard Shaw - 3.0.2-3 +- Add main package as dependency to python package. + +* Tue May 25 2021 Richard Shaw - 3.0.2-2 +- Update spec per reviewer comments. + +* Thu May 20 2021 Richard Shaw - 3.0.2-1 +- Update to 3.0.2. + +* Wed Apr 07 2021 Richard Shaw - 3.0.1-1 +- Initial packaging. diff --git a/sources b/sources new file mode 100644 index 0000000..e069fa2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (Imath-3.0.2.tar.gz) = 4c683370717509847d14e26e55f68ab85664af6095e5a85310529f8e9b4cbaf871505cb85cc405ae48543c277dfa9186cf52f173d4ddca01ea23b14732bf3c8a