eb41f4
%global modname attrs
eb41f4
eb41f4
Name:           python-attrs
eb41f4
Version:        17.4.0
eb41f4
Release:        6%{?dist}
eb41f4
Summary:        Python attributes without boilerplate
eb41f4
eb41f4
License:        MIT
eb41f4
URL:            http://www.attrs.org/
eb41f4
BuildArch:      noarch
eb41f4
Source0:        https://github.com/hynek/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz
eb41f4
eb41f4
eb41f4
BuildRequires:  python%{python3_pkgversion}-devel
eb41f4
BuildRequires:  python%{python3_pkgversion}-setuptools
eb41f4
BuildRequires:  python%{python3_pkgversion}-pytest
eb41f4
BuildRequires:  python%{python3_pkgversion}-hypothesis
eb41f4
BuildRequires:  python%{python3_pkgversion}-six
eb41f4
eb41f4
%if 0%{?rhel}
eb41f4
# can't run validator tests on EL without python-zope-interface
eb41f4
%else
eb41f4
BuildRequires:  python%{python3_pkgversion}-zope-interface
eb41f4
%endif
eb41f4
eb41f4
%description
eb41f4
attrs is an MIT-licensed Python package with class decorators that
eb41f4
ease the chores of implementing the most common attribute-related
eb41f4
object protocols.
eb41f4
eb41f4
%package -n python%{python3_pkgversion}-%{modname}
eb41f4
Summary:        %{summary}
eb41f4
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
eb41f4
eb41f4
%description -n python%{python3_pkgversion}-%{modname}
eb41f4
attrs is an MIT-licensed Python package with class decorators that
eb41f4
ease the chores of implementing the most common attribute-related
eb41f4
object protocols.
eb41f4
eb41f4
%prep
eb41f4
%setup -q -n %{modname}-%{version}
eb41f4
eb41f4
%if 0%{?rhel}
eb41f4
# can't run validator tests on EL without python-zope-interface
eb41f4
rm tests/test_validators.py
eb41f4
%endif
eb41f4
eb41f4
%build
eb41f4
%py3_build
eb41f4
eb41f4
%install
eb41f4
%py3_install
eb41f4
eb41f4
%check
eb41f4
%if 0%{?rhel} && 0%{?rhel} <= 7
eb41f4
# Can't run tests on EPEL7 due to need for pytest >= 2.8
eb41f4
%else
eb41f4
PYTHONPATH=%{buildroot}/%{python3_sitelib} py.test-3 -v
eb41f4
%endif
eb41f4
eb41f4
%files -n python%{python3_pkgversion}-%{modname}
eb41f4
%license LICENSE
eb41f4
%doc AUTHORS.rst README.rst
eb41f4
%{python3_sitelib}/*
eb41f4
eb41f4
%changelog
eb41f4
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 17.4.0-6
eb41f4
- Remove python2 subpackage
eb41f4
  https://bugzilla.redhat.com/show_bug.cgi?id=1590809
eb41f4
eb41f4
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 17.4.0-5
eb41f4
- Allow Python 2 for build
eb41f4
  see https://hurl.corp.redhat.com/rhel8-py2
eb41f4
eb41f4
* Fri Jun 22 2018 Petr Viktorin <pviktori@redhat.com> - 17.4.0-4
eb41f4
- Remove the python2-hypothesis circular build dependency
eb41f4
eb41f4
* Thu Jun 14 2018 Petr Viktorin <pviktori@redhat.com> - 17.4.0-3
eb41f4
- Remove the python-zope-interface build dependency
eb41f4
eb41f4
* Wed Jan 17 2018 Eric Smith <brouhaha@fedoraproject.org> 17.4.0-2
eb41f4
- Added BuildRequires for python<n>-six.
eb41f4
eb41f4
* Thu Jan 11 2018 Eric Smith <brouhaha@fedoraproject.org> 17.4.0-1
eb41f4
- Updated to latest upstream.
eb41f4
eb41f4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.3.0-3
eb41f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
eb41f4
eb41f4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.3.0-2
eb41f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
eb41f4
eb41f4
* Wed Dec 14 2016 Eric Smith <brouhaha@fedoraproject.org> 16.3.0-1
eb41f4
- Updated to latest upstream.
eb41f4
eb41f4
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.1.0-3
eb41f4
- Enable tests
eb41f4
eb41f4
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.1.0-2
eb41f4
- Rebuild for Python 3.6
eb41f4
- Disable python3 tests for now
eb41f4
eb41f4
* Sat Sep 10 2016 Eric Smith <brouhaha@fedoraproject.org> 16.1.0-1
eb41f4
- Updated to latest upstream.
eb41f4
- Removed patch, no longer necessary.
eb41f4
- Removed "with python3" conditionals.
eb41f4
eb41f4
* Thu Aug 18 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-6
eb41f4
- Build for Python 3.4 in EPEL7.
eb41f4
eb41f4
* Thu Aug 18 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-5
eb41f4
- Updated based on Fedora package review (#1366878).
eb41f4
- Fix check section, though tests can not be run for EPEL7.
eb41f4
- Add patch to skip two tests with keyword collisions.
eb41f4
eb41f4
* Tue Aug 16 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-4
eb41f4
- Fix python2 BuildRequires.
eb41f4
eb41f4
* Mon Aug 15 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-3
eb41f4
- Updated based on Fedora package review (#1366878).
eb41f4
eb41f4
* Sun Aug 14 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-2
eb41f4
- Updated based on Fedora package review (#1366878).
eb41f4
eb41f4
* Sat Aug 13 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-1
eb41f4
- Initial version.