%if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif Summary: Meta-commands for Postgres Name: python-pgspecial Version: 1.11.9 Release: 1%{?dist} License: BSD URL: https://github.com/dbcli/pgspecial Source0: https://files.pythonhosted.org/packages/source/p/pgspecial/pgspecial-%{version}.tar.gz BuildArch: noarch %global _description\ This package provides an API to execute meta-commands on PostgreSQL. %description %_description %if 0%{?with_python2} %package -n python2-pgspecial Summary: %{summary} %{?python_provide:%python_provide python2-pgspecial} %{?el6:Provides: python-pgspecial} BuildRequires: python2-devel BuildRequires: python2-setuptools #BuildRequires for tests BuildRequires: python2-pytest BuildRequires: python2-psycopg2 >= 2.5.4 BuildRequires: python2-click >= 4.1 BuildRequires: python2-sqlparse >= 0.1.19 Requires: python2-click >= 4.1 Requires: python2-sqlparse >= 0.1.19 %description -n python2-pgspecial %_description %endif %if %{with python3} %package -n python3-pgspecial Summary: %{summary} %{?python_provide:%python_provide python3-pgspecial} BuildRequires: python3-devel BuildRequires: python3-setuptools #BuildRequires for tests BuildRequires: python3-pytest BuildRequires: python3-psycopg2 >= 2.5.4 BuildRequires: python3-click >= 4.1 BuildRequires: python3-sqlparse >= 0.1.19 Requires: python3-click >= 4.1 Requires: python3-sqlparse >= 0.1.19 %description -n python3-pgspecial %_description %endif %prep %setup -q -n pgspecial-%{version} %build %if 0%{?with_python2} %py2_build %endif %if %{with python3} %py3_build %endif %install %if %{with python3} %py3_install %endif %if 0%{?with_python2} %py2_install %endif %check %if %{with python3} PYTHONPATH=build/lib/ py.test-3 %endif %if 0%{?with_python2} PYTHONPATH=build/lib/ py.test-2 %endif %if 0%{?with_python2} %files -n python2-pgspecial %license License.txt %doc README.rst %{python2_sitelib}/pgspecial %{python2_sitelib}/pgspecial-%{version}-py?.?.egg-info %endif %if %{with python3} %files -n python3-pgspecial %license License.txt %doc README.rst %{python3_sitelib}/pgspecial %{python3_sitelib}/pgspecial-%{version}-py?.?.egg-info %endif %changelog * Sat Feb 29 2020 Dick Marinus - 1.11.9-1 1.11.9 * Sat Nov 24 2018 Dick Marinus - 1.11.3-1 1.11.3 * Fri Jul 27 2018 Dick Marinus - 1.11.1-1 v1.11.1 * Mon May 21 2018 Dick Marinus - 1.11.0-4 Update URL * Mon May 21 2018 Dick Marinus - 1.11.0-3 Add documentation * Mon May 21 2018 Dick Marinus - 1.11.0-2 Fix description * Mon May 21 2018 Dick Marinus - 1.11.0-1 v1.11.0 * Sat May 19 2018 Dick Marinus - 1.10.0-2 Fixes as suggested by Zbigniew Jidrzejewski-Szmek * Sat Apr 7 2018 Dick Marinus - 1.10.0-1 Update to 1.10.0 * Sun Sep 10 2017 Dick Marinus - 1.8.0-1 Initial version