summaryrefslogtreecommitdiff
path: root/dev-db/pgcli
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
commitab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch)
treee8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /dev-db/pgcli
parent6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff)
gentoo resync : 18.12.2020
Diffstat (limited to 'dev-db/pgcli')
-rw-r--r--dev-db/pgcli/Manifest5
-rw-r--r--dev-db/pgcli/files/pgcli-3.0.0-sqlparse.patch37
-rw-r--r--dev-db/pgcli/pgcli-2.2.0.ebuild44
-rw-r--r--dev-db/pgcli/pgcli-3.0.0-r1.ebuild (renamed from dev-db/pgcli/pgcli-3.0.0.ebuild)29
4 files changed, 52 insertions, 63 deletions
diff --git a/dev-db/pgcli/Manifest b/dev-db/pgcli/Manifest
index 49d67b4514a2..3bade1fb664d 100644
--- a/dev-db/pgcli/Manifest
+++ b/dev-db/pgcli/Manifest
@@ -1,5 +1,4 @@
-DIST pgcli-2.2.0.tar.gz 436991 BLAKE2B 9041240952a8ba9a770705850bf4281eaa89ac5b970366c7ec27e705bec65d9c3c455fb2c9d2220d53f4a9ff31142501437faa6974839f6fe59e6fc1618d8a6d SHA512 239a3278b604248b7bd5cdaf4d0b0f3e62188617b04c358d123e2fa2ad1449c3854ef84995b89239fcf559ce010ee0dd80e12ddd72b27dcb89f92ac08d34c49b
+AUX pgcli-3.0.0-sqlparse.patch 1258 BLAKE2B bb899fcd3e059e3380d3bdba12765a1709af9cdb7f9da7358a436afc7229c8b33a2c83e27895321b6fe327ba2e81a35166a04649928d52215fc429df09d16b63 SHA512 c2e40269a65fe07140329c70d063e23dbf6853939005a35b209d1f32bb60786ece4fc37c760fc25ecf4859cde0cf7a4df158caaf6e40660a158bd102ecf15173
DIST pgcli-3.0.0.tar.gz 437733 BLAKE2B 5db69997f675812c3ef847b220b66e7872b134b4d8debd668154bdfa6020432ac08829e7c2ce42adc4cf124e84de5eb9aacbe19636216502f81373a71f21b68f SHA512 7ac52cbfc492dc85163dac7df7a5dde6bfa0327ac1ef6580891cb76d617b998d74c2a59b27d2f8abf8699eb5a69aba30bf13e95ad7bee75c83350730ac061262
-EBUILD pgcli-2.2.0.ebuild 1227 BLAKE2B 08be8bcd8eda124c8255abce36cf761a4e3f3575895ecc74d07d1a502db90b8e8d7342f659582b8bf178ad3eda913aba8ebe1e9996ab4eaa41241dc066debb21 SHA512 cc67eeb6889411784bd79f226d8a000fb54f040b25be2f5a1dbffb39331b28a92d9385c09cb5129638e44a3610492b399ea58754a5ff858fb37706d9d2fb5ff7
-EBUILD pgcli-3.0.0.ebuild 1190 BLAKE2B 5372491093076a14591371c22fe76f4f267a3cf33a3ee4bec09987b343ab1ca427007aee6120859af33e1bc6e8296971b483d3cb1732db67050fa7298acae38f SHA512 c4e5711dfc90fd80d3b3327d8381e5aae7e1a07757b1bff9c4163d7827398b42b29b8ea7f12117a07b6a1588aa516c0a9e99049ef9eeefa6463f9bc94b6f438e
+EBUILD pgcli-3.0.0-r1.ebuild 1066 BLAKE2B c879ab11069b87424a5c9118e27f0b0ec06f9dc2d9d5584d13d25f2c52dc4365e37656ab9c0d0df2fc00713fa8a3840f7796a4af4452cda23ee5948d79d563bf SHA512 85b78c0153202b25ea0b3900a9c26579655f4fcfbe735ae271f0a32f3544791348f82d8a758794071b895863538fa47fa973169d2d92f1630e7f4f57615b9e0d
MISC metadata.xml 460 BLAKE2B c6dc837776eb72ba61b0b0e00cd3f3adc022b70385204346eb2aa0eb8229636ab230be67b194993b22e18cda08b4f968ff02b96d390b8782aac2a4f4de92d7ee SHA512 a3b44f66861c5f8b66cda0fcac6b1d3418bf04835e7ed202ae22faca50ee22187fda785c6e7e7c0848f31b88e1cd9c8c6b4be1999eb600d48965edff2e959c35
diff --git a/dev-db/pgcli/files/pgcli-3.0.0-sqlparse.patch b/dev-db/pgcli/files/pgcli-3.0.0-sqlparse.patch
new file mode 100644
index 000000000000..4403a2e9c037
--- /dev/null
+++ b/dev-db/pgcli/files/pgcli-3.0.0-sqlparse.patch
@@ -0,0 +1,37 @@
+Taken from: https://github.com/dbcli/pgcli/pull/1224
+Author: Kevin Marsh <kevinmarsh3@gmail.com>
+
+--- a/pgcli/packages/parseutils/ctes.py
++++ b/pgcli/packages/parseutils/ctes.py
+@@ -16,7 +16,7 @@
+ def isolate_query_ctes(full_text, text_before_cursor):
+ """Simplify a query by converting CTEs into table metadata objects"""
+
+- if not full_text:
++ if not full_text or not full_text.strip():
+ return full_text, text_before_cursor, tuple()
+
+ ctes, remainder = extract_ctes(full_text)
+--- a/setup.py
++++ b/setup.py
+@@ -13,7 +13,7 @@
+ # see: https://github.com/dbcli/pgcli/pull/1197
+ "prompt_toolkit>=2.0.6,<4.0.0",
+ "psycopg2 >= 2.8",
+- "sqlparse >=0.3.0,<0.4",
++ "sqlparse >=0.3.0,<0.5",
+ "configobj >= 5.0.6",
+ "pendulum>=2.1.0",
+ "cli_helpers[styles] >= 2.0.0",
+--- a/tests/test_sqlcompletion.py
++++ b/tests/test_sqlcompletion.py
+@@ -816,7 +816,7 @@ def test_create_db_with_template():
+ assert set(suggestions) == set((Database(),))
+
+
+-@pytest.mark.parametrize("initial_text", ("", " ", "\t \t"))
++@pytest.mark.parametrize("initial_text", ("", " ", "\t \t", "\n"))
+ def test_specials_included_for_initial_completion(initial_text):
+ suggestions = suggest_type(initial_text, initial_text)
+
+
diff --git a/dev-db/pgcli/pgcli-2.2.0.ebuild b/dev-db/pgcli/pgcli-2.2.0.ebuild
deleted file mode 100644
index 54f699d3aa06..000000000000
--- a/dev-db/pgcli/pgcli-2.2.0.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit distutils-r1
-
-DESCRIPTION="CLI for Postgres with auto-completion and syntax highlighting"
-HOMEPAGE="https://www.pgcli.com https://github.com/dbcli/pgcli"
-SRC_URI="https://github.com/dbcli/pgcli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="
- >=dev-python/prompt_toolkit-2.0.6[${PYTHON_USEDEP}]
- <dev-python/prompt_toolkit-3.0.0[${PYTHON_USEDEP}]
- >=dev-python/psycopg-2.8.0[${PYTHON_USEDEP}]
- >=dev-python/sqlparse-0.3.0[${PYTHON_USEDEP}]
- <dev-python/sqlparse-0.4.0[${PYTHON_USEDEP}]
- >=dev-python/cli_helpers-1.2.0[${PYTHON_USEDEP}]
- >=dev-python/click-4.1[${PYTHON_USEDEP}]
- >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
- >=dev-python/humanize-0.5.1[${PYTHON_USEDEP}]
- >=dev-python/pgspecial-1.11.8[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
- >=dev-python/setproctitle-1.1.9[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-BDEPEND="
- test? (
- dev-db/postgresql
- dev-python/mock[${PYTHON_USEDEP}]
- )
-"
-
-# there is a flaky test, so no tests for now
-RESTRICT="test"
-
-distutils_enable_tests pytest
diff --git a/dev-db/pgcli/pgcli-3.0.0.ebuild b/dev-db/pgcli/pgcli-3.0.0-r1.ebuild
index b5da66f7a3dd..8b0fa47c6b88 100644
--- a/dev-db/pgcli/pgcli-3.0.0.ebuild
+++ b/dev-db/pgcli/pgcli-3.0.0-r1.ebuild
@@ -13,29 +13,26 @@ SRC_URI="https://github.com/dbcli/pgcli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD MIT"
SLOT="0"
-KEYWORDS="~amd64 x86"
+KEYWORDS="amd64 x86"
RDEPEND="
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/cli_helpers[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/humanize[${PYTHON_USEDEP}]
+ dev-python/pgspecial[${PYTHON_USEDEP}]
>=dev-python/prompt_toolkit-3.0.0[${PYTHON_USEDEP}]
- <dev-python/prompt_toolkit-4.0.0[${PYTHON_USEDEP}]
- >=dev-python/psycopg-2.8.0[${PYTHON_USEDEP}]
- >=dev-python/sqlparse-0.3.0[${PYTHON_USEDEP}]
- <dev-python/sqlparse-0.4.0[${PYTHON_USEDEP}]
- >=dev-python/cli_helpers-1.2.0[${PYTHON_USEDEP}]
- >=dev-python/click-4.1[${PYTHON_USEDEP}]
- >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
- >=dev-python/humanize-0.5.1[${PYTHON_USEDEP}]
- >=dev-python/pgspecial-1.11.8[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
- >=dev-python/setproctitle-1.1.9[${PYTHON_USEDEP}]
-"
+ dev-python/psycopg[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ dev-python/sqlparse[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"
-
BDEPEND="
test? (
dev-db/postgresql
dev-python/mock[${PYTHON_USEDEP}]
- )
-"
+ )"
+
+PATCHES=( "${FILESDIR}"/${P}-sqlparse.patch )
distutils_enable_tests pytest