diff --git a/vertica-python.spec b/vertica-python.spec index 338c6bb..ca47149 100644 --- a/vertica-python.spec +++ b/vertica-python.spec @@ -2,22 +2,18 @@ %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: vertica-python -Version: 0.6.14 -Release: 3%{?dist} +Version: 0.7.3 +Release: 1%{?dist} Summary: A native Python adapter for the Vertica database Group: Development/Languages License: MIT URL: https://github.com/uber/vertica-python -Source0: https://github.com/uber/vertica-python/archive/%{version}.tar.gz +Source0: https://pypi.io/packages/source/v/%{name}/%{name}-%{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 - %global _description\ @@ -29,14 +25,20 @@ vertica-python is a native Python adapter for the Vertica\ %package -n python2-vertica Summary: %summary +BuildRequires: python2-devel %if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: python-setuptools Requires: python-dateutil15 Requires: python-setuptools -%else -Requires: python-dateutil >= 1.5 -%endif Requires: pytz Requires: python-psycopg2 +%else +BuildRequires: python2-setuptools +Requires: python2-dateutil >= 1.5 +Requires: python2-setuptools +Requires: python2-pytz +Requires: python2-psycopg2 +%endif Requires: python2-future %{?python_provide:%python_provide python2-vertica} # Remove before F30 @@ -45,6 +47,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 +72,42 @@ Obsoletes: vertica-python < %{version}-%{release} %patch0 -p1 %endif -%patch1 -p1 - %build %{__python2} setup.py build - +%if 0%{?with_python3} +%{__python3} setup.py build +%endif %install %{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT +%if 0%{?with_python3} +%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT +%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 +* Mon Jan 8 2018 Jan Beran - 0.7.3 - 1 +- Update to version 0.7.3 including Python 3 subpackage + * Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek - 0.6.14-3 - Python 2 binary package renamed to python2-vertica See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3