14
0

- convert to singlespec

- update to 2.7.1
- drop doc subpackage, html docs available from http://pythonhosted.org/psycopg2/

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psycopg2?expand=0&rev=44
This commit is contained in:
Jan Matejek
2017-06-23 16:40:37 +00:00
committed by Git OBS Bridge
parent 1baa471796
commit bb806b3800
4 changed files with 55 additions and 35 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c
size 376348

3
psycopg2-2.7.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86c9355f5374b008c8479bc00023b295c07d508f7c3b91dbd2e74f8925b1d9c6
size 421034

View File

@@ -1,3 +1,41 @@
-------------------------------------------------------------------
Fri Jun 23 16:26:18 UTC 2017 - jmatejek@suse.com
- convert to singlespec
- update to 2.7.1
* Added sql module to generate SQL dynamically (ticket #308).
* Added Replication protocol support (ticket #322). Main authors are
Oleksandr Shulgin and Craig Ringer, who deserve a huge thank you.
* Added parse_dsn() and make_dsn() functions (tickets #321, #363). connect()
now can take both dsn and keyword arguments, merging them together.
* Added __libpq_version__ and libpq_version() to inspect the version of the
libpq library the module was compiled/loaded with (tickets #35, #323).
* The attributes notices and notifies can be customized replacing them with
any object exposing an append() method (ticket #326).
* Adapt network types to ipaddress objects when available. When not enabled,
convert arrays of network types to lists by default. The old Inet adapter is
deprecated (tickets #317, #343, #387).
* Added quote_ident() function (ticket #359).
* Added get_dsn_parameters() connection method (ticket #364).
* callproc() now accepts a dictionary of parameters (ticket #381).
* Give precedence to __conform__() over superclasses to choose an object
adapter (ticket #456).
* Using Python C API decoding functions and codecs caching for faster
unicode encoding/decoding (ticket #473).
* executemany() slowness addressed by execute_batch() and execute_values()
(ticket #491).
* Added async_ as an alias for async to support Python 3.7 where async will
become a keyword (ticket #495).
* Unless in autocommit, do not use default_transaction_* settings to control
the session characteristics as it may create problems with external
connection pools such as pgbouncer; use BEGIN options instead (ticket #503).
* isolation_level is now writable and entirely separated from autocommit;
added readonly, deferrable writable attributes.
* dropped support for python 2.5 and postgres client library < 9.1
* many bugs fixed
- drop doc subpackage, html docs available from http://pythonhosted.org/psycopg2/
-------------------------------------------------------------------
Wed Jun 21 13:44:46 UTC 2017 - bwiedemann@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-psycopg2
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,23 +16,22 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-psycopg2
Version: 2.6.2
Version: 2.7.1
Release: 0
Summary: Python-PostgreSQL Database Adapter
License: LGPL-3.0+ and (LGPL-3.0+ or ZPL-2.0) and SUSE-GPL-2.0-with-openssl-exception
Group: Development/Languages/Python
Url: http://initd.org/psycopg/
Source: http://pypi.python.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: fdupes
BuildRequires: postgresql-devel
BuildRequires: python-Sphinx
BuildRequires: python-devel
BuildRequires: postgresql-devel >= 9.1
BuildRequires: python-rpm-macros
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
%python_subpackages
%description
psycopg2 is a PostgreSQL database adapter for the Python programming
@@ -45,40 +44,23 @@ 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}
# use the year from source gzip header instead of current one to make reproducible rpms
year=$(perl -e 'sysread(STDIN, $h, 8); print (1900+(gmtime(unpack("l",substr($h,4))))[5])' < %{S:0})
sed -i "s/^year =.*/year=$year/" doc/src/conf.py
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
rm -rf doc/build # Remove junk
sphinx-build doc/src doc/build/html
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{python_sitearch}/psycopg2/tests # Don't package testsuite
rm doc/build/html/.doctrees/environment.pickle
%python_install
%python_expand 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
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS README.rst
%{python_sitearch}/psycopg2/
%{python_sitearch}/psycopg2-%{version}-py%{py_ver}.egg-info
%files doc
%defattr(-,root,root)
%doc doc/build/html examples/
%{python_sitearch}/psycopg2-%{version}-py%{python_version}.egg-info
%changelog