kmos c45cd79fc7 Add RUN_DEPENDS to TEST_DEPENDS automatically for ports using the
lang/python port module. I've not yet come up with a port that
would not need this and one can always set MODPY_TESTDEP to "no"
to prevent the module from touching TEST_DEPENDS.

Idea from afresh1 who pointed out the cpan module already does this.

aja "I support this move."

OK sthen@
2019-05-15 12:04:34 +00:00

44 lines
1.1 KiB
Makefile

# $OpenBSD: Makefile,v 1.29 2019/05/15 12:04:42 kmos Exp $
COMMENT = microframework based on Werkzeug and Jinja 2
MODPY_EGG_VERSION = 0.12.3
DISTNAME = Flask-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME:L}
REVISION = 1
CATEGORIES = www devel
HOMEPAGE = http://flask.pocoo.org/
# BSD
PERMIT_PACKAGE_CDROM = Yes
MODULES = lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
MODPY_PYTEST = Yes
MODPY_PYTEST_ARGS = tests
FLAVORS = python3
FLAVOR ?=
RUN_DEPENDS = devel/py-blinker${MODPY_FLAVOR} \
www/py-itsdangerous${MODPY_FLAVOR} \
www/py-jinja2${MODPY_FLAVOR} \
www/py-werkzeug${MODPY_FLAVOR} \
devel/py-click${MODPY_FLAVOR}
BUILD_DEPENDS = textproc/py-sphinx${MODPY_FLAVOR} \
www/py-itsdangerous${MODPY_FLAVOR} \
www/py-werkzeug${MODPY_FLAVOR}
MAKE_ENV = PYTHONPATH="${WRKSRC}" SPHINXBUILD=${LOCALBASE}/bin/sphinx-build${MODPY_BIN_SUFFIX}
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${MODPY_PY_PREFIX}flask
cd ${WRKSRC}/examples && pax -rw * \
${PREFIX}/share/examples/${MODPY_PY_PREFIX}flask
mv ${PREFIX}/bin/flask ${PREFIX}/bin/flask${MODPY_BIN_SUFFIX}
.include <bsd.port.mk>