Skip to content

Commit

Permalink
build tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunicorn committed Nov 17, 2023
1 parent 8a8d4ee commit ff3e629
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ dev = [
# for linting
"black == 23.10.0",
"ruff == 0.1.1",
# for publishing
"build",
"twine"
]

[build-system]
Expand All @@ -43,6 +46,10 @@ build-backend = "setuptools.build_meta"

[tool.setuptools_scm]


[tool.setuptools.dynamic]
version = {attr = "synapse_super_invites.__version__"}

[tool.mypy]
strict = true

Expand Down
15 changes: 13 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = serve, py, check_codestyle, fix_codestyle, check_types
envlist = serve, py, check_codestyle, fix_codestyle, check_types, publish

# required for PEP 517 (pyproject.toml-style) builds
isolated_build = true
Expand Down Expand Up @@ -40,4 +40,15 @@ extras = dev

commands =
black synapse_super_invites tests
ruff --fix synapse_super_invites tests
ruff --fix synapse_super_invites tests


[testenv:publish]

extras = dev

commands =
python -m build --sdist
python -m build --wheel
twine check dist/*
twine upload dist/*

0 comments on commit ff3e629

Please sign in to comment.