# Python2 macros for EPEL %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global pypi_name gerritlib Name: python-gerritlib Version: 0.3.0 Release: 3%{?dist} Summary: Client library for accessing Gerrit License: ASL 2.0 URL: https://pypi.python.org/pypi/gerritlib Source0: https://pypi.python.org/packages/source/g/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-pbr BuildRequires: python-hacking BuildRequires: python-paramiko Requires: python-pbr Requires: python-paramiko %description A Python library for interacting with Gerrit %prep %setup -q -n %{pypi_name}-%{version} sed -i 's/\r//' LICENSE # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # We handle requirements ourselves, remove requirements.txt rm -rf requirements.txt test-requirements.txt %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %check %{__python2} setup.py test %files %doc README.rst LICENSE AUTHORS ChangeLog %{python2_sitelib}/*.egg-info %{python2_sitelib}/%{pypi_name} %changelog * Tue Feb 25 2014 Kashyap Chamarthy - 0.3.0-3 - Add Python2 macros for EPEL * Tue Feb 25 2014 Kashyap Chamarthy - 0.3.0-2 - Use %{__python2} macros instead of %{__python} (this is deprecated) * Mon Feb 24 2014 Kashyap Chamarthy - 0.3.0-1 - Initial package