%if 0%{?fedora} || 0%{?rhel} >= 8 %global build_py3 1 %endif Name: python-varlink Version: 30.1.2 Release: 1.git.334.50370c0%{?dist} Summary: Python implementation of Varlink License: ASL 2.0 URL: https://github.com/varlink/%{name} Source0: python-varlink-git-334.50370c0.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-rpm-macros BuildRequires: python-setuptools %if 0%{?build_py3} BuildRequires: python3-devel BuildRequires: python3-rpm-macros %endif %global _description \ An python module for Varlink with client and server support. %description %_description %package -n python2-varlink Summary: %summary %{?python_provide:%python_provide python2-varlink} %if 0%{?build_py3} %package -n python3-varlink Summary: %summary %{?python_provide:%python_provide python3-varlink} %endif %description -n python2-varlink %_description %if 0%{?build_py3} %description -n python3-varlink %_description %endif %prep %autosetup -n python-varlink-git-334.50370c0 -p1 %build %py2_build %if 0%{?build_py3} %py3_build %endif %if 0%{?build_py3} %check CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} check %endif %install %py2_install %if 0%{?build_py3} %py3_install %endif %files -n python2-varlink %license LICENSE.txt %doc README.md %{python2_sitelib}/* %if 0%{?build_py3} %files -n python3-varlink %license LICENSE.txt %doc README.md %{python3_sitelib}/* %endif %changelog