%if 0%{?rhel} && 0%{?rhel} < 7 %bcond_with python3 %else %bcond_without python3 %endif Summary: Python Microformats2 parser Name: mf2py Version: 1.1.1 Release: 1%{dist} Source0: https://github.com/microformats/%{name}/archive/%{version}/%{name}-%{version}.tar.gz License: MIT Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Tom Morris Url: http://microformats.org/wiki/mf2py %description the microformats2 parser for Python. %package -n python2-mf2py Summary: Python2 Microformats2 parser BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-beautifulsoup4 >= 4.6.0 Requires: python2-html5lib >= 1.0.1 Requires: python2-requests >= 2.18.4 %description -n python2-mf2py The microformats2 parser for Python2 %if %{with python3} %package -n python%{python3_pkgversion}-mf2py Requires: python%{python3_pkgversion}-beautifulsoup4 >= 4.6.0 Requires: python%{python3_pkgversion}-html5lib >= 1.0.1 Requires: python%{python3_pkgversion}-requests >= 2.18.4 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools Summary: Python3 Microformats2 parser %description -n python%{python3_pkgversion}-mf2py The microformats2 parser for Python3 %endif # with python3 %prep %setup -q -n %{name}-%{version} %build %py2_build %if %{with python3} %py3_build %endif # with python3 %install %py2_install %if %{with python3} %py3_install %endif # with python3 %clean rm -rf $RPM_BUILD_ROOT %files -n python2-%{name} %{!?_licensedir:%global license %doc} %doc README.md %license LICENSE %{python2_sitelib}/%{name}/* %{python2_sitelib}/%{name}-%{version}-py?.?.egg-info/* %if %{with python3} %files -n python%{python3_pkgversion}-%{name} %doc README.md %license LICENSE %{python3_sitelib}/%{name}/* %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info/* %endif # with python3 %changelog * Mon Jul 23 2018 Jiri Kastner - 1.1.1-1 - initial package