%global modname attrs %if 0%{?rhel} && 0%{?rhel} <= 7 # Can't run tests on EPEL7 due to need for pytest >= 2.8 %bcond_with tests %else # Turn the tests off when bootstrapping Python, because pytest requires attrs %bcond_without tests %endif Name: python-attrs Version: 19.1.0 Release: 1%{?dist} Summary: Python attributes without boilerplate License: MIT URL: http://www.attrs.org/ BuildArch: noarch Source0: https://github.com/hynek/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-hypothesis BuildRequires: python%{python3_pkgversion}-six BuildRequires: python%{python3_pkgversion}-zope-interface %endif %description attrs is an MIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols. %package -n python%{python3_pkgversion}-%{modname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} %description -n python%{python3_pkgversion}-%{modname} attrs is an MIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols. %prep %setup -q -n %{modname}-%{version} %build %py3_build %install %py3_install # disable tests # fails with: TypeError: attrib() got an unexpected keyword argument 'convert' # seems pytest requires attrs that we're trying to build # https://stackoverflow.com/questions/58189683/typeerror-attrib-got-an-unexpected-keyword-argument-convert #%if %{with tests} #%check #PYTHONPATH=%{buildroot}/%{python3_sitelib} py.test-3 -v #%endif %files -n python%{python3_pkgversion}-%{modname} %license LICENSE %doc AUTHORS.rst README.rst %{python3_sitelib}/* %changelog * Thu Jun 11 2020 Marc Dequènes (Duck) - 19.1.0-1 - Revert to 19.1.0 to match Python 3.6 pytest (previous changelog entries removed but Python 2 removal kept) see https://stackoverflow.com/questions/58189683/typeerror-attrib-got-an-unexpected-keyword-argument-convert * Mon Feb 25 2019 Eric Smith 18.2.0-1 - Updated to latest upstream. * Sat Feb 02 2019 Fedora Release Engineering - 17.4.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 17.4.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Sun Jun 17 2018 Miro Hrončok - 17.4.0-6 - Rebuilt for Python 3.7 * Thu Jun 14 2018 Miro Hrončok - 17.4.0-5 - Bootstrap for Python 3.7 * Wed Feb 21 2018 Iryna Shcherbina - 17.4.0-4 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 17.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jan 17 2018 Eric Smith 17.4.0-2 - Added BuildRequires for python-six. * Thu Jan 11 2018 Eric Smith 17.4.0-1 - Updated to latest upstream. * Thu Jul 27 2017 Fedora Release Engineering - 16.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 16.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Dec 14 2016 Eric Smith 16.3.0-1 - Updated to latest upstream. * Tue Dec 13 2016 Charalampos Stratakis - 16.1.0-3 - Enable tests * Mon Dec 12 2016 Charalampos Stratakis - 16.1.0-2 - Rebuild for Python 3.6 - Disable python3 tests for now * Sat Sep 10 2016 Eric Smith 16.1.0-1 - Updated to latest upstream. - Removed patch, no longer necessary. - Removed "with python3" conditionals. * Thu Aug 18 2016 Eric Smith 16.0.0-6 - Build for Python 3.4 in EPEL7. * Thu Aug 18 2016 Eric Smith 16.0.0-5 - Updated based on Fedora package review (#1366878). - Fix check section, though tests can not be run for EPEL7. - Add patch to skip two tests with keyword collisions. * Tue Aug 16 2016 Eric Smith 16.0.0-4 - Fix python2 BuildRequires. * Mon Aug 15 2016 Eric Smith 16.0.0-3 - Updated based on Fedora package review (#1366878). * Sun Aug 14 2016 Eric Smith 16.0.0-2 - Updated based on Fedora package review (#1366878). * Sat Aug 13 2016 Eric Smith 16.0.0-1 - Initial version.