Merge branch 'master' into epel7

This commit is contained in:
Jakub Jedelsky 2018-09-04 08:49:30 +02:00
commit 7a153bdcdd
5 changed files with 114 additions and 34 deletions

2
.gitignore vendored
View file

@ -12,3 +12,5 @@
/0.5.4.tar.gz
/0.5.5.tar.gz
/0.6.14.tar.gz
/0.7.3.tar.gz
/0.7.4.tar.gz

View file

@ -1 +1 @@
SHA512 (0.6.14.tar.gz) = 8dd046eed23fdd7d88fcc971dde185edcb5d2610a01e1749e23518b9f5146f753623c28b123b86a2e0308110fdd826fea47743d1cf1139dc7527ade449339973
SHA512 (0.7.4.tar.gz) = c40614b724d580bca09b26abdb60c20d26878baee7f462ad0c53051e43071bd9eb953a07ec5c2501c7bc56914b17dc3a6f06b96d826cb5fe607fd4b5cde93081

View file

@ -1,15 +0,0 @@
diff --git a/vertica_python/vertica/column.py b/vertica_python/vertica/column.py
index cc0bb27..3266d74 100644
--- a/vertica_python/vertica/column.py
+++ b/vertica_python/vertica/column.py
@@ -5,6 +5,11 @@ from collections import namedtuple
from decimal import Decimal
from datetime import date
from datetime import datetime
+from pkg_resources import require,VersionConflict
+try:
+ require("python_dateutil>=1.5")
+except VersionConflict:
+ pass
from dateutil import parser
from vertica_python import errors

View file

@ -0,0 +1,16 @@
diff -ru vertica-python-0.7.3.orig/vertica_python/vertica/column.py vertica-python-0.7.3/vertica_python/vertica/column.py
--- vertica-python-0.7.3.orig/vertica_python/vertica/column.py 2017-06-18 22:10:16.000000000 +0200
+++ vertica-python-0.7.3/vertica_python/vertica/column.py 2017-09-25 09:31:01.837062159 +0200
@@ -5,6 +5,12 @@
from datetime import date, datetime
from decimal import Decimal
+from pkg_resources import require,VersionConflict
+try:
+ require("python_dateutil>=1.5")
+except VersionConflict:
+ pass
+
import pytz
# noinspection PyCompatibility,PyUnresolvedReferences
from builtins import str

View file

@ -1,8 +1,14 @@
%if 0%{?fedora} || 0%{?rhel} >= 7
%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
Version: 0.7.4
Release: 1%{?dist}
Summary: A native Python adapter for the Vertica database
@ -11,28 +17,58 @@ 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
BuildRequires: python-setuptools
BuildRequires: python2-setuptools
%global _description\
vertica-python is a native Python adapter for the Vertica\
(http://www.vertica.com) database.\
%description %_description
%package -n python2-vertica
Summary: %summary
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: python-dateutil15
Requires: python-setuptools
%else
Requires: python-dateutil >= 1.5
Requires: python2-dateutil >= 1.5
%endif
Requires: pytz
Requires: python-psycopg2
Requires: python2-pytz
Requires: python2-psycopg2
Requires: python2-future
%{?python_provide:%python_provide python2-vertica}
# Remove before F30
Provides: vertica-python = %{version}-%{release}
Obsoletes: vertica-python < %{version}-%{release}
%description -n python2-vertica %_description
%description
vertica-python is a native Python adapter for the Vertica
(http://www.vertica.com) database.
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-vertica
Summary: %summary
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-dateutil >= 1.5
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-pytz
Requires: python%{python3_pkgversion}-psycopg2
Requires: python%{python3_pkgversion}-future
%{?python_provide:%python_provide python%{python3_pkgversion}-vertica}
# Remove before F30
Provides: vertica-python%{python3_pkgversion} = %{version}-%{release}
Obsoletes: vertica-python%{python3_pkgversion} < %{version}-%{release}
%description -n python%{python3_pkgversion}-vertica %_description
%endif
%prep
@ -42,25 +78,66 @@ vertica-python is a native Python adapter for the Vertica
%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
%doc README.md LICENSE
%files -n python2-vertica
%license LICENSE
%doc README.md
%{python2_sitelib}/*.egg-info
%dir %{python2_sitelib}/vertica_python
%{python2_sitelib}/vertica_python/*
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-vertica
%license LICENSE
%doc README.md
%{python3_sitelib}/*.egg-info
%dir %{python3_sitelib}/vertica_python
%{python3_sitelib}/vertica_python/*
%endif
%changelog
* Mon Sep 03 2018 Jakub Jedelsky <jakub.jedelsky@gmail.com> - 0.7.4-1
- Upgrade to version 0.7.4
- Build python 3 subpackage even on RHEL >= 7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.3-2
- Rebuilt for Python 3.7
* 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)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.14-3
- Python 2 binary package renamed to python2-vertica
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Apr 21 2017 Jakub Jedelsky <jakub.jedelsky@gmail.com> - 0.6.14-1
- Update to version 0.6.14