[packages/python-pyimath] - last version (3.1.12) of python2 module extracted from Imath.spec, buildable with Imath 3.2.x

qboosh qboosh at pld-linux.org
Sun Nov 30 09:43:05 CET 2025


commit dab3c5f8831162477119ce878f1f4bf5d0cca3f6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 30 09:42:53 2025 +0100

    - last version (3.1.12) of python2 module extracted from Imath.spec, buildable with Imath 3.2.x

 Imath-no-library.patch | 11 +++++++
 python-pyimath.spec    | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)
---
diff --git a/python-pyimath.spec b/python-pyimath.spec
new file mode 100644
index 0000000..d140b01
--- /dev/null
+++ b/python-pyimath.spec
@@ -0,0 +1,89 @@
+Summary:	Python 2 bindings for the Imath library
+Summary(pl.UTF-8):	Wiązania Pythona 2 do biblioteki Imath
+Name:		python-pyimath
+Version:	3.1.12
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+#Source0Download: https://github.com/AcademySoftwareFoundation/Imath/releases
+Source0:	https://github.com/AcademySoftwareFoundation/Imath/archive/v%{version}/Imath-%{version}.tar.gz
+# Source0-md5:	2262c2f1f2915695eb38523e632c31ea
+Patch0:		Imath-no-library.patch
+URL:		https://openexr.com/
+BuildRequires:	Imath-devel >= %{version}
+BuildRequires:	boost-python-devel
+BuildRequires:	cmake >= 3.12
+BuildRequires:	libstdc++-devel >= 6:5
+BuildRequires:	pkgconfig
+BuildRequires:	python-devel >= 1:2.5
+BuildRequires:	python-numpy-devel
+BuildRequires:	rpmbuild(macros) >= 1.736
+Requires:	Imath >= %{version}
+Obsoletes:	python-pyilmbase < 3
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The PyImath package provides Python bindings for the Imath library.
+
+%description -l pl.UTF-8
+Pakiet PyImath dostarcza wiązania Pythona do bibliotek Imath.
+
+%package devel
+Summary:	Header files for Python 2 bindings for the Imath library
+Summary(pl.UTF-8):	Pliki nagłówkowe wiązań Pythona 2 do biblioteki Imath
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	Imath-devel >= %{version}
+Requires:	python-devel >= 1:2.5
+Obsoletes:	pyilmbase-devel < 3
+Obsoletes:	python-pyilmbase-devel < 3
+
+%description devel
+Header files for Python bindings for the Imath library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe wiązań Pythona do biblioteki Imath.
+
+%prep
+%setup -q -n Imath-%{version}
+%patch -P0 -p1
+
+%build
+install -d build-py2
+cd build-py2
+%cmake .. \
+	-DBUILD_TESTING=OFF \
+	-DCMAKE_INSTALL_INSTALLDIR=include \
+	-DCMAKE_INSTALL_LIBDIR=%{_lib} \
+	-DPYIMATH_OVERRIDE_PYTHON_INSTALL_DIR=%{py_sitedir} \
+	-DPYTHON=ON \
+	-DUSE_PYTHON2=ON
+
+%{__make} -C src/python
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build-py2/src/python install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__mv} $RPM_BUILD_ROOT%{_pkgconfigdir}/Py{,2}Imath.pc
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPyImath_Python2_*-3_1.so.*.*.*
+%ghost %{_libdir}/libPyImath_Python2_*-3_1.so.29
+%attr(755,root,root) %{py_sitedir}/imath.so
+%attr(755,root,root) %{py_sitedir}/imathnumpy.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libPyImath_Python2_*-3_1.so
+%{_includedir}/Imath/PyImath*.h
+%{_pkgconfigdir}/Py2Imath.pc
diff --git a/Imath-no-library.patch b/Imath-no-library.patch
new file mode 100644
index 0000000..1c2f6dd
--- /dev/null
+++ b/Imath-no-library.patch
@@ -0,0 +1,11 @@
+--- Imath-3.1.12/CMakeLists.txt.orig	2024-09-05 00:40:21.000000000 +0200
++++ Imath-3.1.12/CMakeLists.txt	2025-11-30 09:12:45.005656972 +0100
+@@ -59,7 +59,7 @@ add_subdirectory(config)
+ include(config/LibraryDefine.cmake)
+ 
+ # Source code is in src/Imath
+-add_subdirectory(src/Imath)
++include_directories("/usr/include/Imath")
+ 
+ # Imath_DIR points to the location of ImathConfig.cmake, which tells
+ # downstream projects where to find Imath, via find_package(Imath).
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyimath.git/commitdiff/dab3c5f8831162477119ce878f1f4bf5d0cca3f6




More information about the pld-cvs-commit mailing list