d82fc40
%global modname attrs
d82fc40
d82fc40
Name:           python-attrs
f7fdd09
Version:        17.4.0
6fd4838
Release:        3%{?dist}
d82fc40
Summary:        Python attributes without boilerplate
d82fc40
d82fc40
License:        MIT
f7fdd09
URL:            http://www.attrs.org/
d82fc40
BuildArch:      noarch
d82fc40
Source0:        https://github.com/hynek/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz
d82fc40
d82fc40
5377013
BuildRequires:  python-devel
5377013
BuildRequires:  python-setuptools
d82fc40
%if 0%{?rhel} && 0%{?rhel} <= 7
26a7b1d
# Can't run tests on EPEL7 due to need for pytest >= 2.8
d82fc40
%else
5377013
BuildRequires:  python2-devel
5377013
BuildRequires:  python2-setuptools
5377013
BuildRequires:  python2-pytest
5377013
BuildRequires:  python2-hypothesis
5377013
BuildRequires:  python2-six
5377013
BuildRequires:  python-zope-interface
d82fc40
%endif
d82fc40
26a7b1d
BuildRequires:  python%{python3_pkgversion}-devel
26a7b1d
BuildRequires:  python%{python3_pkgversion}-setuptools
26a7b1d
%if 0%{?rhel} && 0%{?rhel} <= 7
26a7b1d
# can't run tests on EPEL7 because we don't yet have python3x-zope-interface
26a7b1d
%else
1d0624f
BuildRequires:  python%{python3_pkgversion}-pytest
1d0624f
BuildRequires:  python%{python3_pkgversion}-hypothesis
5377013
BuildRequires:  python%{python3_pkgversion}-six
1d0624f
BuildRequires:  python%{python3_pkgversion}-zope-interface
26a7b1d
%endif
d82fc40
d82fc40
%description
d82fc40
attrs is an MIT-licensed Python package with class decorators that
d82fc40
ease the chores of implementing the most common attribute-related
d82fc40
object protocols.
d82fc40
d82fc40
%package -n python2-%{modname}
d82fc40
Summary:        %{summary}
d82fc40
%{?python_provide:%python_provide python2-%{modname}}
d82fc40
d82fc40
%description -n python2-%{modname}
d82fc40
attrs is an MIT-licensed Python package with class decorators that
d82fc40
ease the chores of implementing the most common attribute-related
d82fc40
object protocols.
d82fc40
d82fc40
%package -n python%{python3_pkgversion}-%{modname}
d82fc40
Summary:        %{summary}
26a7b1d
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
d82fc40
26a7b1d
%description -n python%{python3_pkgversion}-%{modname}
d82fc40
attrs is an MIT-licensed Python package with class decorators that
d82fc40
ease the chores of implementing the most common attribute-related
d82fc40
object protocols.
d82fc40
d82fc40
%prep
d82fc40
%setup -q -n %{modname}-%{version}
d82fc40
d82fc40
%build
d82fc40
%py2_build
d82fc40
%py3_build
d82fc40
d82fc40
%install
d82fc40
# Doesn't install anything to /usr/bin, so I don't think the order of
d82fc40
# installing python2 and python3 actually matters.
d82fc40
%py3_install
d82fc40
%py2_install
d82fc40
d82fc40
%check
d82fc40
%if 0%{?rhel} && 0%{?rhel} <= 7
d82fc40
# Can't run tests on EPEL7 due to need for pytest >= 2.8
d82fc40
%else
d82fc40
PYTHONPATH=%{buildroot}/%{python2_sitelib} py.test-2.7 -v
1d0624f
PYTHONPATH=%{buildroot}/%{python3_sitelib} py.test-3 -v
d82fc40
%endif
d82fc40
d82fc40
%files -n python2-%{modname}
d82fc40
%license LICENSE
d82fc40
%doc AUTHORS.rst README.rst
d82fc40
%{python2_sitelib}/*
d82fc40
26a7b1d
%files -n python%{python3_pkgversion}-%{modname}
d82fc40
%license LICENSE
d82fc40
%doc AUTHORS.rst README.rst
d82fc40
%{python3_sitelib}/*
d82fc40
d82fc40
%changelog
6fd4838
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.4.0-3
6fd4838
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6fd4838
5377013
* Wed Jan 17 2018 Eric Smith <brouhaha@fedoraproject.org> 17.4.0-2
5377013
- Added BuildRequires for python<n>-six.
5377013
f7fdd09
* Thu Jan 11 2018 Eric Smith <brouhaha@fedoraproject.org> 17.4.0-1
f7fdd09
- Updated to latest upstream.
f7fdd09
64e1ff8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.3.0-3
64e1ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
64e1ff8
8c01ca9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.3.0-2
8c01ca9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8c01ca9
a144eb9
* Wed Dec 14 2016 Eric Smith <brouhaha@fedoraproject.org> 16.3.0-1
a144eb9
- Updated to latest upstream.
a144eb9
1d0624f
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.1.0-3
1d0624f
- Enable tests
1d0624f
eb8d456
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.1.0-2
eb8d456
- Rebuild for Python 3.6
eb8d456
- Disable python3 tests for now
eb8d456
ccc53bb
* Sat Sep 10 2016 Eric Smith <brouhaha@fedoraproject.org> 16.1.0-1
ccc53bb
- Updated to latest upstream.
ccc53bb
- Removed patch, no longer necessary.
ccc53bb
- Removed "with python3" conditionals.
ccc53bb
26a7b1d
* Thu Aug 18 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-6
26a7b1d
- Build for Python 3.4 in EPEL7.
26a7b1d
d82fc40
* Thu Aug 18 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-5
d82fc40
- Updated based on Fedora package review (#1366878).
d82fc40
- Fix check section, though tests can not be run for EPEL7.
d82fc40
- Add patch to skip two tests with keyword collisions.
d82fc40
d82fc40
* Tue Aug 16 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-4
d82fc40
- Fix python2 BuildRequires.
d82fc40
d82fc40
* Mon Aug 15 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-3
d82fc40
- Updated based on Fedora package review (#1366878).
d82fc40
d82fc40
* Sun Aug 14 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-2
d82fc40
- Updated based on Fedora package review (#1366878).
d82fc40
d82fc40
* Sat Aug 13 2016 Eric Smith <brouhaha@fedoraproject.org> 16.0.0-1
d82fc40
- Initial version.