Compare commits

...
Sign in to create a new pull request.

41 commits

Author SHA1 Message Date
Python Maint
867c8c4ed0 Rebuilt for Python 3.15.0b4 ABI change 2026-07-22 11:07:55 +02:00
Fedora Release Engineering
e6b66cb10f Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 05:35:03 +00:00
Python Maint
912c6e5bfc Rebuilt for Python 3.15 2026-06-03 19:03:48 +02:00
Mattias Ellert
b27d9b9c0c More fixes to lhapdf-config and lhapdf.pc 2026-04-03 08:33:23 +02:00
Mattias Ellert
640d342286 Correct the lhapdf-config output (backport from upstream git) 2026-03-28 20:03:09 +01:00
Mattias Ellert
f1d7e8ed4a Update to version 6.5.6
Add PDFs used by new tests to the source RPM
Add test file missing from the source tarfile to the source RPM
2026-03-12 14:07:52 +01:00
Fedora Release Engineering
db76099372 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 18:25:15 +00:00
Orion Poplawski
347206e335 Rebuild for yaml-cpp 0.8 (epel10) 2025-12-04 20:30:32 -07:00
Python Maint
45ff5ab085 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:25:37 +02:00
Python Maint
b1bda310de Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 12:55:10 +02:00
Fedora Release Engineering
b4139c6b0c Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 19:15:17 +00:00
Python Maint
6c057741ef Rebuilt for Python 3.14 2025-06-02 20:48:34 +02:00
Fedora Release Engineering
c2f0fca5bd Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 10:24:07 +00:00
Mattias Ellert
13b28d6b4e Update to version 6.5.5
Drop soname patch, use new configure option --enable-librelease instead
Unbundle yaml-cpp, using new configure option --with-yaml-cpp
EPEL 7 EOL specfile cleanup
2025-01-02 09:49:51 +01:00
Fedora Release Engineering
a4b0d59fcf Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 13:09:39 +00:00
Python Maint
5720c7193b Rebuilt for Python 3.13 2024-06-07 09:49:39 +02:00
Mattias Ellert
d578229446 Rebulld for updated patch syntax 2024-06-03 13:15:32 +02:00
Software Management Team
ca620198f5 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:47 +02:00
Fedora Release Engineering
e4c051d91a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 01:22:41 +00:00
Fedora Release Engineering
fb8006022a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 03:25:05 +00:00
Fedora Release Engineering
f3b071207c Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 10:06:16 +00:00
Python Maint
dba26b18dd Rebuilt for Python 3.12 2023-06-13 21:35:28 +02:00
Mattias Ellert
8c5318c6db Update to version 6.5.4 2023-03-13 19:36:52 +01:00
Fedora Release Engineering
ce1b448776 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 15:39:45 +00:00
Fedora Release Engineering
a87b489022 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 17:08:58 +00:00
Python Maint
d6d1855698 Rebuilt for Python 3.11 2022-06-13 16:01:06 +02:00
Fedora Release Engineering
1e72a841ac - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 15:36:22 +00:00
Mattias Ellert
34adc86dac Update to version 6.4.0 2021-12-20 15:51:46 +01:00
Fedora Release Engineering
c7f1fe6b0b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 10:48:39 +00:00
Python Maint
4860d8a965 Rebuilt for Python 3.10 2021-06-04 20:08:50 +02:00
Fedora Release Engineering
755c89bfb1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 16:31:08 +00:00
Tom Stellard
44061b6711 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-06 00:41:54 +00:00
Mattias Ellert
de5282d5d2 Update to version 6.3.0
Drop patch lhapdf-cython-configure.patch (previously backported)
2020-08-23 13:52:02 +02:00
Fedora Release Engineering
a2e7ee0cbc - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:05:54 +00:00
Miro Hrončok
a530a55460 Rebuilt for Python 3.9 2020-05-26 02:50:02 +02:00
Fedora Release Engineering
1837b70a40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 08:23:24 +00:00
Miro Hrončok
e4324d4c6a Rebuilt for Python 3.8 2019-08-19 10:17:25 +02:00
Fedora Release Engineering
543e3710eb - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 12:38:29 +00:00
Mattias Ellert
cfff08e888 Merge branch 'epel7' 2019-03-13 22:03:11 +01:00
Troy Dawson
ce064741c0 Needs both regular python3 and other python3 2019-03-07 12:38:35 -08:00
Troy Dawson
2f68c283e7 Rebuilt to change main python from 3.4 to 3.6 2019-03-07 12:17:16 -08:00
7 changed files with 358 additions and 165 deletions

