Page MenuHomeFreeBSD

New port: editors/py-pynvim: Python client and plugin host for Neovim
ClosedPublic

Authored by 0mp on Mar 15 2019, 4:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:41 PM
Unknown Object (File)
Fri, Apr 19, 5:14 PM
Unknown Object (File)
Mon, Apr 8, 10:28 PM
Unknown Object (File)
Jan 16 2024, 6:02 AM
Unknown Object (File)
Dec 20 2023, 7:47 AM
Unknown Object (File)
Dec 5 2023, 1:18 PM
Unknown Object (File)
Dec 2 2023, 11:37 PM
Unknown Object (File)
Dec 2 2023, 11:37 PM
Subscribers
None

Details

Summary
New port: editors/py-pynvim: Python client and plugin host for Neovim


Pynvim implements support for python plugins in Nvim. It also works as a
library for connecting to and scripting Nvim processes through its msgpack-rpc
API.

WWW: https://pynvim.readthedocs.io/en/latest/
Test Plan
  • portlint
  • poudriere testport 11.2 (i386), 12.0 (amd64) with make test for both py36 and py27
  • manual testing on 13.0 amd64: Neovim plugins work as expected

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 23112
Build 22166: arc lint + arc unit

Event Timeline

editors/py-pynvim/Makefile
29–33

That will not work. If FLAVOR is not set in the environment (user or build tool), it will still be empty here as FLAVORS is only set after including bsd.port.pre.mk, which happens here in the last line of the Makefile.

38

If all you need is get a 3 when it is Python 3, it would be easier to just write:

SUFFIX_FOR_PYTHON_3=${PYTHON_MAJOR_VER:M3}

Simplify SUFFIX_FOR_PYTHON_3

0mp marked 2 inline comments as done.Mar 17 2019, 8:29 PM
0mp added inline comments.
editors/py-pynvim/Makefile
29–33

Ah this is that corner case that we talked about when I was adding examples to ports(7).

Thanks for clarification!

38

Great idea! I forgot about this approach

editors/py-pynvim/Makefile
29–33

Mmmm, no, this is different, it is an evaluation order problem.

Here, FLAVORS is set by the framework in Mk/Uses/pythoh.mk, which happens when bsd.port.mk is parsed at the end of the Makefile.

When you set FLAVOR?=${FLAVORS:[1]} it's ok because make does lazy evaluation and will only look for the value of the variable when used.

But then, you use FLAVOR in the .if ${FLAVOR... before FLAVORS is set. So if you are building the default flavor, FLAVOR is still empty, and the :Mxxx does not work correctly.

0mp marked 3 inline comments as done.Mar 17 2019, 10:44 PM
0mp added inline comments.
editors/py-pynvim/Makefile
29–33

Alright. Makes sense.

I've tested the current revision with both the default flavor and py36 and it works.

This revision is now accepted and ready to land.Mar 18 2019, 1:13 PM
This revision was automatically updated to reflect the committed changes.
0mp marked an inline comment as done.