diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..33ac127 --- /dev/null +++ b/pyproject.toml @@ -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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..0327f5c --- /dev/null +++ b/requirements_dev.txt @@ -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 diff --git a/sampy/__init__.py b/sampy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sampy/py.typed b/sampy/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..efaa9c6 --- /dev/null +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a4ead8f --- /dev/null +++ b/setup.py @@ -0,0 +1,4 @@ +from setuptools import setup + +if __name__ == "__main__": + setup() diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..a69c0ae --- /dev/null +++ b/tox.ini @@ -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} \ No newline at end of file