View file

@ -0,0 +1,50 @@
From d49e808ed6c027db3a682a731d74ec3ffa7c6076 Mon Sep 17 00:00:00 2001
From: Andy Buckley <andy.buckley@cern.ch>
Date: Mon, 9 Mar 2026 19:33:39 +0000
Subject: [PATCH] Correct the lhapdf-config help message to use --includedir
rather than --incdir, but also add a backward-compatibility handling for
--incdir if given. Thanks to Mark Sutton.
---
ChangeLog | 6 ++++++
bin/lhapdf-config.in | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index cd35d70..7eabc3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-03-09 Andy Buckley <andy.buckley@cern.ch>
+
+ * Correct the lhapdf-config help message to use --includedir
+ rather than --incdir, but also add a backward-compatibility
+ handling for --incdir if given. Thanks to Mark Sutton.
+
2026-02-19 Andy Buckley <andy.buckley@cern.ch>
* Version 6.5.6 release.
diff --git a/bin/lhapdf-config.in b/bin/lhapdf-config.in
index b62a217..d13b6f1 100644
--- a/bin/lhapdf-config.in
+++ b/bin/lhapdf-config.in
@@ -13,7 +13,7 @@ Options:
--help | -h : show this help message
--prefix : show the installation prefix (cf. autoconf)
- --incdir : show the path to the LHAPDF C++ header directory
+ --includedir : show the path to the LHAPDF C++ header directory
--libdir : show the path to the LHAPDF library directory
--datadir : show the path to the LHAPDF data directory
--pythonpath|--pydir : show the path(s) to the directory containing LHAPDF's Python package
@@ -48,6 +48,7 @@ for opt in "$@"; do
--version) echo "@PACKAGE_VERSION@" && exit 0 ;;
--prefix) show_prefix=1 ;;
--includedir) show_incdir=1 ;;
+ --incdir) show_incdir=1 ;; #< TODO: for backward compatibility from 6.5.7, remove eventually
--libdir) show_libdir=1 ;;
--datadir) show_datdir=1 ;;
--pythonpath) show_pypath=1 ;;
--
2.53.0

View file

