# # $Id$ # # Used if virtual name != real name (perl, ...) - replace PBPKG by PBREALPKG in the line below %define srcname PBPKG %define py3 PBPY3 Summary: PBSUMMARY Name: PBREALPKG Version: PBVER Release: PBTAGPBSUF License: PBLIC Group: PBGRP Url: PBURL Source: PBREPO/PBSRC BuildArch: noarch #PBPATCHSRC Requires: PBDEP BuildRequires: PBBDEP %description PBDESC python2 version %if %py3 %package -n python3-tortilla Summary: %{summary} / Python 3 library Requires: python3-requests Requires: python3-six Requires: python3-formats Requires: python3-colorclass #BuildRequires: python3-setuptools %description -n python3-tortilla PBDESC python3 version %endif %prep %setup -q -n %{srcname}-%{version}PBEXTDIR %if %py3 cd .. cp -fr %{srcname}-%{version}PBEXTDIR python3 cd - %endif #PBPATCHCMD %build %{__python} setup.py build %if %py3 cd ../python3 %{__python3} setup.py build cd - %endif %install %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %if %py3 cd ../python3 %{__python3} setup.py install -O1 --skip-build --root %{buildroot} cd - %endif %files %doc README.rst %{python_sitelib}/* %if %py3 %files -n python3-tortilla %doc README.rst %{python3_sitelib}/* %endif %changelog PBLOG