aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2021-07-06 05:40:02 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2021-07-06 05:44:31 +0000
commit8e0a4fc28c989b11ed57040cc5afd9b7044c04f9 (patch)
tree24ffc1b38ec996f32759817dba583bc1d3a7ea1f
parentde618556e1db93e0a6d32f2db9c5377718a9a6ec (diff)
downloadports-8e0a4fc28c989b11ed57040cc5afd9b7044c04f9.tar.gz
ports-8e0a4fc28c989b11ed57040cc5afd9b7044c04f9.zip
editors/py-vim-bridge: New port
vim_bridge is a Python-to-Vim bridge decorator that allows transparent calls to Python functions in native Vim scripts. WWW: https://github.com/nvie/vim_bridge
-rw-r--r--editors/Makefile1
-rw-r--r--editors/py-vim-bridge/Makefile28
-rw-r--r--editors/py-vim-bridge/distinfo3
-rw-r--r--editors/py-vim-bridge/files/patch-tests_test__vim__bridge.py11
-rw-r--r--editors/py-vim-bridge/pkg-descr4
5 files changed, 47 insertions, 0 deletions
diff --git a/editors/Makefile b/editors/Makefile
index a81ad28eccea..d20a15a04b25 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -223,6 +223,7 @@
SUBDIR += py-babi
SUBDIR += py-editorconfig
SUBDIR += py-pynvim
+ SUBDIR += py-vim-bridge
SUBDIR += quilter
SUBDIR += rehex
SUBDIR += rubygem-neovim
diff --git a/editors/py-vim-bridge/Makefile b/editors/py-vim-bridge/Makefile
new file mode 100644
index 000000000000..5e86563476c5
--- /dev/null
+++ b/editors/py-vim-bridge/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= vim-bridge
+DISTVERSION= 0.6
+CATEGORIES= editors python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= 0mp@FreeBSD.org
+COMMENT= Decorator enabing transparent calls to Python functions in Vim scripts
+
+LICENSE= BSD4CLAUSE
+LICENSE_FILE= ${WRKSRC}/setup.py
+
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR}
+
+USES= python
+USE_GITHUB= yes
+GH_ACCOUNT= nvie
+GH_PROJECT= vim_bridge
+USE_PYTHON= autoplist concurrent distutils flavors
+
+NO_ARCH= yes
+
+do-test:
+ @(cd ${TEST_WRKSRC} && \
+ ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test)
+
+.include <bsd.port.mk>
diff --git a/editors/py-vim-bridge/distinfo b/editors/py-vim-bridge/distinfo
new file mode 100644
index 000000000000..8cb51899edb0
--- /dev/null
+++ b/editors/py-vim-bridge/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1625548530
+SHA256 (nvie-vim_bridge-0.6_GH0.tar.gz) = 33a752e28b27ddc8f6e8f343b82194e55ed07fc6dbae7778fc5710f3add93783
+SIZE (nvie-vim_bridge-0.6_GH0.tar.gz) = 4679
diff --git a/editors/py-vim-bridge/files/patch-tests_test__vim__bridge.py b/editors/py-vim-bridge/files/patch-tests_test__vim__bridge.py
new file mode 100644
index 000000000000..5567616f024b
--- /dev/null
+++ b/editors/py-vim-bridge/files/patch-tests_test__vim__bridge.py
@@ -0,0 +1,11 @@
+--- tests/test_vim_bridge.py.orig 2021-07-06 05:27:03 UTC
++++ tests/test_vim_bridge.py
+@@ -80,7 +80,7 @@ class TestBridgedDecorator(unittest.TestCase):
+ self.assertCodeEquals(vim.command.call_args[0][0], \
+ """
+ fun! Foo(x, y)
+- python << endp
++ python3 << endp
+ __vim_brdg_3_x = vim.eval("a:x")
+ __vim_brdg_3_y = vim.eval("a:y")
+
diff --git a/editors/py-vim-bridge/pkg-descr b/editors/py-vim-bridge/pkg-descr
new file mode 100644
index 000000000000..18689bc2f3cb
--- /dev/null
+++ b/editors/py-vim-bridge/pkg-descr
@@ -0,0 +1,4 @@
+vim_bridge is a Python-to-Vim bridge decorator that allows transparent calls to
+Python functions in native Vim scripts.
+
+WWW: https://github.com/nvie/vim_bridge