%global srcname django-picklefield %global eggname %(n=%{srcname}; echo ${n//-/_}) %global modname picklefield Name: python-%{srcname} Version: 0.3.2 Release: 1%{?dist} Summary: A pickled object field for Django License: MIT URL: https://github.com/gintas/django-picklefield Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch %description %{summary}. %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-django Requires: python2-django %description -n python2-%{srcname} %{summary}. Python 2 version. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-django Requires: python3-django %description -n python3-%{srcname} %{summary}. Python 3 version. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check PYTHONPATH=%{buildroot}%{python2_sitelib}:. %{__python2} -m django test --settings test_settings %{modname} PYTHONPATH=%{buildroot}%{python3_sitelib}:. %{__python3} -m django test --settings test_settings %{modname} %files -n python2-%{srcname} %license LICENSE %doc README.rst %{python2_sitelib}/%{eggname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %files -n python3-%{srcname} %license LICENSE %doc README.rst %{python3_sitelib}/%{eggname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %changelog * Fri Aug 26 2016 Igor Gnatenko - 0.3.2-1 - Initial package