LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-psycopg2.spec of Package python-psycopg2 (Project home:ghostlyrat)

#
# spec file for package python-psycopg2
#
# Copyright (c) 2012 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 http://bugs.opensuse.org/
#


Name:           python-psycopg2
Version:        2.6.1
Release:        1.1
License:        LGPL-3.0+ and (LGPL-3.0+ or ZPL-2.0) and 	SUSE-GPL-2.0-with-openssl-exception
Summary:        Python-PostgreSQL Database Adapter
Url:            http://initd.org/psycopg/
Group:          Development/Languages/Python
Source:         http://pypi.python.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  postgresql92-devel >= 9.2
BuildRequires:  python-devel >= 2.7
Suggests:       postgresql-server
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
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.

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

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
rm -rf doc/src doc/html/.buildinfo # Remove junk

%install
python setup.py 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
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS PKG-INFO
%{python_sitearch}/psycopg2/
%{python_sitearch}/psycopg2-%{version}-py%{py_ver}.egg-info

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

%changelog
* Fri May 25 2012 cfarrell@suse.com
- license update: LGPL-3.0+ and (LGPL-3.0+ or ZPL-2.0) and
  SUSE-GPL-2.0-with-openssl-exception
  See the COPYING file. There are GPL-2.0+ (with openssl linking exceptions
  for pgsql) in the package. Also, the ZPL option is only available for one
  particular subdirectory in the package
