Skip to content

Commit

Permalink
Merge "Refactor: Migrate to pyproject.toml"
Browse files Browse the repository at this point in the history
  • Loading branch information
jwagantall authored and Gerrit Code Review committed Oct 5, 2023
2 parents 90308a5 + 0de00ad commit 354fc97
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 88 deletions.
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

147 changes: 146 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,151 @@
[build-system]
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5"]
build-backend = "setuptools.build_meta"

[project]
name = "lftools"
dynamic = ["version"]
description = "Linux Foundation Release Engineering Tools"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "EPL-1.0"}

authors = [
{name = "LF Release Engineering", email = "[email protected]"},
]

maintainers = [
{name = "LF Release Engineering", email = "[email protected]"},
]

# Add here all kinds of additional classifiers as defined under
# https://pypi.org/classifiers/
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9"
]

dependencies = [
"appdirs",
"aspy.yaml",
"attrs",
"beautifulsoup4",
"boto3",
"bs4",
"certifi",
"cfgv",
"chardet",
"click",
"defusedxml",
"Deprecated",
"dnspython",
"docker==4.2.2",
"email-validator",
"filelock",
"GitPython",
"httplib2",
"identify",
"idna",
"jinja2",
"jsonschema",
"lxml",
"multi-key-dict",
"nodeenv",
"oauth2client",
"openstacksdk<1.5.0",
"pbr",
"pyasn1",
"pyasn1-modules",
"pygerrit2",
"PyGithub",
"PyJWT",
"pyrsistent",
"python-jenkins",
"PyYAML",
"requests",
"rsa",
"ruamel.yaml",
"ruamel.yaml.clib",
"six",
"soupsieve",
"tabulate",
"toml",
"tqdm",
"urllib3<2.0.0",
"websocket-client",
"wrapt",
"xdg"
]

[project.optional-dependencies]
dev = [
"mypy"
]

docs = [
"lfdocs-conf",
"reno",
"sphinxcontrib-programoutput"
]

ldap = [
"python-ldap~=3.1.0"
]

openstack = [
"osc-lib~=2.2.0"
]

test = [
"pytest==5.3.5",
"pytest-click==0.3",
"pytest-datafiles==2.0",
"pytest-mock==2.0.0",
"pytest-responses==0.4.0"
]

[project.urls]
"Homepage" = "https://docs.releng.linuxfoundation.org/projects/lftools"
"Bug Tracker" = "https://github.com/lfit/releng-tools/issues"
"Documentation" = "https://docs.releng.linuxfoundation.org/projects/lftools"
"Source Code" = "https://github.com/lfit/releng-lftools"

[project.scripts]
lftools = "lftools.cli:main"

[tool.setuptools]
platforms = ["linux"]
script-files = [
"shell/deploy",
"shell/gerrit_create",
"shell/inactivecommitters",
"shell/sign",
"shell/version",
"shell/yaml4info",
"shell/autocorrectinfofile"
]

[tool.setuptools.packages.find]
where = ["."]
include = ["lftools*"]
exclude = ["tests*"]


[tool.setuptools_scm]
# For smarter version schemes and other configuration options,
# check out https://github.com/pypa/setuptools_scm
local_scheme = "no-local-version"
version_scheme = "python-simplified-semver"


[tool.black]
line-length = 120
target-version = ['py36']
target-version = ['py38']
exclude = '''
/(
\.venv
Expand Down
2 changes: 2 additions & 0 deletions reno.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
earliest_version: v0.36.0
45 changes: 0 additions & 45 deletions setup.cfg

This file was deleted.

28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

31 changes: 23 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ addopts = -p no:warnings

[testenv]
basepython = python3
deps = -r{toxinidir}/requirements-test.txt
# This needs to mirror the test section of pyproject.toml
deps =
pytest==5.3.5
pytest-click==0.3
pytest-datafiles==2.0
pytest-mock==2.0.0
pytest-responses==0.4.0

commands = pytest
usedevelop = true

Expand All @@ -42,37 +49,45 @@ commands =

[testenv:docs]
description = Build the documentation with sphinx
basepython = python3
deps = -rrequirements-docs.txt
basepython = python3.8
# This needs to mirror the docs section of pyproject.toml plus the testenv
deps =
{[testenv]deps}
lfdocs-conf
reno
sphinxcontrib-programoutput

extras = openstack
commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html

[testenv:docs-linkcheck]
description = Check the documentation links with sphinx
basepython = python3
deps = -rrequirements-docs.txt
basepython = python3.8
deps =
{[testenv:docs]deps}
extras = openstack
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck

[testenv:latest-upstream]
description = Latest upstream test. Used for what exactly?
basepython = python3
deps = -r{toxinidir}/requirements-test.txt
deps =
{[testenv:docs]deps}
commands =
pip install -U python-jenkins requests
pytest

[testenv:license]
description = Check all files for license header
basepython = python3
basepython = python3.8
deps = lftools
commands =
lftools license check-dir lftools
lftools license check-dir -r '.+' shell

[testenv:pre-commit]
description = Precommit checks for black, gitlint, etc.
basepython = python3.7
basepython = python3.8
allowlist_externals =
/bin/sh
deps =
Expand Down

0 comments on commit 354fc97

Please sign in to comment.