summaryrefslogtreecommitdiff
path: root/dev-python/peewee
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/peewee')
-rw-r--r--dev-python/peewee/Manifest5
-rw-r--r--dev-python/peewee/files/peewee-3.18.1-cython-3.1.patch23
-rw-r--r--dev-python/peewee/peewee-3.18.0.ebuild81
-rw-r--r--dev-python/peewee/peewee-3.18.1.ebuild86
4 files changed, 195 insertions, 0 deletions
diff --git a/dev-python/peewee/Manifest b/dev-python/peewee/Manifest
index f3f35c0a8393..7c761f125f5b 100644
--- a/dev-python/peewee/Manifest
+++ b/dev-python/peewee/Manifest
@@ -1,3 +1,8 @@
+AUX peewee-3.18.1-cython-3.1.patch 890 BLAKE2B 64fbf0490c7ef14c2073c9bcb45692ed1a711b572f1403d5c8a6c6af3b7d655c8a97380144c35fdd30c6e5928fd833ac1d661a536efb284b2e6096f106531689 SHA512 06d527c68761f71d13af3aba2a0f0841aa48e54cb96e239bb278d99fab08a6ce10bb22c57a8b6cfb0d4dded6274a1bdcd36ef98a48238cdb87675bea90b55e4b
DIST peewee-3.17.9.gh.tar.gz 930724 BLAKE2B 6ce8156b48876db93344b7eaac14122d9d11812cdacb80dc4f3db0e7aa05a97b279f27e5b8d17016cb43d68f5e9ecd4e591cd58e2520677dfba7544395447911 SHA512 7082b0abcdaf47ee7b50066773c8491bebc94502b875a0f2a01f6d8d251fd147c738362021ab1d45dbc8ddc73fd7a37c0bc2732623d0f4b3e5d314caea7da510
+DIST peewee-3.18.0.gh.tar.gz 931113 BLAKE2B 615062dcdcbbedc8f9e92c9d4cdd35b96207689f76b7a336d472d5aed6b43fb65d4d74d84fac2c72096d7c4003b5b88fba77a6ee9eb9a64b8ebd8d3932187d89 SHA512 2753e076897c1a895942fe55f17763e4ad78defece29c0973b35146c767edb66f9447949eb3fe28fb0b45e74b805aa0115da234a1bdf67412e5f928a35c27390
+DIST peewee-3.18.1.gh.tar.gz 931200 BLAKE2B eacd3571175ae3bac019ac2dd0dcd561b9ef863a243bf54d45b8bb18656a458d32244f0a55b2e1d91dc07c7232c5f6182438c92f912d9f6ab75dee953b94d570 SHA512 eeef91aa30eea6ea6d4e1a7cdef7e8c207511ae65455cb0b5f84945c38ac6de3c8e218aa24752e3345d1eb4efcbf20ed289cf764c6fbd631b51be3d5075bc8b7
EBUILD peewee-3.17.9.ebuild 1575 BLAKE2B 330aa1d7a37890f1502cb481597da1d2aef63adde29150739e053f5ddc9b8aa2185de25b2485c587f89554ca548539f345823d831b40fe4569ed9f00a54e0430 SHA512 5abb3226bf538b29b70899f11c00165edd9ed297176d63acc836aa10b9e825fb84019874ec3e1d1cbd1a476903bd214a90e83804881269b4a563421f3a27b09d
+EBUILD peewee-3.18.0.ebuild 1577 BLAKE2B 33264f647f3b791786e3472419edf85baa63da12c4c537d58577c2ccb1b50bc1b029f49d5cb826a508c630c9392f275e8bacc6a28a08a5e5f6ece99be706842a SHA512 0e8479dddf0c803462fbd8eb7f1fa74edb271fa5e9ec954685c8abc3475a323c0b55f7e1044929d2c0e0d80a6e40e8eacfe8a2be0021382abcf55a33473f0901
+EBUILD peewee-3.18.1.ebuild 1725 BLAKE2B 398ff9854812e49ad68e89940adfc8a867ea8eeb055eae6af092ca2e0e735989ca694debf7bde3707e9eceb65a91a294cca8f6f46a8dfee8c5c8a03343691ac9 SHA512 fc6caa4c8fc5bd4e16ba4503d38a5a52b953259995dabd0fca5619f8befd296c164cfb594581734dd3b174e35738d192d1a0184bd8ce975e799ca3f25a150221
MISC metadata.xml 493 BLAKE2B 60dbc97d8a2acf239b6ae84ae48153ec7985399ef588de5fd3d5e06db137353ba8440eeb811fe90edb66aef70550c514c23f53cf8ee2c5e8146504dae71cef19 SHA512 28227e81ad41534f8dc80dc478cb72e116aa3d5259bb91dd20121fcadd803a04715a986e21d4302a0c8129a4fcafbd71645636b0e5b3384a661f3ee93d41fde2
diff --git a/dev-python/peewee/files/peewee-3.18.1-cython-3.1.patch b/dev-python/peewee/files/peewee-3.18.1-cython-3.1.patch
new file mode 100644
index 000000000000..819c5c8905bc
--- /dev/null
+++ b/dev-python/peewee/files/peewee-3.18.1-cython-3.1.patch
@@ -0,0 +1,23 @@
+From 3aadae7eb3602f3ab893343045aa30d427985534 Mon Sep 17 00:00:00 2001
+From: Charles Leifer <coleifer@gmail.com>
+Date: Thu, 1 May 2025 07:38:07 -0500
+Subject: [PATCH] Remove long check for newer cython.
+
+Fixes #2987
+---
+ playhouse/_sqlite_ext.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/playhouse/_sqlite_ext.pyx b/playhouse/_sqlite_ext.pyx
+index 41df21870..93b71cb52 100644
+--- a/playhouse/_sqlite_ext.pyx
++++ b/playhouse/_sqlite_ext.pyx
+@@ -326,7 +326,7 @@ cdef sqlite_to_python(int argc, sqlite3_value **params):
+ cdef python_to_sqlite(sqlite3_context *context, value):
+ if value is None:
+ sqlite3_result_null(context)
+- elif isinstance(value, (int, long)):
++ elif isinstance(value, int):
+ sqlite3_result_int64(context, <sqlite3_int64>value)
+ elif isinstance(value, float):
+ sqlite3_result_double(context, <double>value)
diff --git a/dev-python/peewee/peewee-3.18.0.ebuild b/dev-python/peewee/peewee-3.18.0.ebuild
new file mode 100644
index 000000000000..e1296aa9a27d
--- /dev/null
+++ b/dev-python/peewee/peewee-3.18.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="Small Python ORM"
+HOMEPAGE="
+ https://github.com/coleifer/peewee/
+ https://pypi.org/project/peewee/
+"
+SRC_URI="
+ https://github.com/coleifer/peewee/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="examples +native-extensions test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ native-extensions? ( dev-db/sqlite:3= )
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ dev-db/postgresql
+ dev-python/psycopg:0[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+ )
+"
+
+distutils_enable_sphinx docs \
+ dev-python/sphinx-rtd-theme
+
+src_prepare() {
+ # disable test failing on postgres 16
+ sed -e 's/test_timeout/_&/' -i tests/sqliteq.py || die
+
+ default
+}
+
+src_compile() {
+ if ! use native-extensions; then
+ local -x NO_SQLITE=1
+ fi
+
+ distutils-r1_src_compile
+}
+
+src_test() {
+ initdb -D "${T}"/pgsql || die
+ pg_ctl -w -D "${T}"/pgsql start -o "-h '' -k '${T}'" || die
+ createdb -h "${T}" peewee_test || die
+ psql -h "${T}" peewee_test -c 'create extension hstore;' || die
+
+ local -x PEEWEE_PSQL_HOST="${T}"
+ distutils-r1_src_test
+
+ pg_ctl -w -D "${T}"/pgsql stop || die
+}
+
+python_test() {
+ "${EPYTHON}" runtests.py -v 2 || die "tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use examples && DOCS=( examples/ )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/peewee/peewee-3.18.1.ebuild b/dev-python/peewee/peewee-3.18.1.ebuild
new file mode 100644
index 000000000000..19e58e6829a5
--- /dev/null
+++ b/dev-python/peewee/peewee-3.18.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="Small Python ORM"
+HOMEPAGE="
+ https://github.com/coleifer/peewee/
+ https://pypi.org/project/peewee/
+"
+SRC_URI="
+ https://github.com/coleifer/peewee/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="examples +native-extensions test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ native-extensions? ( dev-db/sqlite:3= )
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ dev-db/postgresql
+ dev-python/psycopg:0[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+ )
+"
+
+distutils_enable_sphinx docs \
+ dev-python/sphinx-rtd-theme
+
+src_prepare() {
+ local PATCHES=(
+ # https://github.com/dumpmemory/peewee/commit/3aadae7eb3602f3ab893343045aa30d427985534
+ "${FILESDIR}/${P}-cython-3.1.patch"
+ )
+
+ default
+
+ # disable test failing on postgres 16
+ sed -e 's/test_timeout/_&/' -i tests/sqliteq.py || die
+}
+
+src_compile() {
+ if ! use native-extensions; then
+ local -x NO_SQLITE=1
+ fi
+
+ distutils-r1_src_compile
+}
+
+src_test() {
+ initdb -D "${T}"/pgsql || die
+ pg_ctl -w -D "${T}"/pgsql start -o "-h '' -k '${T}'" || die
+ createdb -h "${T}" peewee_test || die
+ psql -h "${T}" peewee_test -c 'create extension hstore;' || die
+
+ local -x PEEWEE_PSQL_HOST="${T}"
+ distutils-r1_src_test
+
+ pg_ctl -w -D "${T}"/pgsql stop || die
+}
+
+python_test() {
+ "${EPYTHON}" runtests.py -v 2 || die "tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use examples && DOCS=( examples/ )
+ distutils-r1_python_install_all
+}