2022-09-26 17:58:19 +01:00
|
|
|
import logging
|
2023-11-15 12:19:08 +00:00
|
|
|
import pathlib
|
|
|
|
import sys
|
2022-09-26 17:58:19 +01:00
|
|
|
|
2023-02-14 18:10:23 +00:00
|
|
|
import ptscripts
|
2024-02-21 05:51:02 +00:00
|
|
|
from ptscripts.models import DefaultPipConfig, VirtualEnvPipConfig
|
2023-02-14 18:10:23 +00:00
|
|
|
|
2023-11-15 12:19:08 +00:00
|
|
|
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
|
|
|
|
REQUIREMENTS_FILES_PATH = REPO_ROOT / "requirements"
|
|
|
|
STATIC_REQUIREMENTS_PATH = REQUIREMENTS_FILES_PATH / "static"
|
|
|
|
CI_REQUIREMENTS_FILES_PATH = (
|
|
|
|
STATIC_REQUIREMENTS_PATH / "ci" / "py{}.{}".format(*sys.version_info)
|
|
|
|
)
|
2024-02-21 05:51:02 +00:00
|
|
|
DEFAULT_REQS_CONFIG = DefaultPipConfig(
|
|
|
|
install_args=[
|
2023-11-27 13:05:40 +00:00
|
|
|
f"--constraint={REQUIREMENTS_FILES_PATH / 'constraints.txt'}",
|
2023-11-15 12:19:08 +00:00
|
|
|
],
|
|
|
|
requirements_files=[
|
|
|
|
CI_REQUIREMENTS_FILES_PATH / "tools.txt",
|
|
|
|
],
|
|
|
|
)
|
2024-02-21 05:51:02 +00:00
|
|
|
RELEASE_VENV_CONFIG = VirtualEnvPipConfig(
|
|
|
|
install_args=[
|
2023-11-27 13:05:40 +00:00
|
|
|
f"--constraint={REQUIREMENTS_FILES_PATH / 'constraints.txt'}",
|
|
|
|
],
|
2023-11-15 12:19:08 +00:00
|
|
|
requirements_files=[
|
|
|
|
CI_REQUIREMENTS_FILES_PATH / "tools-virustotal.txt",
|
|
|
|
],
|
|
|
|
add_as_extra_site_packages=True,
|
|
|
|
)
|
2024-02-21 05:51:02 +00:00
|
|
|
ptscripts.set_default_config(DEFAULT_REQS_CONFIG)
|
2023-02-14 18:10:23 +00:00
|
|
|
ptscripts.register_tools_module("tools.changelog")
|
|
|
|
ptscripts.register_tools_module("tools.ci")
|
2025-02-07 15:23:13 -07:00
|
|
|
ptscripts.register_tools_module("tools.container")
|
2023-02-14 18:10:23 +00:00
|
|
|
ptscripts.register_tools_module("tools.docs")
|
2024-03-26 11:55:58 +00:00
|
|
|
ptscripts.register_tools_module("tools.gh")
|
2023-02-14 18:10:23 +00:00
|
|
|
ptscripts.register_tools_module("tools.pkg")
|
2023-03-07 14:42:58 -05:00
|
|
|
ptscripts.register_tools_module("tools.pkg.repo")
|
|
|
|
ptscripts.register_tools_module("tools.pkg.build")
|
2023-05-02 20:53:24 -04:00
|
|
|
ptscripts.register_tools_module("tools.pkg.repo.create")
|
|
|
|
ptscripts.register_tools_module("tools.pkg.repo.publish")
|
2023-05-26 07:02:19 +01:00
|
|
|
ptscripts.register_tools_module("tools.precommit")
|
|
|
|
ptscripts.register_tools_module("tools.precommit.changelog")
|
|
|
|
ptscripts.register_tools_module("tools.precommit.workflows")
|
2023-09-14 17:51:40 +01:00
|
|
|
ptscripts.register_tools_module("tools.precommit.docs")
|
|
|
|
ptscripts.register_tools_module("tools.precommit.docstrings")
|
2023-06-05 11:31:08 +01:00
|
|
|
ptscripts.register_tools_module("tools.precommit.filemap")
|
2023-11-15 16:14:39 +00:00
|
|
|
ptscripts.register_tools_module("tools.precommit.loader")
|
2023-09-14 17:51:40 +01:00
|
|
|
ptscripts.register_tools_module("tools.release", venv_config=RELEASE_VENV_CONFIG)
|
2023-08-17 07:07:39 +01:00
|
|
|
ptscripts.register_tools_module("tools.testsuite")
|
|
|
|
ptscripts.register_tools_module("tools.testsuite.download")
|
2023-02-14 18:10:23 +00:00
|
|
|
ptscripts.register_tools_module("tools.vm")
|
2022-09-26 17:58:19 +01:00
|
|
|
|
|
|
|
for name in ("boto3", "botocore", "urllib3"):
|
|
|
|
logging.getLogger(name).setLevel(logging.INFO)
|