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
|
|
|
#
|
2011-02-28 08:29:10 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
#
|
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.
|
2011-05-30 14:55:53 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2009-04-27 15:31:31 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
# norootforbuild
|
2011-05-30 14:55:53 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
2009-04-27 15:31:31 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
%define mod_name psycopg2
|
2009-04-27 15:31:31 +00:00
|
|
|
|
2011-02-28 08:29:10 +00:00
|
|
|
Name: python-%{mod_name}
|
|
|
|
Version: 2.4
|
2011-05-30 14:55:53 +00:00
|
|
|
Release: 1
|
2011-01-03 00:42:53 +00:00
|
|
|
Url: http://initd.org/psycopg/
|
2011-02-28 08:29:10 +00:00
|
|
|
Summary: Python-PostgreSQL Database Adapter
|
|
|
|
License: LGPLv3+ or ZPL
|
2009-04-27 15:31:31 +00:00
|
|
|
Group: Development/Languages/Python
|
2011-02-28 08:29:10 +00:00
|
|
|
Source: %{mod_name}-%{version}.tar.bz2
|
2011-01-03 00:42:53 +00:00
|
|
|
Source1: %{name}-rpmlintrc
|
2009-04-27 15:31:31 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-02-28 08:29:10 +00:00
|
|
|
BuildRequires: python-devel >= 2.4
|
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%py_requires
|
|
|
|
%if 0%{?suse_version} > 1010
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
|
|
|
%endif
|
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
|
|
|
|
language. psycopg2 was written with the aim of being very small and fast,
|
|
|
|
and stable as a rock.
|
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
|
|
|
|
UPDATEs. psycopg2 also provide full asycronous operations and support
|
|
|
|
for coroutine libraries.
|
2011-01-03 00:42:53 +00:00
|
|
|
|
|
|
|
%package doc
|
2011-02-28 08:29:10 +00:00
|
|
|
License: LGPLv3+ or ZPL
|
2011-01-03 00:42:53 +00:00
|
|
|
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.
|
|
|
|
|
2006-10-27 12:12:46 +00:00
|
|
|
%prep
|
2011-02-28 08:29:10 +00:00
|
|
|
%setup -q -n %{mod_name}-%{version}
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%build
|
2011-02-28 08:29:10 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
python setup.py build
|
|
|
|
rm -rf doc/src
|
|
|
|
rm doc/html/.buildinfo
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%install
|
2011-02-28 08:29:10 +00:00
|
|
|
%if 0%{?sles_version}
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%else
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=2
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1010
|
|
|
|
%fdupes -s %{buildroot}/%_mandir # create symlinks for man pages
|
|
|
|
%fdupes %{buildroot} # create hardlinks for the rest
|
|
|
|
%endif
|
2011-01-03 00:42:53 +00:00
|
|
|
|
2006-10-27 12:12:46 +00:00
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
2011-01-03 00:42:53 +00:00
|
|
|
%files
|
2011-02-28 08:29:10 +00:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS ChangeLog LICENSE NEWS PKG-INFO README
|
|
|
|
%python_sitearch/%{mod_name}*
|
|
|
|
%if 0%{?sles_version} > 10
|
|
|
|
%python_sitearch/*.egg-info
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files doc
|
2006-10-27 12:12:46 +00:00
|
|
|
%defattr(-,root,root)
|
2011-01-03 00:42:53 +00:00
|
|
|
%doc doc examples/
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%changelog
|