# $OpenBSD: Makefile,v 1.12 2021/07/18 09:20:57 paco Exp $

COMMENT =	Python plugin support for Neovim

MODPY_EGG_VERSION =	0.4.3
DISTNAME =		pynvim-${MODPY_EGG_VERSION}
PKGNAME =		py-neovim-${MODPY_EGG_VERSION}

CATEGORIES =	editors devel
HOMEPAGE =	https://github.com/neovim/pynvim
MAINTAINER =	Edd Barrett <edd@openbsd.org>

# Apache-2.0
PERMIT_PACKAGE =	Yes

MODULES =		lang/python
MODPY_SETUPTOOLS =	Yes
MODPY_PI =		Yes

FLAVORS =		python3
FLAVOR =		python3

RUN_DEPENDS =		net/py-msgpack${MODPY_FLAVOR} \
			devel/py-uv${MODPY_FLAVOR} \
			devel/py-greenlet${MODPY_FLAVOR}
TEST_DEPENDS =		devel/py-test${MODPY_FLAVOR} \
			${BASE_PKGPATH}=${MODPY_EGG_VERSION}

# You may need to increase the file descriptor ulimits to run tests.
#
# Test suite hangs if $HOME isn't valid.
#
# Some failures:
# https://github.com/neovim/pynvim/issues/416
do-test:
	cd ${WRKSRC} && env HOME=${WRKDIR} \
		${LOCALBASE}/bin/py.test${MODPY_BIN_SUFFIX}

.include <bsd.port.mk>
