diff options
Diffstat (limited to 'dev-python/peewee')
-rw-r--r-- | dev-python/peewee/Manifest | 2 | ||||
-rw-r--r-- | dev-python/peewee/peewee-3.17.6.ebuild | 79 |
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/peewee/Manifest b/dev-python/peewee/Manifest index f317b7d23b3e..81938a980788 100644 --- a/dev-python/peewee/Manifest +++ b/dev-python/peewee/Manifest @@ -1,3 +1,5 @@ DIST peewee-3.17.5.gh.tar.gz 927674 BLAKE2B 45d23ebec38363a83441c916def460d76c7fe54175497df53de5a904d57b3d2cdbe077f757028b85f6a5eba0e65f1eab9ee99ceea11a00a9b111fce842ccd010 SHA512 b9878450a0759740f28cb6425ba0f14aa92e037bc4c888c13ae24bc38993787e64bff6342edcdf5364b5aac97c405e1c8e53e1140016e6bdbeba6d57d7f339ec +DIST peewee-3.17.6.gh.tar.gz 929364 BLAKE2B f7add872316dae1210a4dec4a71cf0b5122010e3da854019887143111cca5ed7f53b48bdf68aaa215097bde8003878e4aae0ddf827fb3fd0ab635345815a0d7a SHA512 7250b931ebaab6f5e1fbc9461cb737e30eef794bbc6a15f6f1ba59e358bd9101c17d31112906d314a12f0a05b4c2112435f90053a866f3b91d0e5a1dc4aba2f8 EBUILD peewee-3.17.5.ebuild 1361 BLAKE2B 7398c9dd9a880f5f6e9b92f9480111b2d94a57343c2e092cf8430bdf4a2e96cfba04af1be6db3dad23f98054736ddb686ff114d1003ead78669f7dba8339ad5c SHA512 635e1410f8efbfc8722eccccc8030828debc47a3d1a575df27ad1a86b7c423dced1c3f7e9ce69b05d6224c44c2552aa29d5591db9b51b72f6943eb434e82de63 +EBUILD peewee-3.17.6.ebuild 1487 BLAKE2B 76385ff4cfcabb6d97fb0f490ac12b651b07f609a0c4275cba95dfb6a3b8e5ea4103ae4541cece405210068853a2e717a54516cc9177b48a5be50e53cc596215 SHA512 e5c6f9c8c5d2ce2c03b9339f99f4053f43d604b1f2a34352c5bc726a25df21b186045b40d036cf41eae4ea29c793434c9597302577e9ced6e229271172e635f5 MISC metadata.xml 493 BLAKE2B 60dbc97d8a2acf239b6ae84ae48153ec7985399ef588de5fd3d5e06db137353ba8440eeb811fe90edb66aef70550c514c23f53cf8ee2c5e8146504dae71cef19 SHA512 28227e81ad41534f8dc80dc478cb72e116aa3d5259bb91dd20121fcadd803a04715a986e21d4302a0c8129a4fcafbd71645636b0e5b3384a661f3ee93d41fde2 diff --git a/dev-python/peewee/peewee-3.17.6.ebuild b/dev-python/peewee/peewee-3.17.6.ebuild new file mode 100644 index 000000000000..29745063bc56 --- /dev/null +++ b/dev-python/peewee/peewee-3.17.6.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2024 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}] + ) +" + +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 + + 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 +} |