File python-pysqlite.spec of Package python-pysqlite

# spec file for package python-pysqlite
# Copyright (c) 2011 SUSE LINUX Products 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:           python-pysqlite
Version:        2.6.3
Release:        0
Summary:        DB-API 2.0 interface for SQLite 3.x
License:        Zlib
Group:          Development/Languages/Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-Sphinx
BuildRequires:  python-devel
BuildRequires:  sqlite3-devel
Requires:       sqlite3
%if 0%{?suse_version}
Provides:       python-sqlite = %{version}
Obsoletes:      python-sqlite < %{version}
Provides:       python-sqlite2 = %{version}
Obsoletes:      python-sqlite2 < %{version}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Python interface to SQLite 3

pysqlite is an interface to the SQLite 3.x embedded relational database engine.
It is almost fully compliant with the Python database API version 2.0 also
exposes the unique features of SQLite.

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

CFLAGS="%{optflags}" python build
cd doc/sphinx && make html && rm .build/html/.buildinfo  # Build HTML documentation

python install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{_prefix}/pysqlite2-doc # Remove wrongly installed junk

%doc LICENSE doc/sphinx/.build/html