%global srcname marcel %global commit db5a57a4ffc9b12de3fd12dbfab6c25e485e8c7f %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: python-%{srcname} Version: 0.1 Release: 0.20181218git%{shortcommit}%{?dist} Summary: The french Docker License: GPLv2+ URL: https://github.com/brouberol/marcel Source0: https://github.com/brouberol/marcel/archive/master.zip BuildArch: noarch %if 0%{?fedora} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest-cov %endif BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest-cov Provides: %{srcname} = %{version}-%{release} %if 0%{?fedora} Provides: python3-%{srcname} = %{version}-%{release} %else Provides: python2-%{srcname} = %{version}-%{release} %endif %description %{summary}. %if 0%{?fedora} %package -n python2-%{srcname} Summary: %{summary} Provides: python-%{srcname} = %{version}-%{release} Provides: %{srcname} = %{version}-%{release} %description -n python2-%{srcname} %{summary}. %endif %prep %autosetup -n %{srcname}-master %build %py2_build %if 0%{?fedora} %py3_build %endif %install %py2_install %if 0%{?fedora} %py3_install %endif %check %{__python2} setup.py test %if 0%{?fedora} %{__python3} setup.py test %endif %if 0%{?fedora} %files -n python2-%{srcname} %{!?_licensedir:%global license %doc} %doc README.md LISEZ-MOI.md examples/Recette* logo.png #%license COPYING %{python2_sitelib}/* %endif %files %doc README.md LISEZ-MOI.md examples/Recette* logo.png #%license COPYING %if 0%{?fedora} %{python3_sitelib}/* %else %{python2_sitelib}/* %endif %{_bindir}/%{srcname} %changelog * Tue Dec 18 2018 Didier Fabert - 0.1-0.20181218gitdb5a57a - Initial build