Hello community,

here is the log from the commit of package apfel for openSUSE:Factory checked 
in at 2020-05-06 11:04:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apfel (Old)
 and      /work/SRC/openSUSE:Factory/.apfel.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apfel"

Wed May  6 11:04:20 2020 rev:12 rq:800519 version:3.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/apfel/apfel.changes      2019-06-26 
16:03:57.567623064 +0200
+++ /work/SRC/openSUSE:Factory/.apfel.new.2738/apfel.changes    2020-05-06 
11:04:28.739289949 +0200
@@ -1,0 +2,10 @@
+Tue Apr 28 09:50:35 UTC 2020 - Atri Bhattacharya <[email protected]>
+
+- Add apfel-allow-disabling-pywrap.patch to support building
+  without building the python extensions and binaries; build
+  python bindings and python-based binaries only for distributions
+  supporting python2 since apfel does not support python3.
+- Add libtool BuildRequires and run autoreconf since patch touches
+  build files.
+
+-------------------------------------------------------------------

New:
----
  apfel-allow-disabling-pywrap.patch

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

Other differences:
------------------
++++++ apfel.spec ++++++
--- /var/tmp/diff_new_pack.byJCs4/_old  2020-05-06 11:04:31.627296149 +0200
+++ /var/tmp/diff_new_pack.byJCs4/_new  2020-05-06 11:04:31.631296157 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package apfel
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,16 @@
 #
 
 
+# PYTHON BINDINGS INCOMPATIBLE WITH PYTHON3
+%if 0%{?suse_version} >= 1550
+%bcond_with pywrap
+%else
+%bcond_without pywrap
+%endif
+
+%define skip_python3 1
+
 %define soname libAPFEL0
-%define pypackage python-%{name}
 Name:           apfel
 Version:        3.0.4
 Release:        0
@@ -26,15 +34,21 @@
 Group:          Development/Libraries/C and C++
 URL:            http://apfel.hepforge.org/
 Source:         https://github.com/scarrazza/%{name}/archive/%{version}.tar.gz
+# PATCH-FIX-UPSTREAM apfel-allow-disabling-pywrap.patch [email protected] 
-- Allow building with python extension disabled, for example due to lack of 
python2 support in the system
+Patch0:         apfel-allow-disabling-pywrap.patch
 BuildRequires:  LHAPDF-devel
 BuildRequires:  gcc-c++
 BuildRequires:  gcc-fortran
-BuildRequires:  python-devel
-%if 0%{?suse_version} > 1320
 BuildRequires:  libboost_headers-devel
-%else
-BuildRequires:  boost-devel
+BuildRequires:  libtool
+BuildRequires:  python-rpm-macros
+%if %{with pywrap}
+BuildRequires:  %{python_module LHAPDF}
+BuildRequires:  %{python_module devel}
 %endif
+Requires:       python-LHAPDF
+
+%python_subpackages
 
 %description
 APFEL is a library to perform the combined QCD+QED DGLAP
@@ -50,44 +64,37 @@
 
 This package provides the shared libraries for %{name}.
 
-%package devel
+%package -n %{name}-devel
 Summary:        Development files for Apfel, a PDF Evolution Library
 Group:          Development/Libraries/C and C++
 Requires:       %{soname} = %{version}
 Requires:       LHAPDF-devel
 Recommends:     %{name}-doc = %{version}
 
-%description devel
+%description -n %{name}-devel
 APFEL is a library to perform the combined QCD+QED DGLAP
 evolution of parton distributions.
 
 This package provides the source files required to develop
 applications with %{name}.
 
-%package -n %{pypackage}
-Summary:        A PDF Evolution Library
-Group:          Development/Languages/Python
-
-%description -n %{pypackage}
-APFEL is a library to perform the combined QCD+QED DGLAP
-evolution of parton distributions.
-
-This package provides the shared libraries for %{name}.
-
-%package doc
+%package -n %{name}-doc
 Summary:        Documentation for APFEL, a PDF evolution library
 Group:          Documentation/Other
 
