File python3-psycopg2.spec of Package python3-psycopg2

# spec file for package python3-psycopg2
# Copyright (c) 2015 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

Name:           python3-psycopg2
Version:        2.6.1
Release:        0
Summary:        Python-PostgreSQL Database Adapter
License:        SUSE-LGPL-3.0-with-openssl-exception and (SUSE-LGPL-3.0-with-openssl-exception or ZPL-2.0)
Group:          Development/Languages/Python
BuildRequires:  fdupes
BuildRequires:  postgresql-devel
BuildRequires:  python3-2to3
BuildRequires:  python3-Sphinx
BuildRequires:  python3-devel
Recommends:     postgresql-server
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

psycopg2 is a PostgreSQL database adapter for the Python programming
language.  psycopg2 was written with the aim of being very small and fast,
and stable as a rock.

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 full asycronous operations and support
for coroutine libraries.

%package doc
Summary:        Documentation for psycopg python PostgreSQL database adapter
Group:          Documentation/HTML
Requires:       %{name} = %{version}

%description doc
Documentation and example files for the psycopg python PostgreSQL database adapter.

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

CFLAGS="%{optflags} -fno-strict-aliasing" python3 build
cd doc/src && PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}" make html
cd ../..
mv doc/src/_build/html doc/html
rm -rf doc/src # Remove junk

python3 install --prefix=%{_prefix} --root=%{buildroot}
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 doc
%doc doc/html examples/

openSUSE Build Service is sponsored by