mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-python/psycopg: Bump to 2.7.3.2 and many fixes
Apply a couple patches. One for building documentation (634730) and another to avoid building against mxdatetime from the antiquated dev-python/egenix-mx-base (452028, 629430). This version knows how to parse the new PostgreSQL version scheme (625540). Docs build again (540996). Bug: https://bugs.gentoo.org/452028 Bug: https://bugs.gentoo.org/540996 Bug: https://bugs.gentoo.org/625540 Bug: https://bugs.gentoo.org/629430 Bug: https://bugs.gentoo.org/634730 Package-Manager: Portage-2.3.13, Repoman-2.3.3
This commit is contained in:
@@ -2,4 +2,5 @@ DIST psycopg-1.1.21.tar.gz 213753 BLAKE2B 679b4ba810ad7821c781e169baae1f62b6f926
|
||||
DIST psycopg2-2.5.3.tar.gz 690689 BLAKE2B c1c070fc9acf5270f6bd711d457f162d2e5622a0cb40584d5b24cce441429c460aded278b67dbdf351605d710085c3e04ac63927d736c8d04ea27d21cccdea10 SHA512 88590c37be839e8cf5025b7ac40411c4682269700795c5f8f1b762966d906faf3f1ee85de35fc734a2d10c6a68d7fef569891bd96919bab809b9500625e2a41a
|
||||
DIST psycopg2-2.6.2.tar.gz 376348 BLAKE2B 279f2fb905c3e3034d89535a8c1de3114ef87cbd7f4b32a54b38150ef1cb845ae9811b3d6f57a5f46042db47e6d5f2563e87c986cdb8a8799fe6d60580180cc3 SHA512 614314b5ab7ab5fa7c5e9c4f861579f90bd73521a9964dcb5a0938f77a9d6dfbea689cef35ad399cda698a45bb736c315912cb5dca85a52132f011d79f4863ac
|
||||
DIST psycopg2-2.7.3.1.tar.gz 425069 BLAKE2B 4d34859c63217bad08374b0a8d03dbcba7711c1e8034eb106ba27211e85af148f51902e2d1b294e4c0ba4e798f4a64903d9d735605d09bbcb1d291ad23cfb4e0 SHA512 206d4cf62a091927daf4b734e0b3597399fc588cb738366711674fc06c39d68a682981bc4756c356d37c41caba49b5df2b915beace8670c190d7d41e374f1eb5
|
||||
DIST psycopg2-2.7.3.2.tar.gz 425107 BLAKE2B 47fe652d5e2e62c765150941d565b9ee896e221ae565e51745645f2723a0070481daf2f0d0d1a1fbd741b5b536c12cdf892becb4d5d4283a26cd324cd02c47c6 SHA512 38460369e339b16e433328e9bd6ccdbb4b03e41d40b9fb453a54513af4ec43f0a72dc795de6eb13d9618e1d5636991d3de7f619459b3f21d070798d497b2776f
|
||||
DIST psycopg2-2.7.3.tar.gz 425004 BLAKE2B df405ca5b5f5887fbd166523cafd5686a9148b313b7c30a85dbfc5dec42aff426505993f42a18d6d60569deb17a5748a858737a139d74943e66bce8bdd12beb3 SHA512 9e673f47190b12ab31e783a3d2b464231b933cc6ad4f12742c457020aab5db36b83829d84b4e63f793f5567e689081fd9479bfc4634b7bb08c7d873a3f42efc9
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
Index: psycopg2-2.7.3/setup.py
|
||||
===================================================================
|
||||
--- psycopg2-2.7.3.orig/setup.py
|
||||
+++ psycopg2-2.7.3/setup.py
|
||||
@@ -527,20 +527,21 @@ have_pydatetime = True
|
||||
have_mxdatetime = False
|
||||
use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))
|
||||
|
||||
-# check for mx package
|
||||
-mxincludedir = ''
|
||||
-if parser.has_option('build_ext', 'mx_include_dir'):
|
||||
- mxincludedir = parser.get('build_ext', 'mx_include_dir')
|
||||
-if not mxincludedir:
|
||||
- mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx")
|
||||
-if mxincludedir.strip() and os.path.exists(mxincludedir):
|
||||
- # Build the support for mx: we will check at runtime if it can be imported
|
||||
- include_dirs.append(mxincludedir)
|
||||
- define_macros.append(('HAVE_MXDATETIME', '1'))
|
||||
- sources.append('adapter_mxdatetime.c')
|
||||
- depends.extend(['adapter_mxdatetime.h', 'typecast_mxdatetime.c'])
|
||||
- have_mxdatetime = True
|
||||
- version_flags.append('mx')
|
||||
+if not use_pydatetime:
|
||||
+ # check for mx package
|
||||
+ mxincludedir = ''
|
||||
+ if parser.has_option('build_ext', 'mx_include_dir'):
|
||||
+ mxincludedir = parser.get('build_ext', 'mx_include_dir')
|
||||
+ if not mxincludedir:
|
||||
+ mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx")
|
||||
+ if mxincludedir.strip() and os.path.exists(mxincludedir):
|
||||
+ # Build the support for mx: we will check at runtime if it can be imported
|
||||
+ include_dirs.append(mxincludedir)
|
||||
+ define_macros.append(('HAVE_MXDATETIME', '1'))
|
||||
+ sources.append('adapter_mxdatetime.c')
|
||||
+ depends.extend(['adapter_mxdatetime.h', 'typecast_mxdatetime.c'])
|
||||
+ have_mxdatetime = True
|
||||
+ version_flags.append('mx')
|
||||
|
||||
# now decide which package will be the default for date/time typecasts
|
||||
if have_pydatetime and (use_pydatetime or not have_mxdatetime):
|
||||
29
dev-python/psycopg/files/psycopg-2.7.3-sphinx-1.6.patch
Normal file
29
dev-python/psycopg/files/psycopg-2.7.3-sphinx-1.6.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
--- psycopg-2.7.3.2/doc/src/tools/lib/dbapi_extension.py 2016-04-10 08:48:37.000000000 +0200
|
||||
+++ psycopg-2.7.3.2/doc/src/tools/lib/dbapi_extension.py 2017-12-20 22:14:19.097225121 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
from docutils import nodes
|
||||
|
||||
from sphinx.locale import _
|
||||
-from sphinx.util.compat import Directive, make_admonition
|
||||
+from docutils.parsers.rst import Directive
|
||||
|
||||
class extension_node(nodes.Admonition, nodes.Element): pass
|
||||
|
||||
@@ -29,12 +29,11 @@ class Extension(Directive):
|
||||
option_spec = {}
|
||||
|
||||
def run(self):
|
||||
- nodes = make_admonition(extension_node,
|
||||
- self.name, [_('DB API extension')], self.options,
|
||||
- self.content, self.lineno, self.content_offset,
|
||||
- self.block_text, self.state, self.state_machine)
|
||||
- nodes[0]['classes'].append('dbapi-extension')
|
||||
- return nodes
|
||||
+ node = extension_node('\n'.join(self.content))
|
||||
+ node += nodes.title(_('DB API extension'), _('DB API extension'))
|
||||
+ self.state.nested_parse(self.content, self.content_offset, node)
|
||||
+ node['classes'].append('dbapi-extension')
|
||||
+ return [node]
|
||||
|
||||
|
||||
def visit_extension_node(self, node):
|
||||
72
dev-python/psycopg/psycopg-2.7.3.2.ebuild
Normal file
72
dev-python/psycopg/psycopg-2.7.3.2.ebuild
Normal file
@@ -0,0 +1,72 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit distutils-r1 flag-o-matic
|
||||
|
||||
MY_PN="${PN}2"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL database adapter for Python"
|
||||
HOMEPAGE="http://initd.org/psycopg/ https://pypi.python.org/pypi/psycopg2"
|
||||
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-3+"
|
||||
SLOT="2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
|
||||
IUSE="debug doc examples"
|
||||
|
||||
RDEPEND=">=dev-db/postgresql-8.1:*"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
>=dev-python/pygments-2.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinx-1.6[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
# Avoid using mxdatetime: https://bugs.gentoo.org/452028
|
||||
# Fixes build error with sphinx: https://bugs.gentoo.org/634730
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/psycopg-2.7.3-avoid-mxdatetime.patch
|
||||
"${FILESDIR}"/psycopg-2.7.3-sphinx-1.6.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_compile() {
|
||||
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
|
||||
|
||||
! python_is_python3 && append-flags -fno-strict-aliasing
|
||||
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_prepare_all() {
|
||||
if use debug; then
|
||||
sed -i 's/^\(define=\)/\1PSYCOPG_DEBUG,/' setup.cfg || die
|
||||
fi
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C doc/src html text
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
if use doc; then
|
||||
dodoc -r doc/src/_build/html
|
||||
dodoc doc/src/_build/text/*
|
||||
fi
|
||||
|
||||
if use examples ; then
|
||||
dodoc -r examples
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
fi
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
Reference in New Issue
Block a user