Skip to content

Commit

Permalink
using pyproject.toml without setup.cfg, updated README, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Jun 30, 2024
1 parent 8e4b790 commit 1139cc6
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 105 deletions.
15 changes: 0 additions & 15 deletions INSTALL

This file was deleted.

10 changes: 0 additions & 10 deletions MANIFEST.in

This file was deleted.

23 changes: 19 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ASTEVAL
:target: https://zenodo.org/badge/latestdoi/4185/newville/asteval



Links
-----

Expand All @@ -38,8 +37,20 @@ Links
* Development Code: https://github.com/lmfit/asteval
* Issue Tracker: https://github.com/lmfit/asteval/issues

What is it?
-----------
Installation
----------

To install the asteval module, use::
pip install asteval

or download and unack the source package and use
pip install .

Asteval require Python 3.8 or higher. If installed, many functions and
constants from numpy will be used by default.

About ASTEVAL
--------------

ASTEVAL is a safe(ish) evaluator of Python expressions and statements,
using Python's ast module. The idea is to provide a simple, safe, and
Expand Down Expand Up @@ -67,9 +78,13 @@ the most important differences and absences are:
1. Variable and function symbol names are held in a simple symbol
table (a single dictionary), giving a flat namespace.
2. creating classes is not supported.
3. importing modules is not supported.
3. importing modules is not supported by default - it can be enabled.
4. function decorators, yield, lambda, exec, and eval are not supported.
5. files can only be opened in read-only mode.

In addition, accessing many internal methods and classes of objects is
forbidden in order to strengthen asteval against malicious user code.


Matt Newville <[email protected]>
Last Update: 30-June-2024
44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,47 @@ build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "asteval/version.py"
version_scheme = "post-release"

[tool.setuptools.packages.find]
include = ["asteval"]

[tool.coverage.run]
omit = ["tests/*"]

[tool.pytest.ini_options]
addopts = "--cov=asteval --cov-report html"

[project]
name = "asteval"
dynamic = ["version"]
requires-python = ">= 3.8"
description = "Safe, minimalistic evaluator of python expression using ast module"
readme = "README.rst"
authors = [
{name = "Matthew Newville", email = "[email protected]"}
]
license = {file = "LICENSE"}
keywords = ["AST", "expression evaluation", "eval"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
]

[project.url]
Homepage = " https://github.com/lmfit/asteval"
Documentation = "https://lmfit.github.io/asteval/"
Tracker = "https://github.com/lmfit/asteval/issues"

[project.optional-dependencies]
dev = ["build", "twine"]
doc = ["Sphinx"]
test = ["pytest", "pytest-cov", "coverage"]
all = ["asteval[dev, doc, test]"]
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

71 changes: 0 additions & 71 deletions setup.cfg

This file was deleted.

0 comments on commit 1139cc6

Please sign in to comment.