File python-pssalib.spec of Package python-PSSAlib

#
# spec file for package python-pypssalib
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?sle15_python_module_pythons}
Name:           python-pssalib
Version:        0.1.0.dev7
Release:        0
Summary:        Python bindings for pSSAlib
License:        BSD-3-Clause AND LGPL-3.0-only
URL:            https://github.com/breezerider/pypssalib
Source0:        https://test-files.pythonhosted.org/packages/source/p/pypssalib/pypssalib-%{version}.tar.gz
Source1:        https://github.com/breezerider/pSSAlib/archive/refs/tags/v2.1.4.tar.gz#/pSSAlib-2.1.4.tar.gz
Patch0:         fix-build.patch
BuildRequires:  python-rpm-macros
BuildRequires:  cmake >= 3.15
BuildRequires:  make
BuildRequires:  ninja
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  gcc-c++
BuildRequires:  gsl-devel
BuildRequires:  boost-devel >= 1.56
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module pybind11-devel >= 2.6.1}
BuildRequires:  %{python_module setuptools >= 61.0}
BuildRequires:  %{python_module wheel}
# SECTION test requirements
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module numpy}
# /SECTION
BuildRequires:  fdupes
Requires:       gsl
Requires:       python-numpy
# Suggests:       python-ReportLab >= 1.2
# Suggests:       python-RXP
# Suggests:       python-docutils >= 0.3
# Suggests:       python-pack == 1.1
%python_subpackages

%description
Python bindings for pSSAlib

%prep
%autosetup -p1 -n pypssalib-%{version} -a1

%build
export CFLAGS="%{optflags}"
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%check
%pytest_arch -v

%files %{python_files}
%doc AUTHORS.rst CHANGELOG.rst README.rst
%license LICENSE
%{python_sitearch}/pypssalib.cpython-*.so
%{python_sitearch}/pypssalib-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by