Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch completely to pyproject.toml (& hatch for building) #153

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.