diff options
Diffstat (limited to 'dev-python/pgspecial')
| -rw-r--r-- | dev-python/pgspecial/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/pgspecial/metadata.xml | 14 | ||||
| -rw-r--r-- | dev-python/pgspecial/pgspecial-2.2.1.ebuild | 65 |
3 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/pgspecial/Manifest b/dev-python/pgspecial/Manifest new file mode 100644 index 000000000000..017911977f36 --- /dev/null +++ b/dev-python/pgspecial/Manifest @@ -0,0 +1,2 @@ +DIST pgspecial-2.2.1.tar.gz 50389 BLAKE2B d5077e235b6db33c2bbe128aaa64dc925b4c7e3c9403de755986f981caeb77de54d12e2ea22a5a794ca3a9c318b714c9cd6cece59bddaa1f9110b890cae35188 SHA512 46d45bb92601493359c07b679b12f79c7a4289140805fa1da92736fd01dd4bfec6699e67bcf6a52d2a22d171585084679804b49fe601d5d6675a28c4273df547 +DIST pgspecial-2.2.1.tar.gz.provenance 9225 BLAKE2B cea9159347ce49b1ec221f4bd3823fc8057d7f84a1ac94c9f305b2a47034db52396bae101dba8fa832b1048ea41270c269634effc7f2860de5a96e5453eb5ef8 SHA512 db2ec51834326706d729600ffdf7abb4e196fe524dc3404e41fd01e4a55c9fd98b511337069b193900df2d65fc4d1de02f59598d2e760ced1853e739225f8b2d diff --git a/dev-python/pgspecial/metadata.xml b/dev-python/pgspecial/metadata.xml new file mode 100644 index 000000000000..efe1940a0b86 --- /dev/null +++ b/dev-python/pgspecial/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <longdescription> + PGSpecial provides an API to execute meta-commands + (AKA "special", or "backslash commands") on PostgreSQL. + </longdescription> + <stabilize-allarches /> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-python/pgspecial/pgspecial-2.2.1.ebuild b/dev-python/pgspecial/pgspecial-2.2.1.ebuild new file mode 100644 index 000000000000..52d69a0c6085 --- /dev/null +++ b/dev-python/pgspecial/pgspecial-2.2.1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_VERIFY_REPO=https://github.com/dbcli/pgspecial +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python implementation of PostgreSQL meta commands" +HOMEPAGE=" + https://github.com/dbcli/pgspecial/ + https://pypi.org/project/pgspecial/ +" + +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="amd64 arm64 x86" + +RDEPEND=" + >=dev-python/click-4.1[${PYTHON_USEDEP}] + >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}] + >=dev-python/psycopg-3.0.10:0[${PYTHON_USEDEP}] + >=dev-python/sqlparse-0.1.19[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + >=dev-db/postgresql-8.1[server] + ) +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +DOCS=( License.txt README.rst changelog.rst ) + +EPYTEST_DESELECT=( + # assumes a very specific locale + tests/test_specials.py::test_slash_l + tests/test_specials.py::test_slash_l_pattern + # change in postgres? *shrug* + tests/test_specials.py::test_slash_d_view_verbose + tests/test_specials.py::test_slash_dn + # fails with postgresql:17 + tests/test_specials.py::test_slash_ddp + tests/test_specials.py::test_slash_ddp_pattern +) + +src_test() { + local db=${T}/pgsql + + initdb --username=postgres -D "${db}" || die + # TODO: random port + pg_ctl -w -D "${db}" start \ + -o "-h '127.0.0.1' -p 5432 -k '${T}'" || die + psql -h "${T}" -U postgres -d postgres \ + -c "ALTER ROLE postgres WITH PASSWORD 'postgres';" || die + createdb -h "${T}" -U postgres _test_db || die + + distutils-r1_src_test + + pg_ctl -w -D "${db}" stop || die +} |
