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