@ -0,0 +1,76 @@
From d4dd6202016754052f7f7f0cfedd3913a08afbbf Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 3 Apr 2026 07:45:56 +0200
Subject: [PATCH] Fix double -I in lhapdf-config --cflags output Don't put
-L/usr/lib and -L/usr/lib64 in build flags Fix pkg-config --define-variable
libdir=/path --libs lhapdf
---
ChangeLog | 6 ++++++
bin/lhapdf-config.in | 2 +-
configure | 9 +++++++--
lhapdf.pc.in | 4 ++--
4 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7eabc3f..74f4c7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-03 Mattias Ellert <mattias.ellert@physics.uu.se>
+
+ * Fix double -I in lhapdf-config --cflags output
+ * Don't put -L/usr/lib and -L/usr/lib64 in build flags
+ * Fix pkg-config --define-variable libdir=/path --libs lhapdf
+
2026-03-09 Andy Buckley <andy.buckley@cern.ch>
* Correct the lhapdf-config help message to use --includedir
diff --git a/bin/lhapdf-config.in b/bin/lhapdf-config.in
index d13b6f1..4b5afcd 100644
--- a/bin/lhapdf-config.in
+++ b/bin/lhapdf-config.in
@@ -102,7 +102,7 @@ if [ "$show_iflags" -eq 1 ]; then
ilhapdf="@includedir@"
test -n "$ilhapdf" && OUT="$OUT -I${ilhapdf}"
iyamlcpp="@YAML_CPP_CPPFLAGS@"
- test -n "$iyamlcpp" && OUT="$OUT -I${iyamlcpp}"
+ test -n "$iyamlcpp" && OUT="$OUT ${iyamlcpp}"
fi
if [ "$show_Lflags" -eq 1 ]; then
llhapdf="@libdir@"
diff --git a/configure b/configure
index 7fafae6..d530cd7 100644
--- a/configure
+++ b/configure
@@ -19972,8 +19972,13 @@
YAML_CPP_CPPFLAGS=""
YAML_CPP_LDFLAGS=""
if test "x$yaml_cpp_prefix" != "xno"; then
- YAML_CPP_CPPFLAGS="-I$yaml_cpp_prefix/include"
- YAML_CPP_LDFLAGS="-L$yaml_cpp_prefix/lib -L$yaml_cpp_prefix/lib64 -lyaml-cpp"
+ if test "x$yaml_cpp_prefix" = "x/usr"; then
+ YAML_CPP_CPPFLAGS=""
+ YAML_CPP_LDFLAGS="-lyaml-cpp"
+ else
+ YAML_CPP_CPPFLAGS="-I$yaml_cpp_prefix/include"
+ YAML_CPP_LDFLAGS="-L$yaml_cpp_prefix/lib -L$yaml_cpp_prefix/lib64 -lyaml-cpp"
+ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lyaml-cpp" >&5
printf %s "checking for main in -lyaml-cpp... " >&6; }
if test ${ac_cv_lib_yaml_cpp_main+y}
diff --git a/lhapdf.pc.in b/lhapdf.pc.in
index 964d0ae..1a7d80a 100644
--- a/lhapdf.pc.in
+++ b/lhapdf.pc.in
@@ -8,5 +8,5 @@ Name: lhapdf
Description: LHAPDF parton density library
URL: https://lhapdf.hepforge.org
Version: @VERSION@
-Libs: -L@libdir@ @YAML_CPP_LDFLAGS@ -lLHAPDF
-Cflags: -I@includedir@ @YAML_CPP_CPPFLAGS@
+Libs: -L${libdir} @YAML_CPP_LDFLAGS@ -lLHAPDF
+Cflags: -I${includedir} @YAML_CPP_CPPFLAGS@
--
2.53.0

View file

@ -1,12 +0,0 @@
diff -ur LHAPDF-6.2.1.orig/configure LHAPDF-6.2.1/configure
--- LHAPDF-6.2.1.orig/configure 2017-08-11 11:27:33.000000000 +0200
+++ LHAPDF-6.2.1/configure 2018-11-10 19:44:51.928926070 +0100
@@ -17109,7 +17109,7 @@
else
-prog="import Cython.Compiler.Version; print Cython.Compiler.Version.version"
+prog="from __future__ import print_function; import Cython.Compiler.Version; print(Cython.Compiler.Version.version)"
CYTHON_VERSION=`$PYTHON -c "$prog" 2>&5`
py_cv_cython=no

View file

