Update to version 0.7.3 including Python 3 subpackage

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1482977

Patch0 is replaced by the the newer version [https://bugzilla.redhat.com/attachment.cgi?id=1330449] because the original source code had been modified.

Patch1 is not required any more because the source code has already been fixed [4ba7fad400].
This commit is contained in:
Jan Beran 2018-03-27 07:50:37 +00:00
commit f43c0926b4

View file

@ -1,9 +1,15 @@
%if 0%{?fedora}
%global with_python3 1
%endif
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root $RPM_BUILD_ROOT}}
Name: vertica-python
Version: 0.6.14
Release: 5%{?dist}
Version: 0.7.3
Release: 1%{?dist}
Summary: A native Python adapter for the Vertica database
Group: Development/Languages
@ -11,8 +17,7 @@ License: MIT
URL: https://github.com/uber/vertica-python
Source0: https://github.com/uber/vertica-python/archive/%{version}.tar.gz
# EPEL 6 patch
Patch0: vertica-python-0.2.0-dateutil15.patch
Patch1: vertica-python-0.5.0-crypt_windows.patch
Patch0: vertica-python-0.7.3-dateutil15.patch
BuildArch: noarch
BuildRequires: python2-devel
@ -45,6 +50,24 @@ Obsoletes: vertica-python < %{version}-%{release}
%description -n python2-vertica %_description
%if 0%{?with_python3}
%package -n python3-vertica
Summary: %summary
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-dateutil >= 1.5
Requires: python3-setuptools
Requires: python3-pytz
Requires: python3-psycopg2
Requires: python3-future
%{?python_provide:%python_provide python3-vertica}
%description -n python3-vertica %_description
%endif
%prep
%setup -q -n vertica-python-%{version}
@ -52,25 +75,42 @@ Obsoletes: vertica-python < %{version}-%{release}
%patch0 -p1
%endif
%patch1 -p1
%build
%{__python2} setup.py build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
%files -n python2-vertica
%doc README.md LICENSE
%license LICENSE
%doc README.md
%{python2_sitelib}/*.egg-info
%dir %{python2_sitelib}/vertica_python
%{python2_sitelib}/vertica_python/*
%if 0%{?with_python3}
%files -n python3-vertica
%license LICENSE
%doc README.md
%{python3_sitelib}/*.egg-info
%dir %{python3_sitelib}/vertica_python
%{python3_sitelib}/vertica_python/*
%endif
%changelog
* Tue Mar 27 2018 Jan Beran <jberan@redhat.com> - 0.7.3-1
- Update to version 0.7.3 including Python 3 subpackage
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.14-5
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)