[gentoo-commits] repo/gentoo:master commit in: dev-python/psycopg/files/, dev-python/psycopg/
commit: 8f1bf9b73586915f3b1c78ee10b8dd7b785821ed Author: Michał Górny gentoo org> AuthorDate: Thu Apr 4 18:11:35 2024 + Commit: Michał Górny gentoo org> CommitDate: Thu Apr 4 18:11:35 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f1bf9b7 dev-python/psycopg: Remove old Signed-off-by: Michał Górny gentoo.org> dev-python/psycopg/Manifest| 2 - dev-python/psycopg/files/psycopg-3.1.17-musl.patch | 34 -- dev-python/psycopg/psycopg-3.1.16.ebuild | 76 -- dev-python/psycopg/psycopg-3.1.17.ebuild | 114 - 4 files changed, 226 deletions(-) diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest index fa4f90338f52..dc92e609ee66 100644 --- a/dev-python/psycopg/Manifest +++ b/dev-python/psycopg/Manifest @@ -1,5 +1,3 @@ -DIST psycopg-3.1.16.gh.tar.gz 502759 BLAKE2B 6c0b912c2a93425ddbed842a437e042b58ec859b3cf163aa7cd45a0db21084fea58945b40028e0491460b7d4da6648cfc361e1434d43ec7ab71af91f1a0c4c86 SHA512 d6cfcc848c089ef79c817bf271bcbad7078cdacacef4ab26e882fdbe55c90ac12644e7ee0af22f4cf1fa759033e94ee54c812bca7b517b84cda77276557e8ca8 -DIST psycopg-3.1.17.gh.tar.gz 503318 BLAKE2B 43c0c5ef0be20c9415c7dbe3b2ff242f30341d055bcf00ff4f9d9926c5c95df3bf10735e338c37f9e805562544637e75fd9edd5dbf71d67b42d04eea19e5c82e SHA512 d9f0ce05be71d67dbd7d1abad548befcdc229b53de93d5c08a52cae287d6f5293de6ede380c9ffc25ffa4d935782e90e9b04783f1c4c1fb88cb9ffd7016aabd5 DIST psycopg-3.1.18.gh.tar.gz 503513 BLAKE2B 35e5e4cb4e5355189b387fd17e1b51d4baf08f130cc5418f9f3cb58d6baf097953b4f6a7df31579a1d87e5269e110c4476d865fe12416e2fe62abbb52e0c141c SHA512 1e27eec49f3ae99f1fec68816dff3974aa9b1f526df45ccca295c7c6703cc309ca4f8f65d7e3450b628906a938c65f8cbd1a1f3cb6a41b6e51dc5e220985af39 DIST psycopg2-2.9.4.tar.gz 384017 BLAKE2B 4bc0afcc890c8a257c1ccd5c6e4e5301857a80f8b1428aa46c1473c9e18f5d2914a2e592c13336b06106217bb334d9b0321835bdd123f1627cbeb29dedf97bf7 SHA512 259088e42e0ab0d8a1a0ccf04f5e560f32c6179b4a0a0059e91bcf269baa8f4b0f1f949c332c640a2438c927a29b2c144078a861f8e18ba9c764da7c93c73b8d DIST psycopg2-2.9.9.tar.gz 384926 BLAKE2B 8418fca1329703cedfc86be74d85cae5133a0604bb8a21fa43e5359a46626d38ef227d0cd8fbbeb497e2db517a469d7f3e86b74ef9163617a547e999073a6b4c SHA512 a691fd09762221e854861dedce37b05e5354e0701feea470a6d5046960056ef02a8c9ecfa751adeba485271ea7d5834643b7d3a3c3f3270087f5ed9c68509f5f diff --git a/dev-python/psycopg/files/psycopg-3.1.17-musl.patch b/dev-python/psycopg/files/psycopg-3.1.17-musl.patch deleted file mode 100644 index ca1689931ed8.. --- a/dev-python/psycopg/files/psycopg-3.1.17-musl.patch +++ /dev/null @@ -1,34 +0,0 @@ -From eeb662bf89e9ffdb3e6fc40eb30d0b53e0b4bece Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Sat, 27 Jan 2024 15:28:34 +0100 -Subject: [PATCH] fix: add `libc.so` fallback for musl systems to the ctypes - impl - -Add a fallback to `libc.so` library name to fix loading the ctypes -implementation on musl systems. On musl, `find_library("c")` does -not work (the problem has been reported to CPython in 2014, and has not -been resolved yet), causing the module to fail on `assert libcname`. -Instead, add a fallback to using `libc.so` and let ctypes raise -an exception if such a library does not exist. - psycopg/psycopg/pq/_pq_ctypes.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py -index 9d4dd181..3ecff080 100644 a/psycopg/psycopg/pq/_pq_ctypes.py -+++ b/psycopg/psycopg/pq/_pq_ctypes.py -@@ -28,8 +28,8 @@ class FILE(Structure): - FILE_ptr = POINTER(FILE) - - if sys.platform == "linux": --libcname = ctypes.util.find_library("c") --assert libcname -+# find_library("c") does not work on musl, fall back to libc.so instead -+libcname = ctypes.util.find_library("c") or "libc.so" - libc = ctypes.cdll.LoadLibrary(libcname) - - fdopen = libc.fdopen --- -2.43.0 - diff --git a/dev-python/psycopg/psycopg-3.1.16.ebuild b/dev-python/psycopg/psycopg-3.1.16.ebuild deleted file mode 100644 index dbb98513d3f0.. --- a/dev-python/psycopg/psycopg-3.1.16.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{10..12} ) - -inherit distutils-r1 - -DESCRIPTION="PostgreSQL database adapter for Python" -HOMEPAGE=" - https://www.psycopg.org/psycopg3/ - https://github.com/psycopg/psycopg/ - https://pypi.org/project/psycopg/ -" -SRC_URI=" - https://github.com/psycopg/psycopg/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S=${WORKDIR}/${P}/psycopg - -LICENSE="LGPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" - -DEPEND=" -
[gentoo-commits] repo/gentoo:master commit in: dev-python/psycopg/files/, dev-python/psycopg/
commit: 102c2f5b2beaf5374cf9b510d9adb7abaa21a5b4 Author: Michał Górny gentoo org> AuthorDate: Sat Jan 27 15:30:51 2024 + Commit: Michał Górny gentoo org> CommitDate: Sat Jan 27 20:33:19 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=102c2f5b dev-python/psycopg: Add a patch for musl Closes: https://bugs.gentoo.org/923003 Signed-off-by: Michał Górny gentoo.org> dev-python/psycopg/files/psycopg-3.1.17-musl.patch | 34 ++ dev-python/psycopg/psycopg-3.1.17.ebuild | 5 2 files changed, 39 insertions(+) diff --git a/dev-python/psycopg/files/psycopg-3.1.17-musl.patch b/dev-python/psycopg/files/psycopg-3.1.17-musl.patch new file mode 100644 index ..ca1689931ed8 --- /dev/null +++ b/dev-python/psycopg/files/psycopg-3.1.17-musl.patch @@ -0,0 +1,34 @@ +From eeb662bf89e9ffdb3e6fc40eb30d0b53e0b4bece Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 27 Jan 2024 15:28:34 +0100 +Subject: [PATCH] fix: add `libc.so` fallback for musl systems to the ctypes + impl + +Add a fallback to `libc.so` library name to fix loading the ctypes +implementation on musl systems. On musl, `find_library("c")` does +not work (the problem has been reported to CPython in 2014, and has not +been resolved yet), causing the module to fail on `assert libcname`. +Instead, add a fallback to using `libc.so` and let ctypes raise +an exception if such a library does not exist. +--- + psycopg/psycopg/pq/_pq_ctypes.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py +index 9d4dd181..3ecff080 100644 +--- a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py +@@ -28,8 +28,8 @@ class FILE(Structure): + FILE_ptr = POINTER(FILE) + + if sys.platform == "linux": +-libcname = ctypes.util.find_library("c") +-assert libcname ++# find_library("c") does not work on musl, fall back to libc.so instead ++libcname = ctypes.util.find_library("c") or "libc.so" + libc = ctypes.cdll.LoadLibrary(libcname) + + fdopen = libc.fdopen +-- +2.43.0 + diff --git a/dev-python/psycopg/psycopg-3.1.17.ebuild b/dev-python/psycopg/psycopg-3.1.17.ebuild index 70302101bce9..df2def1f51f9 100644 --- a/dev-python/psycopg/psycopg-3.1.17.ebuild +++ b/dev-python/psycopg/psycopg-3.1.17.ebuild @@ -51,6 +51,11 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + # https://github.com/psycopg/psycopg/pull/725 + "${FILESDIR}/${P}-musl.patch" +) + python_compile() { # Python code + ctypes backend cd psycopg || die
[gentoo-commits] repo/gentoo:master commit in: dev-python/psycopg/files/, dev-python/psycopg/
commit: f04ac4dfe14c5cab939614ca9d07897c824d06e8 Author: William Hubbs sony com> AuthorDate: Mon Jul 15 21:18:45 2019 + Commit: William Hubbs gentoo org> CommitDate: Mon Jul 15 21:30:20 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f04ac4df dev-python/psycopg: 2.8.3 bump Closes: https://bugs.gentoo.org/683412 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: William Hubbs gentoo.org> dev-python/psycopg/Manifest| 1 + .../files/psycopg-2.8.3-avoid-mxdatetime.patch | 24 dev-python/psycopg/psycopg-2.8.3.ebuild| 70 ++ 3 files changed, 95 insertions(+) diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest index 1a34ee61b5e..e145a42249f 100644 --- a/dev-python/psycopg/Manifest +++ b/dev-python/psycopg/Manifest @@ -1,3 +1,4 @@ DIST psycopg2-2.7.4.tar.gz 425331 BLAKE2B 9d256ea340e4bace53981596d9d42863ddc9c8c079579b0621d8043af34daade05b9cec5465c6b3990f537a4350d9cf60a43062a0aa34db1f39b336296b32d3f SHA512 e78db528a4d3b897e0d8d38755179082dacddfb2d10bda963fc3836548991eaa0d4c1b8f81b329b15f4e685046c39e6f2a352b6c47b1da42af3a262094233034 DIST psycopg2-2.7.5.tar.gz 426358 BLAKE2B 301bd4c6ecbc29b1b02e477ffd3576c4bbb00142998a85f5a79678a96b521098a8d0bf75779ab7ecb082c6d374cbf41cc845dcba0e1413b98621f67f9b139135 SHA512 5bf85b6760871f904b6b570ea454f99b72cf97acf9cce10b63dc7b6b0b18913b50ad4f24c469d101c54de6ad6100f1cac3c58225076b5e584a677f5ab4170a93 DIST psycopg2-2.7.7.tar.gz 427474 BLAKE2B bc721b721693bc5f560a4829e84715d15e8c14523ada00109c7d7ba916c91928082fff286bd3c2ff5987c0436443128d1408ac9de073ad538b1e356fc73aaf8f SHA512 032344957c00bf659ca5e46f54f827a6d79809e370d661cd349e2ce935873359bcc4f440b74c6f14658bf1cd9598b6d884abae507fd33db9e07b01fc87967fb0 +DIST psycopg2-2.8.3.tar.gz 377333 BLAKE2B a4f22fb4dfc5492147bee198c587c5c5e43e197e5abb60cc7d5d7a006d91ffd22e35fbfeba35b8d36322f3802073fc105cb8270d436a3ad4d52b1c3c41ba39b1 SHA512 74268f6d05922c968d46ad62a49b4af54dc30463daa67cc0f32d5930c366596f9a1b2f368f2b38c8a9d45bfdcffb13be469a5cbf3911c62d163bea5c7a3ad928 diff --git a/dev-python/psycopg/files/psycopg-2.8.3-avoid-mxdatetime.patch b/dev-python/psycopg/files/psycopg-2.8.3-avoid-mxdatetime.patch new file mode 100644 index 000..3475bf31795 --- /dev/null +++ b/dev-python/psycopg/files/psycopg-2.8.3-avoid-mxdatetime.patch @@ -0,0 +1,24 @@ +diff --git a/setup.py b/setup.py +index c1f319a..c44fc69 100644 +--- a/setup.py b/setup.py +@@ -525,19 +525,6 @@ parser.read('setup.cfg') + + # check for mx package + have_mxdatetime = False +-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') + + # generate a nice version string to avoid confusion when users report bugs + version_flags.append('pq3') # no more a choice diff --git a/dev-python/psycopg/psycopg-2.8.3.ebuild b/dev-python/psycopg/psycopg-2.8.3.ebuild new file mode 100644 index 000..685d96de02e --- /dev/null +++ b/dev-python/psycopg/psycopg-2.8.3.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) + +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.org/project/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 +PATCHES=( + "${FILESDIR}"/psycopg-2.8.3-avoid-mxdatetime.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_DE
[gentoo-commits] repo/gentoo:master commit in: dev-python/psycopg/files/, dev-python/psycopg/
commit: 4eeca29c1cbeec279c6cb5d572bc0518162f237e Author: Aaron W. Swenson gentoo org> AuthorDate: Fri Jan 12 21:01:04 2018 + Commit: Aaron Swenson gentoo org> CommitDate: Fri Jan 12 21:01:04 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4eeca29c 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 dev-python/psycopg/Manifest| 1 + .../files/psycopg-2.7.3-avoid-mxdatetime.patch | 40 .../psycopg/files/psycopg-2.7.3-sphinx-1.6.patch | 29 + dev-python/psycopg/psycopg-2.7.3.2.ebuild | 72 ++ 4 files changed, 142 insertions(+) diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest index bcead7e4386..38aab41bf95 100644 --- a/dev-python/psycopg/Manifest +++ b/dev-python/psycopg/Manifest @@ -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 diff --git a/dev-python/psycopg/files/psycopg-2.7.3-avoid-mxdatetime.patch b/dev-python/psycopg/files/psycopg-2.7.3-avoid-mxdatetime.patch new file mode 100644 index 000..aab130c5450 --- /dev/null +++ b/dev-python/psycopg/files/psycopg-2.7.3-avoid-mxdatetime.patch @@ -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 ++