15
0
forked from pool/python-odorik

- Add assertEquals.patch replacing assertEquals with assertEqual

(incompatible with Python 3.12).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=19
This commit is contained in:
2024-03-17 09:03:57 +00:00
committed by Git OBS Bridge
parent a17f0c2512
commit b0b60a46e1
3 changed files with 108 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-odorik
#
# Copyright (c) 2022 SUSE LLC
# 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
@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-odorik
Version: 0.5
Release: 0
@@ -24,17 +23,22 @@ Summary: Python module for Odorik API
License: GPL-3.0-or-later
URL: https://cihar.com/software/odorik/
Source: https://files.pythonhosted.org/packages/source/o/odorik/odorik-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM assertEquals.patch bsc#[0-9]+ mcepl@suse.com
# 3.12 finally removed assertEquals method
Patch0: assertEquals.patch
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module httpretty}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pyxdg}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil
Requires: python-xdg
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -42,14 +46,14 @@ BuildArch: noarch
Python module to work with Odorik API.
%prep
%setup -q -n odorik-%{version}
%autosetup -p1 -n odorik-%{version}
%build
%python_build
%pyproject_wheel
%make_build -C docs man
%install
%python_install
%pyproject_install
install -d %{buildroot}%{_mandir}/man1
install -m 644 docs/_build/man/odorik.1 %{buildroot}%{_mandir}/man1
%python_clone -a %{buildroot}%{_bindir}/odorik
@@ -68,8 +72,9 @@ install -m 644 docs/_build/man/odorik.1 %{buildroot}%{_mandir}/man1
%files %{python_files}
%license LICENSE
%doc NEWS.rst README.rst
%{python_sitelib}/*
%python_alternative %{_mandir}/man1/odorik.1%{ext_man}
%python_alternative %{_bindir}/odorik
%{python_sitelib}/odorik
%{python_sitelib}/odorik-%{version}*-info
%changelog