Merge pull request #407 from GabDug/fix/tox-use-wheel

Use wheel in tests, adopt src layout
This commit is contained in:
Emil Stenström 2024-03-29 07:56:06 +01:00 committed by GitHub
commit c11f30ec7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 16 additions and 4 deletions

View file

@ -35,11 +35,18 @@ exclude = [
'.env',
'.venv',
'.tox',
'build',
]
[tool.mypy]
check_untyped_defs = true
ignore_missing_imports = true
exclude = [
'test_structures'
'test_structures',
'build',
]
[tool.pytest.ini_options]
testpaths = [
"tests"
]

View file

@ -7,7 +7,8 @@ VERSION = "0.61"
setup(
name="django_components",
packages=find_packages(exclude=["tests"]),
packages=find_packages(where="src", exclude=["tests", "tests.*"]),
package_dir={"": "src"},
package_data={
"django_components": ["py.typed"],
},

View file

@ -29,7 +29,11 @@ python =
3.12: py312-django{42,50}, flake8, isort, coverage, mypy
fail_on_no_env = True
isolated_build = true
[testenv]
package = wheel
wheel_build_env = .pkg
deps =
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
@ -55,7 +59,7 @@ commands =
changedir = {toxinidir}
deps = isort
commands =
isort --check-only --diff django_components
isort --check-only --diff src/django_components
[testenv:coverage]
changedir = {toxinidir}