Skip to content

Commit

Permalink
fix: check package should work
Browse files Browse the repository at this point in the history
This is based on the pyscaffold template and seems to fix the now failing check package
  • Loading branch information
MrKevinWeiss committed Jul 23, 2024
1 parent 41387d6 commit 93e62b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
- name: Check code format with black
if: matrix.python-version == '3.9'
run: tox -e black
- name: Build package
if: matrix.python-version == '3.9'
run: tox -e build
- name: Check package
if: matrix.python-version == '3.9'
run: tox -e check_package
Expand Down
22 changes: 21 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,31 @@ commands =
pylint --rcfile=setup.cfg {envsitepackagesdir}/{env:package}
# This does not check files in 'tests/utils/application'

[testenv:{build,clean}]
description =
build: Build the package in isolation according to PEP517, see https://github.com/pypa/build
clean: Remove old distribution files and temporary build artifacts (./build and ./dist)
# https://setuptools.pypa.io/en/stable/build_meta.html#how-to-use-it
skip_install = True
changedir = {toxinidir}
deps =
build: build[virtualenv]
passenv =
SETUPTOOLS_*
commands =
clean: python -c 'import shutil; [shutil.rmtree(p, True) for p in ("build", "dist", "docs/_build")]'
clean: python -c 'import pathlib, shutil; [shutil.rmtree(p, True) for p in pathlib.Path("src").glob("*.egg-info")]'
build: python -m build {posargs}
# By default, both `sdist` and `wheel` are built. If your sdist is too big or you don't want
# to make it available, consider running: `tox -e build -- --wheel`

[testenv:check_package]
changedir = {toxinidir}
skip_install = True
deps =
twine
commands =
twine check --strict {distdir}/*
python -m twine check dist/*

[testenv:flake8]
deps = flake8
Expand Down

0 comments on commit 93e62b5

Please sign in to comment.