@ -1,41 +0,0 @@
diff -ur LHAPDF-6.2.1.orig/src/Makefile.am LHAPDF-6.2.1/src/Makefile.am
--- LHAPDF-6.2.1.orig/src/Makefile.am 2017-08-10 22:08:13.000000000 +0200
+++ LHAPDF-6.2.1/src/Makefile.am 2018-06-21 10:22:17.548034288 +0200
@@ -22,6 +22,7 @@
libLHAPDFPaths_la_CPPFLAGS = $(AM_CPPFLAGS) -DLHAPDF_INSTALL_PREFIX=\"$(prefix)\" -DLHAPDF_DATA_PREFIX=\"$(datadir)\"
libLHAPDF_la_LIBADD = libLHAPDFInfo.la libLHAPDFPaths.la
+libLHAPDF_la_LDFLAGS = -release ${PACKAGE_VERSION}
if ENABLE_LHAGLUE
noinst_LTLIBRARIES += libLHAPDFGlue.la
diff -ur LHAPDF-6.2.1.orig/src/Makefile.in LHAPDF-6.2.1/src/Makefile.in
--- LHAPDF-6.2.1.orig/src/Makefile.in 2017-08-11 11:27:33.000000000 +0200
+++ LHAPDF-6.2.1/src/Makefile.in 2018-06-21 10:37:36.956148357 +0200
@@ -148,6 +148,9 @@
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
+libLHAPDF_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(libLHAPDF_la_LDFLAGS) $(LDFLAGS) -o $@
libLHAPDFGlue_la_LIBADD =
am__libLHAPDFGlue_la_SOURCES_DIST = LHAGlue.cc
@ENABLE_LHAGLUE_TRUE@am_libLHAPDFGlue_la_OBJECTS = \
@@ -429,6 +432,7 @@
libLHAPDFPaths_la_CPPFLAGS = $(AM_CPPFLAGS) -DLHAPDF_INSTALL_PREFIX=\"$(prefix)\" -DLHAPDF_DATA_PREFIX=\"$(datadir)\"
libLHAPDF_la_LIBADD = libLHAPDFInfo.la libLHAPDFPaths.la \
$(am__append_2)
+libLHAPDF_la_LDFLAGS = -release ${PACKAGE_VERSION}
@ENABLE_LHAGLUE_TRUE@libLHAPDFGlue_la_SOURCES = LHAGlue.cc
@ENABLE_LHAGLUE_TRUE@libLHAPDFGlue_la_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_LHAGLUE_CXX
all: all-recursive
@@ -512,7 +516,7 @@
}
libLHAPDF.la: $(libLHAPDF_la_OBJECTS) $(libLHAPDF_la_DEPENDENCIES) $(EXTRA_libLHAPDF_la_DEPENDENCIES)
- $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libLHAPDF_la_OBJECTS) $(libLHAPDF_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libLHAPDF_la_LINK) -rpath $(libdir) $(libLHAPDF_la_OBJECTS) $(libLHAPDF_la_LIBADD) $(LIBS)
libLHAPDFGlue.la: $(libLHAPDFGlue_la_OBJECTS) $(libLHAPDFGlue_la_DEPENDENCIES) $(EXTRA_libLHAPDFGlue_la_DEPENDENCIES)
$(AM_V_CXXLD)$(CXXLINK) $(am_libLHAPDFGlue_la_rpath) $(libLHAPDFGlue_la_OBJECTS) $(libLHAPDFGlue_la_LIBADD) $(LIBS)

View file

