Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package openEMS for openSUSE:Factory checked 
in at 2025-08-05 14:20:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openEMS (Old)
 and      /work/SRC/openSUSE:Factory/.openEMS.new.1085 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openEMS"

Tue Aug  5 14:20:45 2025 rev:14 rq:1297502 version:0.0.36

Changes:
--------
--- /work/SRC/openSUSE:Factory/openEMS/openEMS.changes  2024-04-08 
17:52:17.645734400 +0200
+++ /work/SRC/openSUSE:Factory/.openEMS.new.1085/openEMS.changes        
2025-08-05 14:21:13.697091494 +0200
@@ -1,0 +2,6 @@
+Mon Jun 16 13:24:42 UTC 2025 - Matwey Kornilov <matwey.korni...@gmail.com>
+
+- Add Python bindings
+  Add 0001-fix-cython-import.patch: fix Python bindings build
+
+-------------------------------------------------------------------

New:
----
  0001-fix-cython-import.patch

----------(New B)----------
  New:- Add Python bindings
  Add 0001-fix-cython-import.patch: fix Python bindings build
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openEMS.spec ++++++
--- /var/tmp/diff_new_pack.2xOB6O/_old  2025-08-05 14:21:14.533126434 +0200
+++ /var/tmp/diff_new_pack.2xOB6O/_new  2025-08-05 14:21:14.537126601 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package openEMS
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -32,7 +32,16 @@
 Patch3:         0003-Fix-nf2ff-load.patch
 # PATCH-FIX-OPENSUSE openEMS-readme-octave-package.patch -- Add correct 
instruction about Octave and MATLAB packages
 Patch4:         0004-Add-correct-instruction-about-Octave-and-MATLAB-pack.patch
-
+# PATCH-FIX-UPSTREAM 0001-fix-cython-import.patch -- fix cython import
+Patch5:         0001-fix-cython-import.patch
+BuildRequires:  %{python_module CSXCAD}
+BuildRequires:  %{python_module Cython}
+BuildRequires:  %{python_module h5py}
+BuildRequires:  %{python_module matplotlib}
+BuildRequires:  %{python_module numpy}
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  CSXCAD-devel
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
@@ -43,6 +52,7 @@
 BuildRequires:  libboost_system-devel
 BuildRequires:  libboost_thread-devel
 BuildRequires:  octave-devel
+BuildRequires:  python-rpm-macros
 BuildRequires:  tinyxml-devel
 BuildRequires:  vtk-devel
 BuildRequires:  cmake(Qt5Sql)
@@ -50,6 +60,8 @@
 BuildRequires:  pkgconfig(fparser)
 BuildRequires:  pkgconfig(python3)
 ExcludeArch:    %{ix86} s390x
+%define python_subpackage_only 1
+%python_subpackages
 
 %description
 Electromagnetic field solver using the EC-FDTD method.
@@ -68,13 +80,13 @@
 %description -n libopenEMS0
 Electromagnetic field solver using the EC-FDTD method library.
 
-%package        devel
+%package -n     %{name}-devel
 Summary:        Development files for openEMS
 Group:          Development/Libraries/C and C++
 Requires:       libnf2ff0 = %{version}
 Requires:       libopenEMS0 = %{version}
 
-%description    devel
+%description -n %{name}-devel
 This package contains libraries for developing applications
 that use %{name}.
 
@@ -103,6 +115,18 @@
 
 This package provides MATLAB interface for openEMS.
 
+%package -n     python-%{name}
+Summary:        Python %{python_version} bindings for openEMS
+Group:          Development/Libraries/Python
+Requires:       python-CSXCAD
+Requires:       python-h5py
+Requires:       python-matplotlib
+Requires:       python-numpy
+
+%description -n python-%{name}
+This package contains Python %{python_version} bindings for the openEMS
+library.
+
 %prep
 %setup -q
 %autopatch -p1
@@ -167,6 +191,19 @@
     %octave_pkg_build
 popd
 
+pushd python
+    mkdir -p "%{_builddir}/include/openEMS"
+    cp "%{_builddir}/%{name}-%{version}/openems.h" 
"%{_builddir}/include/openEMS"
+    cp "%{_builddir}/%{name}-%{version}/openems_global.h" 
"%{_builddir}/include/openEMS"
+    cp "%{_builddir}/%{name}-%{version}/nf2ff/nf2ff.h" 
"%{_builddir}/include/openEMS"
+    cat >> setup.cfg << EOF
+[build_ext]
+include_dirs = %{_builddir}/include
+library_dirs = 
%{_builddir}/%{name}-%{version}/build:%{_builddir}/%{name}-%{version}/build/nf2ff
+EOF
+    %pyproject_wheel
+popd
+
 %install
 %cmake_install
 
@@ -174,6 +211,10 @@
     %octave_pkg_install
 popd
 
+pushd python
+    %pyproject_install
+popd
+
 %post -n libnf2ff0 -p /sbin/ldconfig
 
 %postun -n libnf2ff0 -p /sbin/ldconfig
@@ -188,7 +229,7 @@
 %postun -n octave-%{name}
 %octave --eval "pkg rebuild"
 
-%files
+%files -n %{name}
 %license COPYING
 %doc NEWS README
 %{_bindir}/*
@@ -199,7 +240,7 @@
 %files -n libopenEMS0
 %{_libdir}/libopenEMS.so.*
 
-%files devel
+%files -n %{name}-devel
 %dir %{_prefix}/include/%{name}
 %{_prefix}/include/%{name}/*
 %{_libdir}/libnf2ff.so
@@ -213,3 +254,8 @@
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/matlab/
 
+%files %{python_files openEMS}
+%license COPYING
+%{python_sitearch}/openEMS
+%{python_sitearch}/openems-*.dist-info
+

++++++ 0001-fix-cython-import.patch ++++++
>From bf30b7d94ab63bbe63672dd0651172410df4b044 Mon Sep 17 00:00:00 2001
From: Tobias Oberstein <tobias.oberst...@gmail.com>
Date: Fri, 15 Dec 2023 14:26:19 +0100
Subject: [PATCH] fix cython import

---
 python/openEMS/_nf2ff.pxd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/openEMS/_nf2ff.pxd b/python/openEMS/_nf2ff.pxd
index 859f062..cc70367 100644
--- a/python/openEMS/_nf2ff.pxd
+++ b/python/openEMS/_nf2ff.pxd
@@ -20,7 +20,7 @@ from libcpp.string cimport string
 from libcpp.vector cimport vector
 from libcpp.complex cimport complex
 from libcpp cimport bool
-cimport cython.numeric
+cimport cython
 
 cdef extern from "openEMS/nf2ff.h":
     cdef cppclass cpp_nf2ff "nf2ff":
-- 
2.43.0

Reply via email to