Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyginac for openSUSE:Factory 
checked in at 2021-02-09 21:16:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyginac (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyginac.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyginac"

Tue Feb  9 21:16:32 2021 rev:2 rq:870284 version:1.5.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyginac/python-pyginac.changes    
2020-11-26 23:13:41.372976348 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyginac.new.28504/python-pyginac.changes 
2021-02-09 21:16:33.498793854 +0100
@@ -1,0 +2,9 @@
+Thu Feb  4 22:58:17 UTC 2021 - Ben Greiner <[email protected]>
+
+- Drop  pyginac-makefile-fix.patch and pyginac-python38.patch in
+  favor for pyginac-opensusepaths.patch. Override Makefile
+  variables as appropriate for multiple python flavors.
+- Despite of the above, only build for primary python3 flavor,
+  because libboost_python is only available for that one.
+
+-------------------------------------------------------------------

Old:
----
  pyginac-makefile-fix.patch
  pyginac-python38.patch

New:
----
  pyginac-opensusepaths.patch

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

Other differences:
------------------
++++++ python-pyginac.spec ++++++
--- /var/tmp/diff_new_pack.rj1blO/_old  2021-02-09 21:16:34.258794718 +0100
+++ /var/tmp/diff_new_pack.rj1blO/_new  2021-02-09 21:16:34.270794732 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyginac
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,9 @@
 #
 
 
-%define skip_python2 1
+# The specfile is prepared for multiple python flavors, but the boost library
+# is only available for the primary python3.
+%define pythons python3
 %global modname pyginac
 Name:           python-pyginac
 Version:        1.5.5
@@ -25,19 +27,17 @@
 License:        GPL-2.0-only
 URL:            http://moebinv.sourceforge.net/pyGiNaC.html
 Source:         
https://download.sf.net/pyginac.moebinv.p/%{modname}_%{version}.orig.tar.gz
-# PATCH-FEATURE-OPENSUSE pyginac-makefile-fix.patch [email protected] -- In 
the lack of a proper configuring tool, we patch the Makefile appropriately to 
fix installation paths
-Patch0:         pyginac-makefile-fix.patch
-# PATCH-FIX-UPSTREAM pyginac-python38.patch [email protected] -- Fix build 
with python 3.8, patch taken from upstream (commit b4848e)
-Patch1:         pyginac-python38.patch
+# PATCH-FEATURE-OPENSUSE pyginac-opensusepaths.patch [email protected], 
[email protected] -- Enable build with multiple python versions, patch adapted 
from upstream (commit b4848e)
+Patch1:         pyginac-opensusepaths.patch
+BuildRequires:  %{python_module Cython}
+BuildRequires:  %{python_module devel}
+BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  ginac-devel
 BuildRequires:  libboost_python3-devel
 BuildRequires:  make
 BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
-BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module Cython}
-
 %python_subpackages
 
 %description
@@ -61,27 +61,37 @@
 %autosetup -p1 -n %{modname}-%{version}
 
 %build
-%make_build
+cp -ar site-packages site-packages0
+%{python_expand # build for flavor and place into shuffled build/ dir
+%make_build PYTHON=$python
+mkdir build
+mv site-packages build/
+# get clean state for next build
+cp -ar site-packages0 site-packages
+}
 
 %install
-%make_install
-
-mv %{buildroot}%{_prefix}/lib/python3 
%{buildroot}%{_prefix}/lib/python%{python_version}
-if [[ "%{_lib}" != 'lib' ]]
-then
-  mkdir -p %{buildroot}%{_libdir}
-  mv %{buildroot}%{_prefix}/lib/* %{buildroot}%{_libdir}/
+%{python_expand # install into flavor sitearch
+rm -r site-packages
+cp -ar build/site-packages ./
+%make_install PYTHON=$python prefix=%{_prefix} libdir=%{$python_sitearch} 
docdir=%{_docdir}/%{$python_prefix}-pyginac
+}
+%{python_compileall}
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
+if [[ "%{_lib}" != 'lib' ]]; then
+  mv %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_libdir}/
 fi
 
 %check
 export PYTHONDONTWRITEBYTECODE=1
-export PYTHONPATH=%{buildroot}%{python_sitearch}
-%python_exec bin/checkall.py
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
+$python bin/checkall.py
+}
 
 %files %{python_files}
 %license COPYING
 %doc AUTHORS debian/changelog README.md
-%doc %{_docdir}/%{python_flavor}-%{modname}
+%doc %{_docdir}/%{python_prefix}-pyginac
 %{python_sitearch}/ginac/
 %{python_sitearch}/*.so
 

++++++ pyginac-opensusepaths.patch ++++++
Index: pyginac-1.5.5/Makefile
===================================================================
--- pyginac-1.5.5.orig/Makefile
+++ pyginac-1.5.5/Makefile
@@ -8,6 +8,13 @@ includedir =  $(prefix)/include
 libdir = $(prefix)/lib/python3/dist-packages
 datarootdir = $(prefix)/share
 docdir = $(datarootdir)/doc/python3-pyginac
+
+PYTHON=python3
+PYTHON_CONFIG = $(shell if $(PYTHON)-config --ldflags --libs --embed 
>/dev/null 2>&1; then \
+echo  $(PYTHON)-config  --embed; \
+else \
+echo  $(PYTHON)-config ; \
+fi)
 #======================================================================
 ifeq ($(DISTRO_NAME),stretch)
 BOOST_PYTHON_LIB=boost_python-py35
@@ -15,11 +22,11 @@ else
 BOOST_PYTHON_LIB=boost_python3
 endif
 
-EXT_SUFFIX=$(shell python3-config --extension-suffix)
+EXT_SUFFIX=$(shell $(PYTHON_CONFIG) --extension-suffix)
 
-LDLIBS = $(shell python3-config --ldflags) -l$(BOOST_PYTHON_LIB) $(shell 
pkg-config --libs ginac cln)
+LDLIBS = $(shell $(PYTHON_CONFIG) --ldflags) -l$(BOOST_PYTHON_LIB) $(shell 
pkg-config --libs ginac cln)
 
-CPPFLAGS = $(shell python3-config --cflags) $(shell pkg-config --cflags ginac 
cln) \
+CPPFLAGS = $(shell $(PYTHON_CONFIG) --cflags) $(shell pkg-config --cflags 
ginac cln) \
        -pipe -g -c -std=gnu++14 --verbose -fdiagnostics-color -I./include \
        -Wall -W -Wsign-compare  -Wconversion -Wdisabled-optimization   
-Wno-unused-parameter -pedantic
 

Reply via email to