python-psycopg2/python-psycopg2.spec
Dirk Mueller 2201080b65 Accepting request 924846 from home:ecsos
- Update to 2.9.1
  - Fix regression with named `sql.Placeholder` (🎫`1291`).
- Update to 2.9.0
  - ``with connection`` starts a transaction on autocommit transactions too
    (🎫`#941`).
  - Timezones with fractional minutes are supported on Python 3.7 and following
    (🎫`#1272`).
  - Escape table and column names in `~cursor.copy_from()` and `~cursor.copy_to()`.
  - Connection exceptions with sqlstate ``08XXX`` reclassified as
    `~psycopg2.OperationalError` (a subclass of the previously used
    `~psycopg2.DatabaseError`) (🎫`#1148`).
  - Include library dirs required from libpq to work around MacOS build problems
    (🎫`#1200`).
  - Dropped support for Python 2.7, 3.4, 3.5 (🎫`#1198, #1000, #1197`).
  - Dropped support for mx.DateTime.
  - Use `datetime.timezone` objects by default in datetime objects instead of
    `~psycopg2.tz.FixedOffsetTimezone`.
  - The `psycopg2.tz` module is deprecated and scheduled to be dropped in the
    next major release.
  - Provide :pep:`599` wheels packages (manylinux2014 tag) for i686 and x86_64
    platforms.
  - Provide :pep:`600` wheels packages (manylinux_2_24 tag) for aarch64 and
    ppc64le platforms.
  - Wheel package compiled against OpenSSL 1.1.1k and PostgreSQL 13.3.
  - Build system for Linux/MacOS binary packages moved to GitHub action.

OBS-URL: https://build.opensuse.org/request/show/924846
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psycopg2?expand=0&rev=82
2021-10-16 09:40:18 +00:00

77 lines
2.6 KiB
RPMSpec

#
# spec file for package python-psycopg2
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-psycopg2
Version: 2.9.1
Release: 0
Summary: Python-PostgreSQL Database Adapter
License: LGPL-3.0-or-later AND (LGPL-3.0-or-later OR ZPL-2.0) AND SUSE-GPL-2.0-with-openssl-exception
URL: http://initd.org/psycopg/
Source: https://files.pythonhosted.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
BuildRequires: %{python_module devel >= 3.6}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# newer postgresql packages pg_config in -server-devel
%if 0%{?sle_version} > 150100 || 0%{?suse_version} > 1500
BuildRequires: postgresql-server-devel >= 9.1
%else
BuildRequires: postgresql-devel >= 9.1
%endif
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Suggests: postgresql-server
%endif
%python_subpackages
%description
psycopg2 is a PostgreSQL database adapter for the Python programming
language.
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 asychronous operations and support
for coroutine libraries.
%prep
%setup -q -n psycopg2-%{version}
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%install
%python_install
%python_expand rm -rf %{buildroot}%{$python_sitearch}/psycopg2/tests # Don't package testsuite
%fdupes %{buildroot}/%{_mandir} # Create symlinks for man pages
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# tests require running PGSQL
#%%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitearch} $python -m unittest discover
%files %{python_files}
%license LICENSE
%doc AUTHORS NEWS README.rst
%{python_sitearch}/psycopg2/
%{python_sitearch}/psycopg2-%{version}-py%{python_version}.egg-info
%changelog