%global modname cattrs Name: python-cattrs Version: 0.6.0 Release: 1%{?dist} Summary: Python library for structuring and unstructuring data License: MIT URL: https://pypi.python.org/pypi/cattrs BuildArch: noarch Source0: https://github.com/Tinche/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-attrs >= 17.4.0 BuildRequires: python2-typing BuildRequires: python2-singledispatch BuildRequires: python2-pytest BuildRequires: python2-hypothesis BuildRequires: python2-functools32 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-attrs >= 17.4.0 BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-hypothesis %description cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes and the usual Python collections, but other kinds of classes are supported by manually registering converters. %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} %description -n python2-%{modname} cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes and the usual Python collections, but other kinds of classes are supported by manually registering converters. %package -n python%{python3_pkgversion}-%{modname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} %description -n python%{python3_pkgversion}-%{modname} cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes and the usual Python collections, but other kinds of classes are supported by manually registering converters. %prep %setup -q -n %{modname}-%{version} %build %py2_build %py3_build %install # Doesn't install anything to /usr/bin, so I don't think the order of # installing python2 and python3 actually matters. %py3_install %py2_install %check PYTHONPATH=%{buildroot}/%{python2_sitelib} py.test-2.7 -v PYTHONPATH=%{buildroot}/%{python3_sitelib} py.test-3 -v %files -n python2-%{modname} %license LICENSE %doc README.rst %{python2_sitelib}/* %files -n python%{python3_pkgversion}-%{modname} %license LICENSE %doc README.rst %{python3_sitelib}/* %changelog * Thu Jan 11 2018 Eric Smith 0.6.0-1 - Initial version.