diff --git a/devel/py-simpleeval/Makefile b/devel/py-simpleeval/Makefile index 7620ab557eff..050bea195ebf 100644 --- a/devel/py-simpleeval/Makefile +++ b/devel/py-simpleeval/Makefile @@ -1,21 +1,21 @@ PORTNAME= simpleeval -PORTVERSION= 0.9.13 +PORTVERSION= 1.0.7 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org -COMMENT= Simple, safe single expression evaluator python library +COMMENT= Simple, safe single expression evaluator library WWW= https://github.com/danthedeckie/simpleeval LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENCE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=30.3.0:devel/py-setuptools@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} USES= python USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes .include diff --git a/devel/py-simpleeval/distinfo b/devel/py-simpleeval/distinfo index d2fd61295cb7..8d0e1ffd1a85 100644 --- a/devel/py-simpleeval/distinfo +++ b/devel/py-simpleeval/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1679498742 -SHA256 (simpleeval-0.9.13.tar.gz) = 4a30f9cc01825fe4c719c785e3762623e350c4840d5e6855c2a8496baaa65fac -SIZE (simpleeval-0.9.13.tar.gz) = 24535 +TIMESTAMP = 1777906405 +SHA256 (simpleeval-1.0.7.tar.gz) = 1e10e5f9fec597814444e20c0892ed15162fa214c8a88f434b5b077cf2fef85b +SIZE (simpleeval-1.0.7.tar.gz) = 30250 diff --git a/devel/py-simpleeval/pkg-descr b/devel/py-simpleeval/pkg-descr index 0b732d7a4d6b..900e7f57540c 100644 --- a/devel/py-simpleeval/pkg-descr +++ b/devel/py-simpleeval/pkg-descr @@ -1,4 +1,26 @@ -simpleeval is a single-file library for easily adding evaluatable expressions -into python projects. It can allow a user to, for example, set an alarm volume, -which could depend on the time of day, alarm level, how many previous alarms had -gone off, and if there is music playing at the time. +A single file library for easily adding evaluatable expressions into python +projects. Say you want to allow a user to set an alarm volume, which could +depend on the time of day, alarm level, how many previous alarms had gone off, +and if there is music playing at the time. + +Or if you want to allow simple formulae in a web application, but don't want to +give full eval() access, or don't want to run in javascript on the client side. + +It's deliberately trying to stay simple to use and not have millions of +features, pull it in from PyPI (pip or easy_install), or even just a single file +you can dump into a project. + +Internally, it's using the amazing python ast module to parse the expression, +which allows very fine control of what is and isn't allowed. It should be +completely safe in terms of what operations can be performed by the expression. + +The only issue I know to be aware of is that you can create an expression which +takes a long time to evaluate, or which evaluating requires an awful lot of +memory, which leaves the potential for DOS attacks. There is basic protection +against this, and you can lock it down further if you desire. + +You should be aware of this when deploying in a public setting. + +The defaults are pretty locked down and basic, and it's easy to add whatever +extra specific functionality you need (your own functions, variable/name lookup, +etc).