* Fri May 25 2012 highwaystar.ru@gmail.com
- python3 package added
- minor spec improvement
* Fri Apr  6 2012 jfunk@funktronics.ca
- Update to 2.4.5:
  * The close() methods on connections and cursors don't raise exceptions
    if called on already closed objects.
  * Fixed fetchmany() with no argument in cursor subclasses
    (ticket #84).
  * Use lo_creat() instead of lo_create() when possible for better
    interaction with pgpool-II (ticket #88).
  * Error and its subclasses are picklable, useful for multiprocessing
    interaction (ticket #90).
  * Better efficiency and formatting of timezone offset objects thanks
    to Menno Smits (tickets #94, #95).
  * Fixed 'rownumber' during iteration on cursor subclasses.
    Regression introduced in 2.4.4 (ticket #100).
  * Added support for 'inet' arrays.
  * Fixed 'commit()' concurrency problem (ticket #103).
  * Codebase cleaned up using the GCC Python plugin's static analysis
    tool, which has revealed several unchecked return values, possible
    NULL dereferences, reference counting problems. Many thanks to David
    Malcolm for the useful tool and the assistance provided using it.
* Tue Mar 27 2012 saschpe@suse.de
- Can't hurt to suggest postgresql-server
* Mon Mar 12 2012 saschpe@gmx.de
- Simplify macro usage
- Remove outdated SUSE version checks
* Mon Feb 13 2012 coolo@suse.com
- patch license to follow spdx.org standard
* Thu Jan 12 2012 jfunk@funktronics.ca
- Update to 2.4.4:
  * register_composite() also works with the types implicitly defined after a
    table row, not only with the ones created by CREATE TYPE.
  * Values for the isolation level symbolic constants restored to what they
    were before release 2.4.2 to avoid breaking apps using the values instead
    of the constants.
  * Named DictCursor/RealDictCursor honour itersize (ticket #80).
  * Fixed rollback on error on Zope (ticket #73).
  * Raise DatabaseError instead of Error with empty libpq errors, consistently
    with other disconnection-related errors: regression introduced in release
    2.4.1 (ticket #82).
- Version 2.4.3:
  * connect() supports all the keyword arguments supported by the database
  * Added new_array_type() function for easy creation of array typecasters.
  * Added support for arrays of hstores and composite types (ticket #66).
  * Fixed segfault in case of transaction started with connection lost (and
    possibly other events).
  * Fixed adaptation of Decimal type in sub-interpreters, such as in certain
    mod_wsgi configurations (ticket #52).
  * Rollback connections in transaction or in error before putting them back
    into a pool. Also discard broken connections (ticket #62).
  * Lazy import of the slow uuid module, thanks to Marko Kreen.
  * Fixed NamedTupleCursor.executemany() (ticket #65).
  * Fixed --static-libpq setup option (ticket #64).
  * Fixed interaction between RealDictCursor and named cursors (ticket #67).
  * Dropped limit on the columns length in COPY operations (ticket #68).
  * Fixed reference leak with arguments referenced more than once in queries
    (ticket #81).
  * Fixed typecasting of arrays containing consecutive backslashes.
  * errorcodes map updated to PostgreSQL 9.1.
* Wed Sep 21 2011 saschpe@suse.de
- 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
* Mon Feb 28 2011 saschpe@suse.de
- Spec file changes:
  * Added LICENSE and NEWS files
  * Added ZPL license to preamble (psycopg2 is dual-licensed)
  * Use upstream description
  * Fixed SLE build errors
  * Repacked tarball to bzip2
- Update to version 2.4
  * Added support for Python 3.1 and 3.2. The conversion has also
    brought several improvements:
  * Improvements to the named cusors and data handling
  * Fixed adaptation of None in composite types (ticket #26). Bug
    report by Karsten Hilbert.
  * Fixed several reference leaks in less common code paths.
  * Fixed segfault when a large object is closed and its connection no
    more available.
  * Added missing icon to ZPsycopgDA package, not available in Zope
    2.12.9 (ticket #30). Bug report and patch by Pumukel.
  * Fixed conversion of negative infinity (ticket #40). Bug report and
    patch by Marti Raudsepp.
* Mon Dec 27 2010 elchevive@opensuse.org
- Update to version 2.3.2
* Wed Oct 27 2010 termim@gmail.com
- Update to 2.2.2:
    Bux fixes:
  * the call to logging.basicConfig() in pool.py has been dropped:
    it was messing with some projects using logging (and a library
    should not initialize the logging system anyway.)
  * psycopg now correctly handles time zones with seconds in the
    UTC offset. The old register_tstz_w_secs() function is deprecated
    and will raise a warning if called.
  * Exceptions raised by the column iterator are propagated.
  * Exceptions raised by executemany() interators are propagated.
* Tue Aug 25 2009 jnelson-suse@jamponi.net
- Add --optimize=2 to build .pyo files, correct License and Url
* Tue Aug 18 2009 jfunk@funktronics.ca
- Update to 2.0.12:
  * psycopg/lobject_int.c: fixed problem with writing large data using
    lo_write: apparently the large objects code does not like non-blocking
    connections.
  * setup.py: fixed version detection for PostgreSQL rc, as
    suggested by Sok Ann Yap.
  * ZPsycopgDA/db.py: applied serialization error retry from Brian
    Sutherland.
  * Implemented connection.reset() method to reset the connection to
    well-know default parameters. This is much faster than closing and
    reopening the connection. (Suggested by a bug report by Glenn
    Maynard.)
  * psycopg/cursor_type.c: unified size macro definitions in COPY TO
    and COPY FROM operations: now the buffer for column names is 8192
    bytes that should be enough even for very large tables.
  * Applied patch from Robert Munro to fix version check
    in ZPsycopgDA.
- Release 2.0.11:
  * lib/extras.py: fixed crash in fetchone() when prefetching using
    a RealDictCursor.
  * psycopg/cursor_ext.c: now raise correct exception when fetching
    using a custom row factory results in an error.
  * lib/extras.py: applied DictRow "diet" patch from Marko Kreen.
  * setup.py: applied patch from Elvis Pranskevichus to make
    PostgreSQL version detection more robust.
* Mon Apr 27 2009 lars@linux-schulserver.de
- update to 2.0.10
* Thu Nov 20 2008 jfunk@funktronics.ca
- Update to 2.0.8
* Wed Nov  5 2008 poeml@suse.de
- use --record-rpm as setup option, not --record. The latter didn't
  pick up all files on Factory.
* Wed Jun 13 2007 judas_iscariote@shorewall.net
- Update to version 2.0.6 see http://initd.org/pub/software/psycopg/ChangeLog
  for details.
* Wed Oct 19 2005 jfunk@funktronics.ca
- Initial release