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