* Convert build configuration to a pure pyproject.toml project.
* Clamps reno notes generation to greater than v0.36.0
Issue: RELENG-4932
Change-Id: I10ebe156bb7712569fb06bd0c4b203074c3aed2b
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
+++ /dev/null
-include etc/logging.ini
-include README.md
-include requirements.txt
-include requirements-docs.txt
-include requirements-openstack.txt
-
+[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 = "releng@linuxfoundation.org"},
+]
+
+maintainers = [
+ {name = "LF Release Engineering", email = "releng@linuxfoundation.org"},
+]
+
+# 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
--- /dev/null
+---
+earliest_version: v0.36.0
+++ /dev/null
-[metadata]
-name = lftools
-author = LF Releng
-author_email = releng@linuxfoundation.org
-summary = Linux Foundation Release Engineering Tools
-description_file = README.md
-description_content_type = text/x-rst; charset=UTF-8
-home_page = https://docs.releng.linuxfoundation.org/projects/lftools
-project_urls =
- Bug Tracker = https://jira.linuxfoundation.org
- Documentation = https://docs.releng.linuxfoundation.org/projects/lftools
- Source Code = https://github.com/lfit/releng-lftools
-license = EPL-1.0
-classifier =
- 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
-
-[wheel]
-universal = 1
-
-[extras]
-ldap =
- python-ldap~=3.1.0
-openstack =
- osc-lib~=2.2.0
-
-[files]
-packages = lftools
-scripts =
- shell/deploy
- shell/gerrit_create
- shell/inactivecommitters
- shell/sign
- shell/version
- shell/yaml4info
- shell/autocorrectinfofile
-
-[entry_points]
-console_scripts =
- lftools = lftools.cli:main
+++ /dev/null
-# -*- coding: utf-8 -*-
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-"""Setup.py."""
-
-from setuptools import find_packages, setup
-
-with open("requirements.txt") as f:
- install_reqs = f.read().splitlines()
-
-with open("requirements-test.txt") as f:
- f.readline() # Skip the first -rrequirements.txt line
- test_reqs = f.read().splitlines()
-
-setup(
- setup_requires=["pbr", "pytest-runner"],
- pbr=True,
- install_requires=install_reqs,
- packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
- tests_require=test_reqs,
-)
[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
[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
[testenv:pre-commit]
description = Precommit checks for black, gitlint, etc.
-basepython = python3.7
+basepython = python3.8
allowlist_externals =
/bin/sh
deps =