2018-04-20 10:14:22 +02:00
|
|
|
#
|
2024-01-26 22:22:34 +01:00
|
|
|
# spec file for package python-pyfakefs
|
2018-04-20 10:14:22 +02:00
|
|
|
#
|
2024-01-26 22:22:34 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-04-20 10:14:22 +02: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.
|
|
|
|
|
2018-10-23 08:43:56 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-04-20 10:14:22 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-03-08 04:37:02 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-21 15:24:54 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2020-03-08 04:37:02 +01:00
|
|
|
Name: python-pyfakefs%{psuffix}
|
2024-04-21 10:46:24 +02:00
|
|
|
Version: 5.4.1
|
2018-04-20 10:14:22 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Fake file system that mocks the Python file system modules
|
|
|
|
License: Apache-2.0
|
2019-10-07 10:56:22 +02:00
|
|
|
URL: https://github.com/jmcgeheeiv/pyfakefs
|
2020-03-08 04:37:02 +01:00
|
|
|
Source: https://github.com/jmcgeheeiv/pyfakefs/archive/v%{version}.tar.gz#/python-pyfakefs-%{version}.tar.gz
|
2018-04-20 10:14:22 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-12-11 09:45:30 +01:00
|
|
|
Requires: python
|
2018-04-20 10:14:22 +02:00
|
|
|
BuildArch: noarch
|
2020-03-08 04:37:02 +01:00
|
|
|
%if %{with test}
|
2022-08-06 17:23:38 +02:00
|
|
|
BuildRequires: %{python_module pytest >= 3}
|
2020-03-08 04:37:02 +01:00
|
|
|
BuildRequires: %{pythons}
|
2018-11-01 11:04:53 +01:00
|
|
|
%endif
|
2018-04-20 10:14:22 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
pyfakefs implements a fake file system that mocks the Python file system
|
|
|
|
modules. Using pyfakefs, your tests operate on a fake file system in
|
|
|
|
memory without touching the real disk. The software under test requires
|
|
|
|
no modification to work with pyfakefs.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pyfakefs-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
2020-03-08 04:37:02 +01:00
|
|
|
%if !%{with test}
|
2018-04-20 10:14:22 +02:00
|
|
|
%python_install
|
2020-03-08 04:37:02 +01:00
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/pyfakefs/tests/
|
2018-04-20 10:14:22 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2020-03-08 04:37:02 +01:00
|
|
|
%endif
|
2018-04-20 10:14:22 +02:00
|
|
|
|
|
|
|
%check
|
2020-03-08 04:37:02 +01:00
|
|
|
%if %{with test}
|
2018-04-20 10:14:22 +02:00
|
|
|
export LANG=C.UTF-8
|
2020-03-08 04:37:02 +01:00
|
|
|
%python_expand PYTHONPATH=$(pwd) $python -m pyfakefs.tests.all_tests
|
|
|
|
%endif
|
2018-04-20 10:14:22 +02:00
|
|
|
|
2020-03-08 04:37:02 +01:00
|
|
|
%if !%{with test}
|
2018-04-20 10:14:22 +02:00
|
|
|
%files %{python_files}
|
2022-08-06 17:23:38 +02:00
|
|
|
%doc CHANGES.md README.md
|
|
|
|
%license COPYING
|
|
|
|
%{python_sitelib}/pyfakefs
|
|
|
|
%{python_sitelib}/pyfakefs-%{version}*-info
|
2020-03-08 04:37:02 +01:00
|
|
|
%endif
|
2018-04-20 10:14:22 +02:00
|
|
|
|
|
|
|
%changelog
|