14
0

- Update to version 2.4.2:

* connection.h: added codec attribute to avoid repeated codec name
    lookups during unicode query/params manipulations.
  * setup.py: bumped to version 2.3.2.dev0
  * psycopg/connection_int.c: applied patch from Marti Raudsepp to close
    ticket #24. Fixed segfault in connection when DateStyle not available
    (e.g.  pgbouncer appars not passing it to the client)
  * psycopg/utils.c: Added psycopg_strdup function.
  - See ChangeLog for more...
- Don't package testsuite
- Fix non-executable script rpmlint warning

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psycopg2?expand=0&rev=27
This commit is contained in:
Sascha Peilicke
2011-09-21 13:46:02 +00:00
committed by Git OBS Bridge
parent 96993fcec3
commit 19d96d3eb0
5 changed files with 34 additions and 39 deletions

View File

@@ -11,28 +11,21 @@
# 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 http://bugs.opensuse.org/
#
# norootforbuild
%{!?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)")}
%define mod_name psycopg2
Name: python-%{mod_name}
Version: 2.4
Release: 1
Name: python-psycopg2
Version: 2.4.2
Release: 0
Url: http://initd.org/psycopg/
Summary: Python-PostgreSQL Database Adapter
License: LGPLv3+ or ZPL
License: LGPL-3.0+ or ZPL
Group: Development/Languages/Python
Source: %{mod_name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Source: psycopg2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel >= 2.4
BuildRequires: python-devel
BuildRequires: postgresql-devel
%if 0%{?suse_version}
%py_requires
@@ -40,6 +33,7 @@ BuildRequires: postgresql-devel
BuildRequires: fdupes
%endif
%endif
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
psycopg2 is a PostgreSQL database adapter for the Python programming
@@ -53,7 +47,6 @@ UPDATEs. psycopg2 also provide full asycronous operations and support
for coroutine libraries.
%package doc
License: LGPLv3+ or ZPL
Summary: Documentation for psycopg python PostgreSQL database adapter
Group: Documentation/HTML
Requires: %{name} = %{version}
@@ -62,38 +55,27 @@ Requires: %{name} = %{version}
Documentation and example files for the psycopg python PostgreSQL database adapter.
%prep
%setup -q -n %{mod_name}-%{version}
%setup -q -n psycopg2-%{version}
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
python setup.py build
rm -rf doc/src
rm doc/html/.buildinfo
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
rm -rf doc/src doc/html/.buildinfo # Remove junk
%install
%if 0%{?sles_version}
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%else
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=2
%endif
rm -rf %{buildroot}%{python_sitearch}/psycopg2/tests # Don't package testsuite
%if 0%{?suse_version} > 1010
%fdupes -s %{buildroot}/%_mandir # create symlinks for man pages
%fdupes %{buildroot} # create hardlinks for the rest
%fdupes -s %{buildroot}/%_mandir # Create symlinks for man pages
%fdupes %{buildroot} # Create hardlinks for the rest
%endif
%clean
rm -rf %{buildroot}
%files
%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
%{python_sitearch}/*
%files doc
%defattr(-,root,root)
%doc doc examples/
%doc doc/html examples/
%changelog