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
|
|
|
#
|
2016-03-10 11:03:38 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-02-28 08:29:10 +00:00
|
|
|
#
|
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.
|
2012-03-27 09:27:26 +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-09-21 13:46:02 +00:00
|
|
|
Name: python-psycopg2
|
2016-11-14 14:07:56 +00:00
|
|
|
Version: 2.6.2
|
2011-09-21 13:46:02 +00:00
|
|
|
Release: 0
|
2012-03-27 09:27:26 +00:00
|
|
|
Summary: Python-PostgreSQL Database Adapter
|
2014-01-13 17:23:55 +00:00
|
|
|
License: LGPL-3.0+ and (LGPL-3.0+ or ZPL-2.0) and SUSE-GPL-2.0-with-openssl-exception
|
2009-04-27 15:31:31 +00:00
|
|
|
Group: Development/Languages/Python
|
2014-01-13 17:23:55 +00:00
|
|
|
Url: http://initd.org/psycopg/
|
2012-03-12 21:10:00 +00:00
|
|
|
Source: http://pypi.python.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
|
2011-02-28 08:29:10 +00:00
|
|
|
BuildRequires: fdupes
|
2012-03-27 09:27:26 +00:00
|
|
|
BuildRequires: postgresql-devel
|
2015-02-24 15:28:39 +00:00
|
|
|
BuildRequires: python-Sphinx
|
2012-03-27 09:27:26 +00:00
|
|
|
BuildRequires: python-devel
|
|
|
|
Suggests: postgresql-server
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-03-12 21:10:00 +00:00
|
|
|
%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)")}
|
2011-02-28 08:29:10 +00:00
|
|
|
%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
|
|
|
|
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-09-21 13:46:02 +00:00
|
|
|
%setup -q -n psycopg2-%{version}
|
2016-03-10 11:03:38 +00:00
|
|
|
# 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
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%build
|
2011-09-21 13:46:02 +00:00
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
2015-02-24 15:28:39 +00:00
|
|
|
rm -rf doc/build # Remove junk
|
|
|
|
sphinx-build doc/src doc/build/html
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%install
|
2011-02-28 08:29:10 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2011-09-21 13:46:02 +00:00
|
|
|
rm -rf %{buildroot}%{python_sitearch}/psycopg2/tests # Don't package testsuite
|
2017-06-21 13:51:32 +00:00
|
|
|
rm doc/build/html/.doctrees/environment.pickle
|
2012-03-27 09:27:26 +00:00
|
|
|
%fdupes -s %{buildroot}/%{_mandir} # Create symlinks for man pages
|
2011-09-21 13:46:02 +00:00
|
|
|
%fdupes %{buildroot} # Create hardlinks for the rest
|
2011-01-03 00:42:53 +00:00
|
|
|
|
|
|
|
%files
|
2011-02-28 08:29:10 +00:00
|
|
|
%defattr(-,root,root,-)
|
2015-02-24 15:28:39 +00:00
|
|
|
%doc AUTHORS LICENSE NEWS README.rst
|
2012-05-25 06:57:27 +00:00
|
|
|
%{python_sitearch}/psycopg2/
|
|
|
|
%{python_sitearch}/psycopg2-%{version}-py%{py_ver}.egg-info
|
2011-02-28 08:29:10 +00:00
|
|
|
|
|
|
|
%files doc
|
2006-10-27 12:12:46 +00:00
|
|
|
%defattr(-,root,root)
|
2015-02-24 15:28:39 +00:00
|
|
|
%doc doc/build/html examples/
|
2006-10-27 12:12:46 +00:00
|
|
|
|
|
|
|
%changelog
|