File python-psycopg2.spec of Package python-psycopg2

#
# spec file for package python-psycopg2
#
# 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.
#
# norootforbuild 


%define modname psycopg2

Name:           python-psycopg2
Summary:        A PostgreSQL database adapter for Python
Version:        2.3.2
Release:        %{release}  
Url:            http://initd.org/psycopg/
License:        LGPLv3+ with exceptions
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq
Group:          Development/Languages/Python
Source:         %{modname}-%{version}.tar.gz
Source1:        %{name}-rpmlintrc
%{py_requires}
BuildRequires:  postgresql-devel python-devel >= 2.4 dos2unix fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build


%description
psycopg is a PostgreSQL database adapter for the Python programming language.
This is version 2, a complete rewrite of the original code to provide
new-style classes for connection and cursor objects and other sweet candies.
Like the original, psycopg 2 was written with the aim of being very small and
fast, and stable as a rock.

psycopg 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.
psycopg 2 also provide full asycronous operations for the really brave
programmer.


Authors:
--------
    Federico Di Gregorio <fog@initd.org>



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

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


Authors:
--------
    Federico Di Gregorio <fog@initd.org>



%prep
%setup -q -n %{modname}-%{version}

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{__python} setup.py build
%{__rm} -rf doc/src
%{__rm} doc/html/.buildinfo

%install
%{__python} setup.py install \
  --prefix=%{_prefix} \
  --root=$RPM_BUILD_ROOT \
  --optimize=2


# create symlinks for man pages
%fdupes -s $RPM_BUILD_ROOT/%_mandir
# create hardlinks for the rest
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog PKG-INFO README
%{python_sitearch}/psycopg2  
%{python_sitearch}/psycopg2-%{version}-py%{py_ver}.egg-info 

%files doc  
%defattr(-,root,root)  
%doc doc examples/

%changelog
openSUSE Build Service is sponsored by