From e461b9bbc89d973a888322019e4414c1f47b0a64 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Thu, 12 Jun 2025 15:17:20 +0200 Subject: [PATCH] Create extra-envs with pinned dependencies --- checkbox-ng/pyproject.toml | 50 +++++++++++++++++++++++++++++++-- checkbox-ng/setup.cfg | 1 + checkbox-support/pyproject.toml | 32 ++++++++++++++++++++- 3 files changed, 80 insertions(+), 3 deletions(-) diff --git a/checkbox-ng/pyproject.toml b/checkbox-ng/pyproject.toml index 0c4e7548b6..7be38e3d4d 100644 --- a/checkbox-ng/pyproject.toml +++ b/checkbox-ng/pyproject.toml @@ -17,6 +17,7 @@ 'Jinja2 >= 2.7', 'xlsxwriter', 'tqdm', + 'pyyaml', 'importlib_metadata; python_version < "3.8"', 'filetype; python_version > "3.12"' ] @@ -33,10 +34,14 @@ 'Intended Audience :: Manufacturing', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Natural Language :: English', - 'Natural Language :: Polish', 'Operating System :: POSIX', 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', @@ -44,6 +49,47 @@ 'Topic :: Utilities', ] dynamic = ["version"] +[project.optional-dependencies] +# this is the prod setup for provisioning from source. The versions are +# pinned to the jammy universe because that is what testflinger agent uses +jammy_prod = [ + 'certifi==2020.6.20', + 'chardet==4.0.0', + 'filetype==1.0.10', + 'idna==2.10', # universe is 3.3 but it is incompatible with requests + 'jinja2==3.0.3', + 'markupsafe==2.0.1', + 'packaging==21.3', + 'psutil==5.9.0', + 'pyparsing==2.4.7', + 'requests==2.25.1', + 'tqdm==4.57.0', + 'urllib3==1.26.5', + 'urwid==2.1.2', + 'xlsxwriter==3.0.2', + 'pyyaml==6.0', # universe is 5.4.1 but it doesn't install anymore (cython issue) +] +# useful to get up to date packages and future version of testflinger agent +noble_prod = [ + 'certifi==2023.11.17', + 'chardet==5.2.0', + 'charset-normalizer==3.3.2', + 'filetype==1.2.0', + 'idna==3.6', + 'jinja2==3.1.2', + 'markupsafe==2.1.5', + 'packaging==24.0', + 'psutil==5.9.8', + 'pyparsing==3.1.1', + 'requests==2.31.0', + 'tqdm==4.66.2', + 'typing-extensions==4.10.0', + 'urllib3==2.0.7', + 'urwid==2.6.10', + 'wcwidth==0.2.5', + 'xlsxwriter==3.1.9', + 'pyyaml==6.0.1', +] [tool.black] line-length = 79 # Exclude vendorized code (e.g. the stuff in plainbox/vendor/) diff --git a/checkbox-ng/setup.cfg b/checkbox-ng/setup.cfg index d158698d19..436f9db8ab 100644 --- a/checkbox-ng/setup.cfg +++ b/checkbox-ng/setup.cfg @@ -11,6 +11,7 @@ install_requires= Jinja2 >= 2.7 xlsxwriter tqdm + pyyaml importlib_metadata; python_version < "3.8" filetype; python_version > "3.12" [upload_docs] diff --git a/checkbox-support/pyproject.toml b/checkbox-support/pyproject.toml index 62edb545f6..e49740f480 100644 --- a/checkbox-support/pyproject.toml +++ b/checkbox-support/pyproject.toml @@ -13,7 +13,6 @@ 'pyparsing>=2.2.0', 'requests>=1.0', 'distro>=1.0', - 'configparser; python_version=="2.7"', 'requests_unixsocket>=0.1.2; python_version>="3.5" and python_version<="3.11"', 'requests_unixsocket2; python_version>="3.12"', 'importlib_metadata; python_version<"3.8"', @@ -22,6 +21,37 @@ [metadata] long_description={'file' = 'README.md'} long_description_content_type='text/x-rst' +[project.optional-dependencies] +# this is the prod setup for provisioning from source. The versions are +# pinned to the jammy universe because that is what testflinger agent uses +jammy_prod = [ # Note: ancient versions of pip fail to see this section, use pipx! + 'certifi==2020.6.20', + 'charset-normalizer==2.0.6', + 'distro==1.7.0', + 'idna==2.10', # universe is 3.3 but it is incompatible with requests + 'pyparsing==2.4.7', + 'requests==2.25.1', + 'distro==1.7.0', + 'requests_unixsocket==0.2.0', + 'pyyaml==6.0', # universe is 5.4.1 but it doesn't install anymore (cython issue) + 'urllib3==1.26.5', # called python3-yaml in universe + 'numpy==1.21.5', + 'opencv==4.5.4' +] +# useful to get up to date packages and future version of testflinger agent +noble_prod = [ + 'certifi==2023.11.17', + 'charset-normalizer==3.3.2', + 'distro==1.9.0', + 'idna==3.6', + 'pyparsing==3.1.1', + 'PyYAML==6.0.1', + 'requests==2.31.0', + 'requests-unixsocket==0.3.0', + 'urllib3==2.0.7', + 'numpy==1.26.4', + 'opencv-python==4.6.0.66' +] [tool.black] line-length = 79 # Exclude vendorized code (e.g. the stuff in checkbox_support/vendor)