%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name python-json-logger # Missing license file and tests # https://github.com/madzak/python-json-logger/issues/50 Name: python-json-logger Version: 0.1.7 Release: 1%{?dist} Summary: A python library adding a json log formatter License: BSD URL: http://github.com/madzak/python-json-logger Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description A python library adding a json log formatter %package -n python2-json-logger Summary: A python library adding a json log formatter %{?python_provide:%python_provide python2-json-logger} BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-setuptools %description -n python2-json-logger A python library adding a json log formatter %if 0%{?with_python3} %package -n python3-json-logger Summary: A python library adding a json log formatter %{?python_provide:%python_provide python3-json-logger} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-setuptools %description -n python3-json-logger A python library adding a json log formatter %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %if 0%{?with_python3} %py3_install %endif %py2_install #%check #%{__python2} setup.py test #%if 0%{?with_python3} #%{__python3} setup.py test #%endif %files -n python2-json-logger %{python2_sitelib}/pythonjsonlogger %{python2_sitelib}/python_json_logger-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-json-logger %{python3_sitelib}/pythonjsonlogger %{python3_sitelib}/python_json_logger-%{version}-py?.?.egg-info %endif %changelog * Mon Jun 12 2017 Haïkel Guémar - 0.1.7-1 - Initial package.