|
| 1 | +[project.urls] |
| 2 | +HOMEPAGE = "https://pypi.org/project/splunk-sdk" |
| 3 | +DOCS = "https://docs.splunk.com/Documentation/PythonSDK/2.1.1" |
| 4 | +REPO = "https://github.com/splunk/splunk-sdk-python.git" |
| 5 | + |
| 6 | +[project] |
| 7 | +name = "splunk-sdk" |
| 8 | +dynamic = ["version"] |
| 9 | +description = "Splunk Software Development Kit for Python" |
| 10 | +readme = "README.md" |
| 11 | +requires-python = ">=3.7.17" |
| 12 | +license = { file = "LICENSE" } |
| 13 | +authors = [{ name = "Splunk, Inc.", email = "[email protected]" }] |
| 14 | +classifiers = [ |
| 15 | + "Programming Language :: Python", |
| 16 | + "Development Status :: 6 - Mature", |
| 17 | + "Environment :: Other Environment", |
| 18 | + "Intended Audience :: Developers", |
| 19 | + "Operating System :: OS Independent", |
| 20 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 21 | + "Topic :: Software Development :: Libraries :: Application Frameworks", |
| 22 | +] |
| 23 | + |
| 24 | +dependencies = ["deprecation", "python-dotenv"] |
| 25 | + |
| 26 | +[dependency-groups] |
| 27 | +test = ["tox", "pytest"] |
| 28 | +lint = ["mypy", "ruff"] |
| 29 | +build = ["build", "setuptools", { include-group = "test" }] |
| 30 | +dev = [ |
| 31 | + { include-group = "test" }, |
| 32 | + { include-group = "lint" }, |
| 33 | + { include-group = "build" }, |
| 34 | +] |
| 35 | + |
| 36 | +[build-system] |
| 37 | +requires = ["setuptools"] |
| 38 | +build-backend = "setuptools.build_meta" |
| 39 | + |
| 40 | +[tool.setuptools.packages.find] |
| 41 | +where = ["."] |
| 42 | + |
| 43 | +[tool.setuptools.dynamic] |
| 44 | +version = { attr = "splunklib.__version__" } |
| 45 | + |
| 46 | +# https://docs.astral.sh/ruff/configuration/ |
| 47 | +# [tool.ruff] |
| 48 | + |
| 49 | +[tool.ruff.lint] |
| 50 | +fixable = ["ALL"] |
| 51 | +select = [ |
| 52 | + "F", # pyflakes |
| 53 | + "E", # pycodestyle |
| 54 | + "I", # isort |
| 55 | + "ANN", # flake8 type annotations |
| 56 | + "RUF", # ruff-specific rules |
| 57 | +] |
| 58 | + |
| 59 | +# TODO: Migrate this |
| 60 | +# https://tox.wiki/en/latest/config.html#pyproject-toml-ini |
| 61 | +[tool.tox] |
| 62 | +legacy_tox_ini = """ |
| 63 | +[tox] |
| 64 | +envlist = clean,docs,py37,py39,313 |
| 65 | +skipsdist = {env:TOXBUILD:false} |
| 66 | +
|
| 67 | +# TODO: Replace with ruff |
| 68 | +[testenv:pep8] |
| 69 | +deps = flake8 |
| 70 | + flake8-import-order |
| 71 | + flake8-blind-except |
| 72 | + flake8-builtins |
| 73 | + flake8-docstrings |
| 74 | + flake8-rst-docstrings |
| 75 | + flake8-logging-format |
| 76 | + six |
| 77 | +commands = flake8 |
| 78 | +
|
| 79 | +[flake8] |
| 80 | +exclude = .tox |
| 81 | +# If you need to ignore some error codes in the whole source code |
| 82 | +# you can write them here |
| 83 | +# ignore = D100,D101 |
| 84 | +show-source = true |
| 85 | +enable-extensions = G |
| 86 | +application-import-names = splunk-sdk-python |
| 87 | +
|
| 88 | +[testenv] |
| 89 | +passenv = LANG |
| 90 | +setenv = SPLUNK_HOME=/opt/splunk |
| 91 | +allowlist_externals = make |
| 92 | +deps = pytest |
| 93 | + pytest-cov |
| 94 | + python-dotenv |
| 95 | +
|
| 96 | +distdir = build |
| 97 | +commands = |
| 98 | + {env:TOXBUILD:python -m pytest --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs} |
| 99 | +
|
| 100 | +[testenv:clean] |
| 101 | +deps = coverage |
| 102 | +skip-install = true |
| 103 | +commands = coverage erase |
| 104 | +
|
| 105 | +[testenv:docs] |
| 106 | +description = invoke sphinx-build to build the HTML docs |
| 107 | +basepython = python3.9 |
| 108 | +deps = sphinx >= 1.7.5, < 2 |
| 109 | + jinja2 < 3.1.0 |
| 110 | +commands = make -C docs/ html |
| 111 | +""" |
0 commit comments