ports/devel/py-makefun/Makefile
Goran Mekić 120e65ad68 devel/py-makefun: add port: Dynamically create python functions with a proper signature
Makefun helps you create functions dynamically, with the signature of your
choice. It was largely inspired by decorator and functools, and created mainly
to cover some of their limitations.

The typical use cases are:
  * creating signature-preserving function wrappers - just like functools.wraps
  but with accurate TypeError exception raising when user-provided arguments are
  wrong, and with a very convenient way to access argument values.

  * creating function wrappers that have more or less arguments that the
  function they wrap. A bit like functools.partial but a lot more flexible and
  friendly for your users. For example, I use it in my pytest plugins to add a
  requests parameter to users' tests or fixtures when they do not already have
  it.

  * more generally, creating functions with a signature derived from a reference
  signature, or even creating functions with a signature completely defined at
  runtime.

WWW: https://github.com/smarie/python-makefun

PR:		260879
Reported by:	Goran Mekić <meka@tilda.center> (new maintainer)
2022-01-26 16:16:09 +09:00

30 lines
965 B
Makefile

PORTNAME= makefun
PORTVERSION= 1.13.1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= meka@tilda.center
COMMENT= Dynamically create python functions with a proper signature
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>=0:devel/py-pip@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-runner>=0:devel/py-pytest-runner@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}funcsigs>=0:devel/py-funcsigs@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
USES= python:3.5-3.9
USE_PYTHON= autoplist concurrent distutils
TEST_ENV= PYTHONPATH=${WRKSRC}/src
NO_ARCH= yes
do-test:
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts=
.include <bsd.port.mk>