14
0
Files
python-pyfakefs/python-pyfakefs.spec
Markéta Machová e299c21478 Accepting request 1288663 from home:glaubitz:branches:devel:languages:python
- Update to 5.9.1
  * fixed handling of added `strict` argument in Python 3.9.23
  * make sure test files are packaged (see [#1186](../../issues/1186))
- from version 5.9.0
  * the message from an `OSError` raised in the fake filesystem has no longer the postfix
    _"in the fake filesystem"_ (see [#1159](../../discussions/1159))
  * changed implementation of `FakeShutilModule` to prepare it for usage without the patcher
    (see [#1171](../../issues/1171))
  * added convenience function `add_package_metadata` to add the metadata of a given
    package to the fake filesystem (see [#1155](../../issues/1155))
  * fixed handling of dynamic imports from code in the fake filesystem in Python > 3.11
    (see [#1121](../../issues/1121))
  * fixed workaround for recursion with pytest under Windows to ignore capitalization
    of pytest executable (see [#1096](../../issues/1096))
  * added missing `mode` property to fake file wrapper (see [#1162](../../issues/1162))
  * fixed instantiation of a standalone `FakePathlibModule` for Python >= 3.11
    (see [#1169](../../issues/1169))
  * added support for new value "ALLOW_MISSING" of `strict` argument in `os.path.realpath`
    (introduced in latest patch version of Python >= 3.10, see [#1180](../../issues/1180))
  * adapt test for increased default buffer size in Python 3.14a6
  * replace session-scoped with module-scoped fixture in test,
    run pytest over all tests in docker containers
    (see [#1151](../../issues/1151))
  * remove `setup.py` and `setup.cfg` in favor of `pyproject.toml`
- Stop removing pyfakefs/tests/ directory

OBS-URL: https://build.opensuse.org/request/show/1288663
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyfakefs?expand=0&rev=56
2025-06-27 14:30:15 +00:00

81 lines
2.3 KiB
RPMSpec

#
# spec file for package python-pyfakefs
#
# Copyright (c) 2025 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-pyfakefs%{psuffix}
Version: 5.9.1
Release: 0
Summary: Fake file system that mocks the Python file system modules
License: Apache-2.0
URL: https://github.com/jmcgeheeiv/pyfakefs
Source: https://github.com/jmcgeheeiv/pyfakefs/archive/v%{version}.tar.gz#/python-pyfakefs-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module pytest >= 3}
BuildRequires: %{pythons}
%endif
%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
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
export LANG=C.UTF-8
%python_expand PYTHONPATH=$(pwd) $python -m pyfakefs.tests.all_tests
%endif
%if !%{with test}
%files %{python_files}
%doc CHANGES.md README.md
%license COPYING
%{python_sitelib}/pyfakefs
%{python_sitelib}/pyfakefs-%{version}.dist-info
%endif
%changelog