Skip to content

Commit

Permalink
Merge pull request #153 from danthedeckie/pyproject.toml-only
Browse files Browse the repository at this point in the history
Switch completely to pyproject.toml (& hatch for building)
  • Loading branch information
danthedeckie authored Oct 23, 2024
2 parents d4d553c + 9cb9bea commit 5663fc2
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 35 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ jobs:
uses: actions/setup-python@master
with:
python-version: '3.10'
- name: Install dev dependencies
run : |
pip install -r requirements/dev.txt
- name: Lint
run: |
pip install -r requirements/dev.txt
make lint
run:
- name: Build & check sdist & wheel
run: |
make dist/
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ autotest:

.PHONY: test

dist/: setup.cfg simpleeval.py README.rst
python -m build
dist/: pyproject.toml simpleeval.py README.rst
hatch build
twine check dist/*

pypi: test dist/
Expand Down
55 changes: 51 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
[project]
name = "simpleeval"
version = "1.0.1"
requires-python = ">=3.9"
readme = "README.rst"
description = "A simple, safe single expression evaluator library."
licence = "MIT"
authors = [
{ name = "Daniel Fairhead", email = "[email protected]" }
]
maintainers = [
{ name = "Daniel Fairhead", email = "[email protected]" }
]
keywords = [
"eval", "simple", "expression", "parse", "ast"
]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
]
dependencies = [
"pip>=24.2",
]

[project.urls]
"Source code" = "https://github.com/danthedeckie/simpleeval"

[pycodestyle]
max_line_length = 99

[build-system]
requires = ["setuptools>=30.3.0", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
include = [
"simpleeval.py",
"test_simpleeval.py",
"README.rst",
"LICENCE",
]

[tool.hatch.version]
path = "simpleeval.py"

[tool.hatch.envs.hatch-test]
default-args = ["test_simpleeval.py"]

[tool.black]
line-length = 99
Expand Down Expand Up @@ -29,5 +77,4 @@ disable = [
"useless-object-inheritance",
"unnecessary-pass",
"bad-super-call",
]

]
2 changes: 2 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
ruff==0.6.9
mypy==1.11.2
hatch==1.12.0
twine==5.1.1
24 changes: 0 additions & 24 deletions setup.cfg

This file was deleted.

0 comments on commit 5663fc2

Please sign in to comment.