2009-04-27 15:31:31 +00:00
|
|
|
#
|
2011-01-03 00:42:53 +00:00
|
|
|
# spec file for package python-psycopg2
|
2009-04-27 15:31:31 +00:00
|
|
|
#
|
2021-10-16 09:40:18 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2011-02-28 08:29:10 +00:00
|
|
|
#
|
2009-04-27 15:31:31 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2012-03-27 09:27:26 +00:00
|
|
|
|
2019-03-04 12:18:22 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-02-28 08:29:10 +00:00
|
|
|
#
|
2009-04-27 15:31:31 +00:00
|
|
|
|
|
|
|
|
2017-06-23 16:40:37 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-10-16 09:40:18 +00:00
|
|
|
%define skip_python2 1
|
2011-09-21 13:46:02 +00:00
|
|
|
Name: python-psycopg2
|
2021-11-29 10:58:17 +00:00
|
|
|
Version: 2.9.2
|
2011-09-21 13:46:02 +00:00
|
|
|
Release: 0
|
2012-03-27 09:27:26 +00:00
|
|
|
Summary: Python-PostgreSQL Database Adapter
|
2018-02-27 21:52:12 +00:00
|
|
|
License: LGPL-3.0-or-later AND (LGPL-3.0-or-later OR ZPL-2.0) AND SUSE-GPL-2.0-with-openssl-exception
|
2019-03-04 12:18:22 +00:00
|
|
|
URL: http://initd.org/psycopg/
|
2017-06-23 16:40:37 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
|
2021-10-16 09:40:18 +00:00
|
|
|
BuildRequires: %{python_module devel >= 3.6}
|
2019-06-04 18:48:55 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2011-02-28 08:29:10 +00:00
|
|
|
BuildRequires: fdupes
|
2020-05-19 06:17:20 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-03-19 10:27:46 +00:00
|
|
|
# newer postgresql packages pg_config in -server-devel
|
2020-05-19 06:17:20 +00:00
|
|
|
%if 0%{?sle_version} > 150100 || 0%{?suse_version} > 1500
|
2020-03-19 10:27:46 +00:00
|
|
|
BuildRequires: postgresql-server-devel >= 9.1
|
|
|
|
%else
|
2017-06-23 16:40:37 +00:00
|
|
|
BuildRequires: postgresql-devel >= 9.1
|
2020-03-19 10:27:46 +00:00
|
|
|
%endif
|
2020-05-19 06:17:20 +00:00
|
|
|
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
2012-03-27 09:27:26 +00:00
|
|
|
Suggests: postgresql-server
|
2018-02-27 21:52:12 +00:00
|
|
|
%endif
|
2017-06-23 16:40:37 +00:00
|
|
|
%python_subpackages
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%description
|
2011-02-28 08:29:10 +00:00
|
|
|
psycopg2 is a PostgreSQL database adapter for the Python programming
|
2017-07-10 10:34:52 +00:00
|
|
|
language.
|
2009-04-27 15:31:31 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
psycopg2 is different from the other database adapter because it was
|
|
|
|
designed for heavily multi-threaded applications that create and destroy
|
|
|
|
lots of cursors and make a conspicuous number of concurrent INSERTs or
|
2017-07-10 10:34:52 +00:00
|
|
|
UPDATEs. psycopg2 also provide asychronous operations and support
|
2011-02-28 08:29:10 +00:00
|
|
|
for coroutine libraries.
|
2011-01-03 00:42:53 +00:00
|
|
|
|
2006-10-27 12:12:46 +00:00
|
|
|
%prep
|
2011-09-21 13:46:02 +00:00
|
|
|
%setup -q -n psycopg2-%{version}
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%build
|
2017-06-23 16:40:37 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
%python_build
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%install
|
2017-06-23 16:40:37 +00:00
|
|
|
%python_install
|
|
|
|
%python_expand rm -rf %{buildroot}%{$python_sitearch}/psycopg2/tests # Don't package testsuite
|
2019-10-14 14:14:54 +00:00
|
|
|
%fdupes %{buildroot}/%{_mandir} # Create symlinks for man pages
|
2019-03-04 12:18:22 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
|
|
|
%check
|
|
|
|
# tests require running PGSQL
|
2021-10-16 09:40:18 +00:00
|
|
|
#%%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitearch} $python -m unittest discover
|
2011-01-03 00:42:53 +00:00
|
|
|
|
2017-06-23 16:40:37 +00:00
|
|
|
%files %{python_files}
|
2019-03-04 12:18:22 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc AUTHORS NEWS README.rst
|
2012-05-25 06:57:27 +00:00
|
|
|
%{python_sitearch}/psycopg2/
|
2017-06-23 16:40:37 +00:00
|
|
|
%{python_sitearch}/psycopg2-%{version}-py%{python_version}.egg-info
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%changelog
|