2020-11-19 12:20:57 +00:00
#
# spec file for package python-requre
#
2025-03-19 12:29:39 +00:00
# Copyright (c) 2025 SUSE LLC
2020-11-19 12:20:57 +00:00
#
# 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/
#
2024-02-26 16:32:50 +00:00
%{?sle15_python_module_pythons}
2020-11-19 12:20:57 +00:00
Name : python-requre
2025-03-29 09:44:04 +00:00
Version : 0.9.1
2020-11-19 12:20:57 +00:00
Release : 0
Summary : Python libray for storing and using objects for testing
License : MIT
URL : https://github.com/packit-service/requre
Source : https://files.pythonhosted.org/packages/source/r/requre/requre-%{version} .tar.gz
2024-02-26 12:43:08 +00:00
BuildRequires : %{python_module hatch_vcs}
2023-07-17 07:01:10 +00:00
BuildRequires : %{python_module pip}
BuildRequires : %{python_module wheel}
2020-11-19 12:20:57 +00:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
2022-06-16 04:31:24 +00:00
Requires : python-GitPython
2020-11-19 12:20:57 +00:00
Requires : python-PyYAML
Requires : python-click
2025-03-19 12:29:39 +00:00
Requires : python-httpx
2020-11-19 12:20:57 +00:00
Requires : python-requests
Suggests : python-pytest
2023-07-17 07:01:10 +00:00
Requires(post) : update-alternatives
2024-02-26 12:43:08 +00:00
Requires(postun) : update-alternatives
2020-11-19 12:20:57 +00:00
BuildArch : noarch
# SECTION test requirements
BuildRequires : %{python_module PyYAML}
2022-06-16 04:31:24 +00:00
BuildRequires : %{python_module GitPython}
2020-11-19 12:20:57 +00:00
BuildRequires : %{python_module click}
2025-03-19 12:29:39 +00:00
BuildRequires : %{python_module httpx}
2020-11-19 12:20:57 +00:00
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module requests}
# /SECTION
%python_subpackages
%description
Library for testing python code what allows store output of
various objects and use stored data for testing.
%prep
%setup -q -n requre-%{version}
# Remove cyclic dependency with ogr
rm tests/test_E2E_ogr.py
%build
2023-07-17 07:01:10 +00:00
%pyproject_wheel
2020-11-19 12:20:57 +00:00
%install
2023-07-17 07:01:10 +00:00
%pyproject_install
2020-11-19 12:20:57 +00:00
%python_clone -a %{buildroot} %{_bindir} /requre-patch
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%post
%python_install_alternative requre-patch
%postun
%python_uninstall_alternative requre-patch
%check
export LANG=en_US.UTF-8
2022-06-16 04:31:24 +00:00
# needs network: test_record_requests, test_online_replacing, StoreAnyRequest
# and TestWrite
2022-06-20 05:48:33 +00:00
# test_a and InstalledCommand fail
2022-06-20 06:05:09 +00:00
# Latency fails randomly on OBS slaves
%pytest -rs -k 'not (test_record_requests or test_online_replacing or StoreAnyRequest or TestWrite or (StoreFunctionOutput and test_a) or InstalledCommand or Latency)'
2020-11-19 12:20:57 +00:00
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir} /requre-patch
2023-07-17 07:01:10 +00:00
%{python_sitelib} /requre
%{python_sitelib} /requre-%{version} .dist-info
2020-11-19 12:20:57 +00:00
%changelog