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', '.env',
'.venv', '.venv',
'.tox', '.tox',
'build',
] ]
[tool.mypy] [tool.mypy]
check_untyped_defs = true check_untyped_defs = true
ignore_missing_imports = true ignore_missing_imports = true
exclude = [ exclude = [
'test_structures' 'test_structures',
'build',
]
[tool.pytest.ini_options]
testpaths = [
"tests"
] ]

View file

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

View file

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