-%description doc
+%description -n %{name}-doc
 This package provides documentation for APFEL in PDF (Portable
 Document Format), a PDF (Probability Distribution Function) evolution
 library.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
-%configure --disable-static
+autoreconf -fvi
+%configure \
+  --disable-static \
+  %{!?with_pywrap:--disable-pywrap}
 make %{?_smp_mflags}
 
 %install
@@ -99,9 +106,9 @@
 # FIX env BASED SCRIPT INTERPRETER
 sed -Ei "1{s|#\!\s*/usr/bin/env bash|#\!/bin/bash|}" 
%{buildroot}%{_bindir}/apfel-config
 
-# REMOVE README FROM NON-STD LOCATIONS, INSTALL IT USING %%doc INSTEAD
+# REMOVE INSTALLED README, INSTALL IT USING %%doc INSTEAD
+rm -fr %{buildroot}%{_datadir}/doc/apfel/README
 rm -fr %{buildroot}%{_datadir}/apfel/README
-rm -fr %{buildroot}%{_datadir}/doc/apfel
 
 %post   -n %{soname} -p /sbin/ldconfig
 %postun -n %{soname} -p /sbin/ldconfig
@@ -109,7 +116,7 @@
 %files -n %{soname}
 %{_libdir}/*.so.*
 
-%files devel
+%files -n %{name}-devel
 %{_includedir}/APFEL/
 %license COPYING
 %doc AUTHORS ChangeLog NEWS README
@@ -118,15 +125,13 @@
 %{_bindir}/ListFunctions
 %{_libdir}/*.so
 
-%files -n %{pypackage}
-%{_bindir}/%{name}
-%{python_sitearch}/%{name}.py
-# COMPILED OBJECT FILE CONTAINS BUILDROOT
-%exclude %{python_sitearch}/%{name}.pyc
-%{python_sitearch}/_%{name}.so
-%{python_sitearch}/APFEL-*py%{py_ver}.egg-info
+%if %{with pywrap}
+%files %{python_files}
+%{_bindir}/apfel
+%{python_sitearch}/*
+%endif
 
-%files doc
+%files -n %{name}-doc
 %doc doc/pdfs/manual.pdf
 
 %changelog

++++++ apfel-allow-disabling-pywrap.patch ++++++
Index: apfel-3.0.4/configure.ac
===================================================================
--- apfel-3.0.4.orig/configure.ac
+++ apfel-3.0.4/configure.ac
@@ -87,7 +87,6 @@ AC_ARG_ENABLE(pywrap, [AC_HELP_STRING(--
   [don't build Python module (default=build)])],
   [], [enable_pywrap=yes])   
 
-enable_pywrap=yes
 AZ_PYTHON_DEFAULT
 ## Basic Python checks
 if test x$enable_pywrap == xyes; then
Index: apfel-3.0.4/Makefile.am
===================================================================
--- apfel-3.0.4.orig/Makefile.am
+++ apfel-3.0.4/Makefile.am
@@ -1,6 +1,9 @@
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = include ccwrap src lib examples pywrap doc bin
+SUBDIRS = include ccwrap src lib examples doc bin
+if ENABLE_PYWRAP
+  SUBDIRS+=pywrap
+endif
 dist_doc_DATA = README
 dist_pkgdata_DATA = src/HELL/data/*
 
Index: apfel-3.0.4/bin/Makefile.am
===================================================================
--- apfel-3.0.4.orig/bin/Makefile.am
+++ apfel-3.0.4/bin/Makefile.am
@@ -1,2 +1,7 @@
-EXTRA_DIST = apfel-config.in apfel.in
-bin_SCRIPTS = apfel-config apfel ../examples/.libs/ListFunctions 
../examples/.libs/CheckAPFEL
\ No newline at end of file
+EXTRA_DIST = apfel-config.in
+bin_SCRIPTS = apfel-config ../examples/.libs/ListFunctions 
../examples/.libs/CheckAPFEL
+
+if ENABLE_PYWRAP
+EXTRA_DIST+=apfel.in
+bin_SCRIPTS+=apfel
+endif

Reply via email to