diff --git a/python-pg8000.spec b/python-pg8000.spec index 9d45cf7..4a07ac0 100644 --- a/python-pg8000.spec +++ b/python-pg8000.spec @@ -1,8 +1,13 @@ +%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 pg8000 Name: python-%{pypi} Version: 1.10.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Pure Python PostgreSQL Driver License: BSD URL: http://pythonhosted.org/pg8000/ @@ -23,6 +28,7 @@ BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-six Requires: python-six +Provides: python-pg8000 %{?python_provide:%python_provide python2-%{pypi}} %description -n python2-%{pypi} @@ -35,10 +41,10 @@ Frontend Protocol. %patch1 %build -%py2_build +CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %install -%py2_install +%{__python2} setup.py install --skip-build --root %{buildroot} %check #Test requires a runing PostgreSQL instance @@ -49,6 +55,9 @@ Frontend Protocol. %{python2_sitelib}/* %changelog +* Wed Feb 10 2016 William Moreno - 1.10.3-4 +- Adjust spect to epel6 packaging + * Wed Feb 10 2016 William Moreno - 1.10.3-3 - Remove python3 subpackage in epel7