aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-mycli
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2016-11-20 01:07:43 +0800
committersunpoet <sunpoet@FreeBSD.org>2016-11-20 01:07:43 +0800
commit15d2c1454884055342202eeb6282fd4259100dea (patch)
tree3f36bfc672ee9ce857367ddda54ac3c683f9cfcd /databases/py-mycli
parent7cf3dd834c2656ca85ceb09770a8330fd55f235e (diff)
downloadfreebsd-ports-gnome-15d2c1454884055342202eeb6282fd4259100dea.tar.gz
freebsd-ports-gnome-15d2c1454884055342202eeb6282fd4259100dea.tar.zst
freebsd-ports-gnome-15d2c1454884055342202eeb6282fd4259100dea.zip
- Import upstream patch for sqlparse 0.2.2
- Bump PORTREVISION for package change Obtained from: https://github.com/dbcli/mycli/commit/63a6339e451dfe537f1b7cf43758409abea52342
Diffstat (limited to 'databases/py-mycli')
-rw-r--r--databases/py-mycli/Makefile3
-rw-r--r--databases/py-mycli/files/patch-mycli-packages-completion_engine.py14
-rw-r--r--databases/py-mycli/files/patch-mycli-packages-parseutils.py13
-rw-r--r--databases/py-mycli/files/patch-setup.py13
4 files changed, 42 insertions, 1 deletions
diff --git a/databases/py-mycli/Makefile b/databases/py-mycli/Makefile
index 960887ffaac3..91df72d357e6 100644
--- a/databases/py-mycli/Makefile
+++ b/databases/py-mycli/Makefile
@@ -3,6 +3,7 @@
PORTNAME= mycli
PORTVERSION= 1.8.1
+PORTREVISION= 1
CATEGORIES= databases python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -19,7 +20,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=4.1:devel/py-click \
${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto \
${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments \
${PYTHON_PKGNAMEPREFIX}pymysql>=0.6.2:databases/py-pymysql \
- ${PYTHON_PKGNAMEPREFIX}sqlparse>=0.2.0:databases/py-sqlparse
+ ${PYTHON_PKGNAMEPREFIX}sqlparse>=0.2.2:databases/py-sqlparse
NO_ARCH= yes
USE_PYTHON= autoplist distutils
diff --git a/databases/py-mycli/files/patch-mycli-packages-completion_engine.py b/databases/py-mycli/files/patch-mycli-packages-completion_engine.py
new file mode 100644
index 000000000000..19ac03cda285
--- /dev/null
+++ b/databases/py-mycli/files/patch-mycli-packages-completion_engine.py
@@ -0,0 +1,14 @@
+Obtained from: https://github.com/dbcli/mycli/commit/63a6339e451dfe537f1b7cf43758409abea52342
+
+--- mycli/packages/completion_engine.py.orig 2016-09-18 04:19:04 UTC
++++ mycli/packages/completion_engine.py
+@@ -197,6 +197,9 @@ def suggest_based_on_last_token(token, t
+ return [{'type': 'column', 'tables': extract_tables(full_text)}]
+ elif token_v in ('set', 'by', 'distinct'):
+ return [{'type': 'column', 'tables': extract_tables(full_text)}]
++ elif token_v == 'as':
++ # Don't suggest anything for an alias
++ return []
+ elif token_v in ('show'):
+ return [{'type': 'show'}]
+ elif token_v in ('to',):
diff --git a/databases/py-mycli/files/patch-mycli-packages-parseutils.py b/databases/py-mycli/files/patch-mycli-packages-parseutils.py
new file mode 100644
index 000000000000..901e39e9a998
--- /dev/null
+++ b/databases/py-mycli/files/patch-mycli-packages-parseutils.py
@@ -0,0 +1,13 @@
+Obtained from: https://github.com/dbcli/mycli/commit/63a6339e451dfe537f1b7cf43758409abea52342
+
+--- mycli/packages/parseutils.py.orig 2015-10-16 13:27:27 UTC
++++ mycli/packages/parseutils.py
+@@ -64,7 +64,7 @@ def last_word(text, include='alphanum_un
+ # This code is borrowed from sqlparse example script.
+ # <url>
+ def is_subselect(parsed):
+- if not parsed.is_group():
++ if not parsed.is_group:
+ return False
+ for item in parsed.tokens:
+ if item.ttype is DML and item.value.upper() in ('SELECT', 'INSERT',
diff --git a/databases/py-mycli/files/patch-setup.py b/databases/py-mycli/files/patch-setup.py
new file mode 100644
index 000000000000..0b3f8925af65
--- /dev/null
+++ b/databases/py-mycli/files/patch-setup.py
@@ -0,0 +1,13 @@
+Obtained from: https://github.com/dbcli/mycli/commit/63a6339e451dfe537f1b7cf43758409abea52342
+
+--- setup.py.orig 2016-09-20 16:46:21 UTC
++++ setup.py
+@@ -16,7 +16,7 @@ install_requirements = [
+ 'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
+ 'prompt_toolkit>=1.0.0,<1.1.0',
+ 'PyMySQL >= 0.6.2',
+- 'sqlparse>=0.2.0,<0.2.2',
++ 'sqlparse>=0.2.2,<0.3.0',
+ 'configobj >= 5.0.6',
+ ]
+