Setup tox

This commit is contained in:
Emily 2023-02-10 04:18:25 +01:00
parent beb61279c2
commit 0a0e8b3592
9 changed files with 94 additions and 0 deletions

23
pyproject.toml Normal file
View File

@ -0,0 +1,23 @@
[build-system]
requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = "--cov=sampy"
testpaths = [
"tests",
]
[tool.mypy]
mypy_path = "sampy"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true

0
requirements.txt Normal file
View File

5
requirements_dev.txt Normal file
View File

@ -0,0 +1,5 @@
flake8==6.0.0
tox==4.4.5
pytest==7.2.1
pytest-cov==4.0.0
mypy==1.0.0

0
sampy/__init__.py Normal file
View File

0
sampy/py.typed Normal file
View File

39
setup.cfg Normal file
View File

@ -0,0 +1,39 @@
[metadata]
name = sampy
description = GTA:SA Multiplayer (SAMP) server for Python
version = 0.0.1
author = Sunpy
license = GNU
license_files = LICENSE
platforms = unix, linux, osx, cygwin, win32
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
[options]
package_dir =
=sampy
packages = find:
python_requires = >=3.8
include_package_data = true
[options.packages.find]
where = sampy
[options.extras_require]
testing =
pytest>=7.0
pytest-cov>=3.0
mypy>=0.960
flake8>=4.0
tox>=3.25
[options.package_data]
sampy = py.typed
[flake8]
max-line-length = 160

4
setup.py Normal file
View File

@ -0,0 +1,4 @@
from setuptools import setup
if __name__ == "__main__":
setup()

0
tests/__init__.py Normal file
View File

23
tox.ini Normal file
View File

@ -0,0 +1,23 @@
[tox]
minversion = 3.8.0
envlist = py38, py39, py310, py311, flake8, mypy
insolated_build = true
[testenv:flake8]
basepython = python3.8
deps = flake8
commands = flake8 sampy tests
[testenv:mypy]
basepython = python3.8
deps =
-r{toxinidir}/requirements_dev.txt
commands = mypy sampy
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands =
python -m pytest --basetemp={envtmpdir}