@ -1,43 +1,33 @@
%if %{?fedora}%{!?fedora:0} >= 29 || %{?rhel}%{!?rhel:0} >= 8
%global py3default 1
%else
%global py3default 0
%endif
Name: lhapdf
Version: 6.2.1
Version: 6.5.6
Release: 6%{?dist}
Summary: Les Houches Accord PDF Interface
License: GPLv3+
License: GPL-3.0-only
URL: https://lhapdf.hepforge.org/
Source0: https://www.hepforge.org/archive/lhapdf/LHAPDF-6.2.1.tar.gz
# Add soname to the shared library, cf. SuSE's spec file.
Patch0: %{name}-soname.patch
# Make Cython checking script usable with Python3 (backport)
# https://phab.hepforge.org/rLHAPDFHGedf5d6cc4adbbcaac712f8a6b094b7f572bb4966
Patch1: %{name}-cython-configure.patch
Source0: https://www.hepforge.org/archive/lhapdf/LHAPDF-%{version}.tar.gz
# PDFs used during testing
Source1: https://lhapdfsets.web.cern.ch/current/CT10nlo.tar.gz
Source2: https://lhapdfsets.web.cern.ch/current/MSTW2008nlo68cl.tar.gz
Source3: https://lhapdfsets.web.cern.ch/current/NNPDF31_lo_as_0130.tar.gz
# Missing file in source tarfile
# See: https://gitlab.com/hepcedar/lhapdf/-/merge_requests/120
Source4: testunc.py
# https://gitlab.com/hepcedar/lhapdf/-/merge_requests/123
Patch0: 0001-Correct-the-lhapdf-config-help-message-to-use-includ.patch
# https://gitlab.com/hepcedar/lhapdf/-/merge_requests/124
Patch1: 0001-Fix-double-I-in-lhapdf-config-cflags-output.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: /usr/bin/cython
%if ! %{py3default}
BuildRequires: python2-devel
%endif
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
BuildRequires: yaml-cpp-devel
BuildRequires: python3-Cython
BuildRequires: python3-devel
%endif
%if %{?rhel}%{!?rhel:0} == 7
BuildRequires: python34-devel
BuildRequires: python36-devel
%endif
BuildRequires: doxygen
# Obsolete LHAPDF5 packages not provided by LHAPDF6
Obsoletes: octave-lhapdf < 6
Obsoletes: lhapdf-pdfsets-minimal < 6
%if %{py3default}
Obsoletes: python2-lhapdf < %{version}-%{release}
%endif
%description
LHAPDF is a general purpose C++ interpolator, used for evaluating PDFs
@ -67,48 +57,22 @@ LHAPDF6 is documented in more detail in http://arxiv.org/abs/1412.7420
%package devel
Summary: Les Houches Accord PDF Interface - development files
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: yaml-cpp-devel
%description devel
This package provides development files of LHAPDF, including C++ bindings.
%if ! %{py3default}
%package -n python2-%{name}
Summary: Les Houches Accord PDF Interface - Python 2 module
%{?python_provide:%python_provide python2-%{name}}
%package -n python3-%{name}
Summary: Les Houches Accord PDF Interface - Python 3 module
%py_provides python3-%{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
This package provides Python 2 bindings for LHAPDF.
%description -n python3-%{name}
This package provides Python 3 bindings for LHAPDF.
This package also provides a script called "lhapdf" which can be used
to query the catalog of PDF sets and to install and update them from
the command line. It accepts commands "list", "update", "install" and
"upgrade". Please run "lhapdf help" for full usage instructions.
%endif
%package -n python%{python3_pkgversion}-%{name}
Summary: Les Houches Accord PDF Interface - Python 3 module
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}
This package provides Python 3 bindings for LHAPDF.
%if %{py3default}
This package also provides a script called "lhapdf" which can be used
to query the catalog of PDF sets and to install and update them from
the command line. It accepts commands "list", "update", "install" and
"upgrade". Please run "lhapdf help" for full usage instructions.
%endif
%if %{?rhel}%{!?rhel:0} == 7
%package -n python%{python3_other_pkgversion}-%{name}
Summary: Les Houches Accord PDF Interface - Python 3 module
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python%{python3_other_pkgversion}-%{name}
This package provides Python 3 bindings for LHAPDF.
%endif
%package doc
Summary: Les Houches Accord PDF Interface - documentation
@ -119,61 +83,67 @@ This package provides API documentation and examples for LHAPDF.
%prep
%setup -q -n LHAPDF-%{version}
%patch0 -p1
%patch1 -p1
%patch -P0 -p1
%patch -P1 -p1
# Remove cython generated file
rm wrappers/python/lhapdf.cpp
mkdir tests/SETS
tar -z -x -f %{SOURCE1} -C tests/SETS
tar -z -x -f %{SOURCE2} -C tests/SETS
tar -z -x -f %{SOURCE3} -C tests/SETS
cp -p %{SOURCE4} tests
# Remove bundled yaml-cpp
rm -rf src/yamlcpp/
# Fix shebangs
%if %{py3default}
sed 's!/usr/bin/env python!%{__python3}!' -i bin/lhapdf.in examples/*.py
%else
sed 's!/usr/bin/env python!%{__python2}!' -i bin/lhapdf.in examples/*.py
%endif
sed 's!/usr/bin/env python3!%{__python3}!' -i bin/lhapdf
sed 's!/usr/bin/env python!%{__python3}!' -i examples/*.py
sed 's!/usr/bin/env bash!/bin/bash!' -i bin/lhapdf-config.in
%build
%if %{py3default}
export PYTHON=%{__python3}
%configure \
--disable-static \
--with-yaml-cpp \
--enable-librelease \
--docdir=%{_pkgdocdir} \
PYTHON=%{__python3}
%if %{?rhel}%{!?rhel:0} == 8
# cython version on RHEL 8 is too old and generates broken code.
# touch the pregenerated bundled source file to prevent regeneration.
# See: https://gitlab.com/hepcedar/lhapdf/-/merge_requests/122
touch wrappers/python/lhapdf.cpp
%else
export PYTHON=%{__python2}
rm wrappers/python/lhapdf.cpp
%endif
%configure --disable-static --disable-silent-rules
%make_build
%if ! %{py3default}
( cd wrappers/python ; %make_build PYTHON=%{__python3} )
%endif
%if %{?rhel}%{!?rhel:0} == 7
( cd wrappers/python ; %make_build PYTHON=%{__python3_other} )
%endif
# Build doxygen documentation
%make_build doxy
%install
%make_install
%if ! %{py3default}
( cd wrappers/python ; %make_install PYTHON=%{__python3} )
%endif
%if %{?rhel}%{!?rhel:0} == 7
( cd wrappers/python ; %make_install PYTHON=%{__python3_other} )
%endif
mkdir %{buildroot}%{python3_sitearch}/%{name}-%{version}.dist-info
cat << EOF > %{buildroot}%{python3_sitearch}/%{name}-%{version}.dist-info/METADATA
Name: %{name}
Version: %{version}
EOF
rm %{buildroot}%{_libdir}/libLHAPDF.la
rm examples/Makefile*
find %{buildroot}%{_pkgdocdir}/examples -type f -a '!' -name '*.*' -delete
%check
# Workaround incomplete test environment
# See: https://gitlab.com/hepcedar/lhapdf/-/merge_requests/121
cp -p pdfsets.index tests/SETS
cp -p lhapdf.conf tests/SETS
export PYTHONPATH=$PWD/wrappers/python/build
export LD_LIBRARY_PATH=$PWD/src/.libs
%make_build check
%ldconfig_scriptlets
%files
%{_libdir}/libLHAPDF-%{version}.so
%{_datadir}/LHAPDF
@ -186,32 +156,134 @@ rm examples/Makefile*
%{_libdir}/libLHAPDF.so
%{_libdir}/pkgconfig/%{name}.pc
%if ! %{py3default}
%files -n python2-%{name}
%files -n python3-%{name}
%{_bindir}/%{name}
%{python2_sitearch}/LHAPDF-*.egg-info
%{python2_sitearch}/%{name}.so
%endif
%files -n python%{python3_pkgversion}-%{name}
%if %{py3default}
%{_bindir}/%{name}
%endif
%{python3_sitearch}/LHAPDF-*.egg-info
%{python3_sitearch}/%{name}.*.so
%if %{?rhel}%{!?rhel:0} == 7
%files -n python%{python3_other_pkgversion}-%{name}
%{python3_other_sitearch}/LHAPDF-*.egg-info
%{python3_other_sitearch}/%{name}.*.so
%endif
%{python3_sitearch}/%{name}-%{version}.dist-info
%{python3_sitearch}/%{name}
%files doc
%doc doc/doxygen
%doc examples
%doc %{_pkgdocdir}/doxygen
%doc %{_pkgdocdir}/examples
%license COPYING
%changelog
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 6.5.6-6
- Rebuilt for Python 3.15.0b4 ABI change
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 6.5.6-4
- Rebuilt for Python 3.15
* Fri Apr 03 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.6-3
- More fixes to lhapdf-config and lhapdf.pc
* Sat Mar 28 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.6-2
- Correct the lhapdf-config output (backport from upstream git)
* Thu Mar 05 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.6-1
- Update to version 6.5.6
- Add PDFs used by new tests to the source RPM
- Add test file missing from the source tarfile to the source RPM
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Dec 05 2025 Orion Poplawski <orion@nwra.com> - 6.5.5-2
- Rebuild for yaml-cpp 0.8 (epel10)
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 6.5.5-6
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 6.5.5-5
- Rebuilt for Python 3.14.0rc2 bytecode
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 6.5.5-3
- Rebuilt for Python 3.14
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 01 2025 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.5-1
- Update to version 6.5.5
- Drop soname patch, use new configure option --enable-librelease instead
- Unbundle yaml-cpp, using new configure option --with-yaml-cpp
- EPEL 7 EOL specfile cleanup
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 6.5.4-7
- Rebuilt for Python 3.13
* Mon Jun 03 2024 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.4-6
- Eliminate use of obsolete patchN syntax
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 6.5.4-2
- Rebuilt for Python 3.12
* Mon Mar 13 2023 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.4-1
- Update to version 6.5.4
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.4.0-3
- Rebuilt for Python 3.11
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Dec 19 2021 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.4.0-1
- Update to version 6.4.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.3.0-3
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Aug 23 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.3.0-1
- Update to version 6.3.0
- Drop patch lhapdf-cython-configure.patch (previously backported)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 6.2.1-10
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 6.2.1-8
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 6.2.1-6
- Rebuilt to change main python from 3.4 to 3.6
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
@ -273,7 +345,7 @@ rm examples/Makefile*
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jul 6 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.1-12
* Mon Jul 06 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.1-12
- Rebuild for octave 4.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-11

View file

@ -1 +1,4 @@
SHA512 (LHAPDF-6.2.1.tar.gz) = 158ded21a91eee55e1d1c99e6674a4bf588d976d6379bc417416e4c7840ed83f0b93abe68d2999a7a054a9f1e93d5f7a4c0a43ef496e113e6a8f9c6992deb41b
SHA512 (LHAPDF-6.5.6.tar.gz) = 03cf1c848b127d76ab6f13b852743827c00ae9312721dcd1fd17a9d9d88fa50e5f004fcf2fa1b23d15a0b2c30515d5f2a5e2bee85e67be5c675864bdc364ca78
SHA512 (CT10nlo.tar.gz) = 64c1ae32380a8e8ae647bdd79a63bdb252540777f802bebf003d20ec3e7532370601619a85f6fd872f7d0e39e1a1f66ea96fcd4b9179e1f23e27d533906af493
SHA512 (MSTW2008nlo68cl.tar.gz) = 4bf44b96363c91cb85f298d139b356ed4111c842476f02b44efac18710e4ca168691d0cbb5222839b0d219ccb264e387fc8ac93a689f5d0981fed9478f45749b
SHA512 (NNPDF31_lo_as_0130.tar.gz) = 7f2ef921e8ddd938438978383778c5e7538105c78defe34abfe6212a480da9ccdfedbec30174f0aed18576a3c3fc03866bc22b329667b41f2896dfb3814d9d1a

45
testunc.py Executable file
View file

@ -0,0 +1,45 @@
#! /usr/bin/env python3
import lhapdf
print("Version:", lhapdf.version())
print()
#pdfset = lhapdf.getPDFSet("CT10nlo")
pdfset = lhapdf.getPDFSet("NNPDF31_lo_as_0130")
print(pdfset)
print("m_t =", pdfset.get_entry("MTop", 123.4))
print()
pdfs = pdfset.mkPDFs()
print()
xfs_g = [pdfs[k].xfxQ(21, 1e-4, 100.) for k in range(pdfset.size)]
print("Gluon PDFs at x = 0.001, Q = 100 GeV:", xfs_g)
print()
for alt_ci_method in [True,False]:
print(f"Using alt (asymm) CI calculation = {alt_ci_method}")
u = pdfset.uncertainty(xfs_g, 95., alt_ci_method)
print(u)
print(u.central)
print(" + ", u.errplus)
print(" - ", u.errminus)
print(" +-", u.errsymm)
print()
#import numpy as np
#for cl in np.linspace(0.0, 1.0, 20):
xfmin, xfmax = min(xfs_g), max(xfs_g)
print("Range =", xfmax - xfmin)
for i in range(11):
cl = i/10
print(f"CL = {cl:0.2f} -> CI = {pdfset.uncertainty(xfs_g, 100*cl, True).errsymm:0.2f}")
print(f" ... last interval should equal half-range = {(xfmax - xfmin)/2:0.2f}")
print()
e = pdfset.errorInfo
print(e)
print()
# pdf = lhapdf.mkPDF("CT10/0")
# print(pdf)