|
|
32db2e |
%global __python3 /usr/bin/python3.11
|
|
|
32db2e |
%global python3_pkgversion 3.11
|
|
|
32db2e |
|
|
|
32db2e |
%global modname attrs
|
|
|
32db2e |
|
|
|
32db2e |
%if 0%{?rhel} && 0%{?rhel} <= 9
|
|
|
32db2e |
# Can't run tests on RHEL9 due to the need for hypothesis and zope-interface
|
|
|
32db2e |
%bcond_with tests
|
|
|
32db2e |
%else
|
|
|
32db2e |
# Turn the tests off when bootstrapping Python, because pytest requires attrs
|
|
|
32db2e |
%bcond_without tests
|
|
|
32db2e |
%endif
|
|
|
32db2e |
|
|
|
32db2e |
Name: python%{python3_pkgversion}-attrs
|
|
|
32db2e |
Version: 22.1.0
|
|
|
32db2e |
Release: 1%{?dist}
|
|
|
32db2e |
Summary: Python attributes without boilerplate
|
|
|
32db2e |
|
|
|
32db2e |
License: MIT
|
|
|
32db2e |
URL: http://www.attrs.org/
|
|
|
32db2e |
BuildArch: noarch
|
|
|
32db2e |
Source0: https://github.com/hynek/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz
|
|
|
32db2e |
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
32db2e |
%if %{with tests}
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-hypothesis
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-six
|
|
|
32db2e |
BuildRequires: python%{python3_pkgversion}-zope-interface
|
|
|
32db2e |
%endif
|
|
|
32db2e |
|
|
|
32db2e |
|
|
|
32db2e |
%description -n python%{python3_pkgversion}-%{modname}
|
|
|
32db2e |
attrs is an MIT-licensed Python package with class decorators that
|
|
|
32db2e |
ease the chores of implementing the most common attribute-related
|
|
|
32db2e |
object protocols.
|
|
|
32db2e |
|
|
|
32db2e |
%prep
|
|
|
32db2e |
%setup -q -n %{modname}-%{version}
|
|
|
32db2e |
|
|
|
32db2e |
%build
|
|
|
32db2e |
%py3_build
|
|
|
32db2e |
|
|
|
32db2e |
%install
|
|
|
32db2e |
%py3_install
|
|
|
32db2e |
|
|
|
32db2e |
%if %{with tests}
|
|
|
32db2e |
%check
|
|
|
32db2e |
PYTHONPATH=%{buildroot}/%{python3_sitelib} py.test-%{python3_pkgversion} -v
|
|
|
32db2e |
%endif
|
|
|
32db2e |
|
|
|
32db2e |
%files
|
|
|
32db2e |
%license LICENSE
|
|
|
32db2e |
%doc AUTHORS.rst README.rst
|
|
|
32db2e |
%{python3_sitelib}/*
|
|
|
32db2e |
|
|
|
32db2e |
%changelog
|
|
|
32db2e |
* Wed Oct 19 2022 Charalampos Stratakis <cstratak@redhat.com> - 22.1.0-1
|
|
|
32db2e |
- Initial package
|
|
|
32db2e |
- Fedora contributions by:
|
|
|
32db2e |
Lumir Balhar <lbalhar@redhat.com>
|
|
|
32db2e |
Miro HronĨok <miro@hroncok.cz>
|
|
|
32db2e |
Tomas Hrnciar <thrnciar@redhat.com>
|