File python-psycopg2.spec of Package python-psycopg2

# spec file for package python-psycopg2
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-psycopg2
Version:        2.7.3
Release:        0
Summary:        Python-PostgreSQL Database Adapter
License:        LGPL-3.0-or-later AND (LGPL-3.0-or-later OR ZPL-2.0) AND SUSE-GPL-2.0-with-openssl-exception
Group:          Development/Languages/Python
BuildRequires:  %{python_module devel}
BuildRequires:  fdupes
BuildRequires:  postgresql-devel >= 9.1
BuildRequires:  python-rpm-macros
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Suggests:       postgresql-server
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

psycopg2 is a PostgreSQL database adapter for the Python programming

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
UPDATEs. psycopg2 also provide asychronous operations and support
for coroutine libraries.

%setup -q -n psycopg2-%{version}

export CFLAGS="%{optflags} -fno-strict-aliasing"

%python_expand rm -rf %{buildroot}%{$python_sitearch}/psycopg2/tests # Don't package testsuite
%fdupes -s %{buildroot}/%{_mandir}  # Create symlinks for man pages
%fdupes %{buildroot}                # Create hardlinks for the rest

%files %{python_files}

openSUSE Build Service is sponsored by