Skip to content

Commit 12a9a3f

Browse files
committed
minor improvements to tox.ini
1 parent a9ca465 commit 12a9a3f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ dev-dependencies = [
4949
"flake8>=7.1.1",
5050
"black>=24.10.0",
5151
"pdbpp>=0.10.3",
52+
"toml>=0.10.2",
5253
]

scripts/check_version.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# tired to have too many packaging errors
2+
# small script to check the package is correctly installed
3+
from pathlib import Path
4+
from importlib.metadata import version
5+
6+
import toml
7+
from admin_extra_buttons import VERSION
8+
9+
expected = toml.load(Path('pyproject.toml').open())['project']['version']
10+
assert VERSION == expected
11+
assert version('django_admin_extra_buttons') == expected
12+
print(VERSION)

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,5 @@ setenv =
7171
commands =
7272
python -c "import shutil; shutil.rmtree('{work_dir}/dist', ignore_errors=True)"
7373
python -m build --sdist --outdir {work_dir}/dist
74-
pip install file://{work_dir}/dist/django_admin_extra_buttons-1.6.0.tar.gz
75-
python -c "from admin_extra_buttons import VERSION;"
76-
python -m twine upload --repository-url https://test.pypi.org/legacy/ {work_dir}/dist/*
74+
pip install django-admin-extra-buttons --use-pep517 --no-deps --no-cache-dir --find-links file://{work_dir}/dist/
75+
python scripts/check_version.py

0 commit comments

Comments
 (0)