aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-09 22:29:55 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-09 22:57:59 +0000
commit311042b4b64db806d236af93ea7a0fbf9520a355 (patch)
treebd49b1ccf79ae8b372d8496f6b4eff6ae5e17719
parent467f9760bfc8301f93f324042d14b14426eb7ea7 (diff)
downloadports-311042b4b64db806d236af93ea7a0fbf9520a355.tar.gz
ports-311042b4b64db806d236af93ea7a0fbf9520a355.zip
devel/py-asteval: New port: Safe, minimalistic evaluator of python expression using ast module
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-asteval/Makefile22
-rw-r--r--devel/py-asteval/distinfo3
-rw-r--r--devel/py-asteval/pkg-descr8
4 files changed, 34 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index b284ee8bad70..4e0082e43dd8 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4128,6 +4128,7 @@
SUBDIR += py-asciimatics
SUBDIR += py-asn1crypto
SUBDIR += py-aspy.yaml
+ SUBDIR += py-asteval
SUBDIR += py-astor
SUBDIR += py-astroid
SUBDIR += py-astroid253
diff --git a/devel/py-asteval/Makefile b/devel/py-asteval/Makefile
new file mode 100644
index 000000000000..bd79890b725b
--- /dev/null
+++ b/devel/py-asteval/Makefile
@@ -0,0 +1,22 @@
+PORTNAME= asteval
+PORTVERSION= 0.9.27
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Safe, minimalistic evaluator of python expression using ast module
+
+LICENSE= MIT
+LICENSE_FILES= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR}
+RUN_DEPENDS= ${PYNUMPY}
+
+USES= python:3.8+
+USE_PYTHON= distutils autoplist pytest
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-asteval/distinfo b/devel/py-asteval/distinfo
new file mode 100644
index 000000000000..9fd00030fb31
--- /dev/null
+++ b/devel/py-asteval/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660083242
+SHA256 (asteval-0.9.27.tar.gz) = de838c33aed4c9bb25737eadbb7d1edaaf875e2bab505cc079f1a4b35de03e47
+SIZE (asteval-0.9.27.tar.gz) = 41789
diff --git a/devel/py-asteval/pkg-descr b/devel/py-asteval/pkg-descr
new file mode 100644
index 000000000000..62b01163b41c
--- /dev/null
+++ b/devel/py-asteval/pkg-descr
@@ -0,0 +1,8 @@
+asteval provides a numpy-aware, safe(ish) 'eval' function Emphasis is on
+mathematical expressions, and so numpy ufuncs are used if available. Symbols
+are held in the Interpreter symbol table 'symtable': a simple dictionary
+supporting a simple, flat namespace. Expressions can be compiled into ast node
+for later evaluation, using the values in the symbol table current at evaluation
+time.
+
+WWW: https://github.com/newville/asteval