%global srcname django-ipware %global eggname %(n=%{srcname}; echo ${n//-/_}) %global modname ipware Name: python-%{srcname} Version: 1.1.5 Release: 1%{?dist} Summary: Returns user's real IP address in Django License: BSD URL: https://github.com/un33k/django-ipware Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch %global _description \ Django utility application that returns client's real IP address. %description %{_description} %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} %{_description} 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} %{_description} Python 3 version. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} manage.py test -v 3 %{__python3} manage.py test -v 3 %files -n python2-%{srcname} %license LICENSE.md %doc README.md %{python2_sitelib}/%{eggname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %files -n python3-%{srcname} %license LICENSE.md %doc README.md %{python3_sitelib}/%{eggname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %changelog * Fri Aug 26 2016 Igor Gnatenko - 1.1.5-1 - Initial package