14
0
forked from pool/python-wrapt
Files
python-wrapt/python-wrapt.spec

83 lines
2.7 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-wrapt
#
Accepting request 1249203 from home:glaubitz:branches:devel:languages:python - Update to 1.17.2 * Added universal binary wheels for macOS. That is, contains both x86_64 and arm64 architectures in the same wheel. - from version 1.17.1 * Due to GitHub actions changes, binary wheels were missing for macOS Intel. * Not implemented error for __reduce__() on ObjectProxy was incorrectly displaying the error as being on __reduce_ex__(). - from version 1.17.0 * Add __format__() method to ObjectProxy class to allow formatting of wrapped object. * Added C extension internal flag to indicate that wrapt should be safe for Python 3.13 free threading mode. Releases will include free threading variants of Python wheels. Note that as free threading is new, one should be cautious about using it in production until it has been more widely tested. * When a normal function or builtin function which had wrapt.decorator or a function wrapper applied, was assigned as a class attribute, and the function attribute called via the class or an instance of the class, an additional argument was being passed, inserted as the first argument, which was the class or instance. This was not the correct behaviour and the class or instance should not have been passed as the first argument. * When an instance of a callable class object was wrapped which didn’t not have a __get__() method for binding, and it was called in context where binding would be attempted, it would fail with error that __get__() did not exist when instead it should have been called directly, ignoring that binding was not possible. * The __round__ hook for the object proxy didn’t accept ndigits argument. - Drop py313-classmethods.patch, merged upstream OBS-URL: https://build.opensuse.org/request/show/1249203 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wrapt?expand=0&rev=39
2025-02-28 14:24:50 +00:00
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# 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-wrapt
Accepting request 1249203 from home:glaubitz:branches:devel:languages:python - Update to 1.17.2 * Added universal binary wheels for macOS. That is, contains both x86_64 and arm64 architectures in the same wheel. - from version 1.17.1 * Due to GitHub actions changes, binary wheels were missing for macOS Intel. * Not implemented error for __reduce__() on ObjectProxy was incorrectly displaying the error as being on __reduce_ex__(). - from version 1.17.0 * Add __format__() method to ObjectProxy class to allow formatting of wrapped object. * Added C extension internal flag to indicate that wrapt should be safe for Python 3.13 free threading mode. Releases will include free threading variants of Python wheels. Note that as free threading is new, one should be cautious about using it in production until it has been more widely tested. * When a normal function or builtin function which had wrapt.decorator or a function wrapper applied, was assigned as a class attribute, and the function attribute called via the class or an instance of the class, an additional argument was being passed, inserted as the first argument, which was the class or instance. This was not the correct behaviour and the class or instance should not have been passed as the first argument. * When an instance of a callable class object was wrapped which didn’t not have a __get__() method for binding, and it was called in context where binding would be attempted, it would fail with error that __get__() did not exist when instead it should have been called directly, ignoring that binding was not possible. * The __round__ hook for the object proxy didn’t accept ndigits argument. - Drop py313-classmethods.patch, merged upstream OBS-URL: https://build.opensuse.org/request/show/1249203 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wrapt?expand=0&rev=39
2025-02-28 14:24:50 +00:00
Version: 1.17.2
Release: 0
Summary: A Python module for decorators, wrappers and monkey patching
License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/GrahamDumpleton/wrapt
Source: https://github.com/GrahamDumpleton/wrapt/archive/%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%python_subpackages
%description
The aim of the **wrapt** module is to provide a transparent object proxy
for Python, which can be used as the basis for the construction of function
wrappers and decorator functions.
The **wrapt** module focuses very much on correctness. It therefore goes
way beyond existing mechanisms such as ``functools.wraps()`` to ensure that
decorators preserve introspectability, signatures, type checking abilities
etc. The decorators that can be constructed using this module will work in
far more scenarios than typical decorators and provide more predictable and
consistent behaviour.
To ensure that the overhead is as minimal as possible, a C extension module
is used for performance critical components. An automatic fallback to a
pure Python implementation is also provided where a target system does not
have a compiler to allow the C extension to be compiled.
Documentation
-------------
For further information on the **wrapt** module see:
* http://wrapt.readthedocs.org/
%prep
%autosetup -p1 -n wrapt-%{version}
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch
%files %{python_files}
%license LICENSE
%doc README.rst docs/changes.rst
%{python_sitearch}/wrapt
%{python_sitearch}/wrapt-%{version}.dist-info
%changelog