%global srcname lightblue %if 0%{?fedora} %global with_python3 1 %endif #TODO file License issue missing in dist file upstream Name: python-lightblue Version: 0.1.3 Release: 2%{?dist} Summary: A Python library to work with Lightblue database Group: Development/Libraries License: GPLv3 URL: https://github.com/Allda/python-lightblue Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-nose %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose %endif # if with_python3 BuildArch: noarch %description A Python library to work with Lightblue database API. More lightblue information can be found at https://lightblue.io %package -n python2-%{srcname} Summary: A Python library to work with Lightblue database Requires: python-dpath Requires: python2-beanbag %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} A Python library to work with Lightblue database API. More lightblue information can be found at https://lightblue.io %if 0%{?with_python3} %package -n python3-%{srcname} Summary: A Python library to work with Lightblue database Requires: python3-dpath Requires: python3-beanbag %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} A Python library to work with Lightblue database API. More lightblue information can be found at https://lightblue.io %endif # if with_python3 %prep %autosetup # do not use rednose during rpm build sed -i 's/rednose/\#rednose/' setup.cfg %build %py2_build %if 0%{?with_python3} %py3_build %endif # if with_python3 %install %py2_install %if 0%{?with_python3} %py3_install %endif # if with_python3 %check nosetests-%{python2_version} %if 0%{?with_python3} nosetests-%{python3_version} %endif # if with_python3 %files -n python2-%{srcname} %doc README.md %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{srcname} %doc README.md %{python3_sitelib}/* %endif # if with_python3 %changelog * Tue Apr 24 2018 Stanislav Ochotnicky - 0.1.3-2 - Fix summary macro * Tue Apr 24 2018 Stanislav Ochotnicky - 0.1.3-1 - Initial version