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