svn commit: r499139 - in head/devel/py-http-prompt: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Tue Apr 16 23:50:25 UTC 2019
Author: sunpoet
Date: Tue Apr 16 23:50:21 2019
New Revision: 499139
URL: https://svnweb.freebsd.org/changeset/ports/499139
Log:
Allow build with py-prompt_toolkit 2.x
- Bump PORTREVISION for package change
Obtained from: https://github.com/jonathanslenders/http-prompt/commit/34de86178d8ae2b478e0ad989222aab24dd4c046
https://github.com/jonathanslenders/http-prompt/commit/d3d84de2aa7f3fce521e5ac63f4bbcf9a2166501
Approved by: dbaio (maintainer)
Added:
head/devel/py-http-prompt/files/patch-http_prompt-cli.py (contents, props changed)
head/devel/py-http-prompt/files/patch-http_prompt-utils.py (contents, props changed)
head/devel/py-http-prompt/files/patch-requirements.txt (contents, props changed)
Modified:
head/devel/py-http-prompt/Makefile
Modified: head/devel/py-http-prompt/Makefile
==============================================================================
--- head/devel/py-http-prompt/Makefile Tue Apr 16 23:50:15 2019 (r499138)
+++ head/devel/py-http-prompt/Makefile Tue Apr 16 23:50:21 2019 (r499139)
@@ -2,6 +2,7 @@
PORTNAME= http-prompt
PORTVERSION= 1.0.0
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -14,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=5.0:devel/py-click@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}parsimonious>=0.6.2:textproc/py-parsimonious@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}prompt_toolkit>=1.0.0:devel/py-prompt_toolkit@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}prompt_toolkit>=2.0.0:devel/py-prompt_toolkit@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygments>=2.1.0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httpie>=0.9.2:www/py-httpie@${PY_FLAVOR}
Added: head/devel/py-http-prompt/files/patch-http_prompt-cli.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-http-prompt/files/patch-http_prompt-cli.py Tue Apr 16 23:50:21 2019 (r499139)
@@ -0,0 +1,40 @@
+Obtained from: https://github.com/jonathanslenders/http-prompt/commit/34de86178d8ae2b478e0ad989222aab24dd4c046
+ https://github.com/jonathanslenders/http-prompt/commit/d3d84de2aa7f3fce521e5ac63f4bbcf9a2166501
+
+--- http_prompt/cli.py.orig 2018-11-04 14:03:53 UTC
++++ http_prompt/cli.py
+@@ -9,11 +9,11 @@ import click
+
+ from httpie.plugins import FormatterPlugin # noqa, avoid cyclic import
+ from httpie.output.formatters.colors import Solarized256Style
+-from prompt_toolkit import prompt, AbortAction
++from prompt_toolkit import prompt
+ from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
+ from prompt_toolkit.history import FileHistory
+-from prompt_toolkit.layout.lexers import PygmentsLexer
+-from prompt_toolkit.styles.from_pygments import style_from_pygments
++from prompt_toolkit.lexers import PygmentsLexer
++from prompt_toolkit.styles.pygments import style_from_pygments_cls
+ from pygments.styles import get_style_by_name
+ from pygments.util import ClassNotFound
+ from six.moves.http_cookies import SimpleCookie
+@@ -135,7 +135,7 @@ def cli(spec, env, url, http_options):
+ style_class = get_style_by_name(cfg['command_style'])
+ except ClassNotFound:
+ style_class = Solarized256Style
+- style = style_from_pygments(style_class)
++ style = style_from_pygments_cls(style_class)
+
+ listener = ExecutionListener(cfg)
+
+@@ -159,7 +159,9 @@ def cli(spec, env, url, http_options):
+ text = prompt('%s> ' % context.url, completer=completer,
+ lexer=lexer, style=style, history=history,
+ auto_suggest=AutoSuggestFromHistory(),
+- on_abort=AbortAction.RETRY, vi_mode=cfg['vi'])
++ vi_mode=cfg['vi'])
++ except KeyboardInterrupt:
++ continue # Control-C pressed
+ except EOFError:
+ break # Control-D pressed
+ else:
Added: head/devel/py-http-prompt/files/patch-http_prompt-utils.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-http-prompt/files/patch-http_prompt-utils.py Tue Apr 16 23:50:21 2019 (r499139)
@@ -0,0 +1,13 @@
+Obtained from: https://github.com/jonathanslenders/http-prompt/commit/34de86178d8ae2b478e0ad989222aab24dd4c046
+
+--- http_prompt/utils.py.orig 2018-11-04 14:03:53 UTC
++++ http_prompt/utils.py
+@@ -3,7 +3,7 @@ from __future__ import unicode_literals
+ import math
+ import re
+
+-from prompt_toolkit.shortcuts import create_output
++from prompt_toolkit.output.defaults import create_output
+ from six.moves import range
+
+
Added: head/devel/py-http-prompt/files/patch-requirements.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-http-prompt/files/patch-requirements.txt Tue Apr 16 23:50:21 2019 (r499139)
@@ -0,0 +1,12 @@
+Obtained from: https://github.com/jonathanslenders/http-prompt/commit/34de86178d8ae2b478e0ad989222aab24dd4c046
+
+--- requirements.txt.orig 2018-11-04 14:03:53 UTC
++++ requirements.txt
+@@ -1,6 +1,6 @@
+ click>=5.0
+ httpie>=0.9.2
+ parsimonious>=0.6.2
+-prompt-toolkit>=1.0.0,<2.0.0
++prompt-toolkit>=2.0.0,<2.1.0
+ Pygments>=2.1.0
+ six>=1.10.0
More information about the svn-ports-all
mailing list