From ea51b14616cd8ae6a8c3fc5ec868a0359d20129f Mon Sep 17 00:00:00 2001 From: Thomas Roos Date: Mon, 23 Sep 2024 07:24:52 +0000 Subject: [PATCH] aws-cli-v2: re-enable, python 3.12 compatible Closes #7265 --- .../python/python3-ruamel-yaml-clib_0.2.8.bb | 24 +++++++ .../python/python3-ruamel-yaml-clib_0.2.8.bb_ | 45 ------------- ...ve_exact_python_version_requirements.patch | 62 +++++++++-------- ...i-v2_2.15.26.bb_ => aws-cli-v2_2.17.56.bb} | 67 +++++++++---------- 4 files changed, 87 insertions(+), 111 deletions(-) create mode 100644 recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb delete mode 100644 recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb_ rename recipes-support/aws-cli-v2/{aws-cli-v2_2.15.26.bb_ => aws-cli-v2_2.17.56.bb} (91%) diff --git a/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb b/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb new file mode 100644 index 000000000..baaa4b4d1 --- /dev/null +++ b/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb @@ -0,0 +1,24 @@ +SUMMARY = "YAML parser/emitter" +DESCRIPTION = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order." +HOMEPAGE = "https://pypi.org/project/ruamel.yaml.clib/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1debc1593104ded7e88b0ac5659af552" + +PYPI_PACKAGE = "ruamel.yaml.clib" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-shell \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-netclient \ +" + +do_install:prepend() { + export RUAMEL_NO_PIP_INSTALL_CHECK=1 +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb_ b/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb_ deleted file mode 100644 index 9f4a57ef4..000000000 --- a/recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb_ +++ /dev/null @@ -1,45 +0,0 @@ -# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'. -# The following is the difference between the old and the new license text. -# Please update the LICENSE value if needed, and summarize the changes in -# the commit message via 'License-Update:' tag. -# (example: 'License-Update: copyright years updated.') -# -# The changes: -# -# --- LICENSE -# +++ LICENSE -# @@ -1,6 +1,6 @@ -# The MIT License (MIT) -# -# - Copyright (c) 2019-2022 Anthon van der Neut, Ruamel bvba -# + Copyright (c) 2019-2023 Anthon van der Neut, Ruamel bvba -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# -# - -SUMMARY = "YAML parser/emitter" -DESCRIPTION = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order." -HOMEPAGE = "https://pypi.org/project/ruamel.yaml.clib/" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1debc1593104ded7e88b0ac5659af552" - -PYPI_PACKAGE = "ruamel.yaml.clib" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-shell \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-netclient \ -" - -do_install:prepend() { - export RUAMEL_NO_PIP_INSTALL_CHECK=1 -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-support/aws-cli-v2/aws-cli-v2/0001-remove_exact_python_version_requirements.patch b/recipes-support/aws-cli-v2/aws-cli-v2/0001-remove_exact_python_version_requirements.patch index c6c4035b8..cd0eb51ee 100644 --- a/recipes-support/aws-cli-v2/aws-cli-v2/0001-remove_exact_python_version_requirements.patch +++ b/recipes-support/aws-cli-v2/aws-cli-v2/0001-remove_exact_python_version_requirements.patch @@ -1,39 +1,43 @@ -From 21a53665a43fb875f56de42d58b92f1cec95af0c Mon Sep 17 00:00:00 2001 -From: Thomas Roos -Date: Fri, 12 Jan 2024 13:24:54 +0000 -Subject: [PATCH] add new recipe aws-cli-v2 +This patch is removing exact python version dependency requirements. ---- - pyproject.toml | 27 +++++++++++---------------- - requirements/bootstrap.txt | 2 +- - 2 files changed, 12 insertions(+), 17 deletions(-) +Signed-off-by: Thomas Roos -diff --git a/pyproject.toml b/pyproject.toml -index 3b2f4e421..dd6fbb5b4 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -28,21 +28,16 @@ classifiers = [ - "Programming Language :: Python :: 3.11", +Upstream-Status: Inappropriate [OE specific] + +Index: git/pyproject.toml +=================================================================== +--- git.orig/pyproject.toml ++++ git/pyproject.toml +@@ -1,6 +1,6 @@ + [build-system] + requires = [ +-"flit_core>=3.7.1,<3.9.1", ++"flit_core>=3.7.1", + ] + build-backend = "pep517" + backend-path = ["backends"] +@@ -30,21 +30,16 @@ classifiers = [ + 'Programming Language :: Python :: 3.12', ] dependencies = [ - "colorama>=0.2.5,<0.4.7", - "docutils>=0.10,<0.20", -- "cryptography>=3.3.2,<40.0.2", +- "cryptography>=40.0.0,<40.0.2", - "ruamel.yaml>=0.15.0,<=0.17.21", - # ruamel.yaml only requires ruamel.yaml.clib for Python versions - # less than or equal to Python 3.10. In order to ensure we have - # a consistent dependency closure across all Python versions, - # we explicitly include ruamel.yaml.clib as a dependency. -- "ruamel.yaml.clib>=0.2.0,<=0.2.7", +- "ruamel.yaml.clib>=0.2.0,<=0.2.8", - "prompt-toolkit>=3.0.24,<3.0.39", - "distro>=1.5.0,<1.9.0", -- "awscrt>=0.19.18,<=0.19.19", -- "python-dateutil>=2.1,<3.0.0", +- "awscrt>=0.19.18,<=0.21.2", +- "python-dateutil>=2.1,<=2.9.0", - "jmespath>=0.7.1,<1.1.0", - "urllib3>=1.25.4,<1.27", + "colorama>=0.2.5", + "docutils>=0.10", -+ "cryptography>=3.3.2", ++ "cryptography>=40.0.0", + "ruamel.yaml>=0.15.0", + "prompt-toolkit>=3.0.24", + "distro>=1.5.0", @@ -43,19 +47,13 @@ index 3b2f4e421..dd6fbb5b4 100644 + "urllib3>=1.25.4", ] dynamic = ["version"] - -@@ -98,4 +93,4 @@ filterwarnings = [ - ] - - [tool.black] --line-length = 80 -\ No newline at end of file -+line-length = 80 -diff --git a/requirements/bootstrap.txt b/requirements/bootstrap.txt -index 6fb9e6ef5..2a210a9b6 100644 ---- a/requirements/bootstrap.txt -+++ b/requirements/bootstrap.txt + +Index: git/requirements/bootstrap.txt +=================================================================== +--- git.orig/requirements/bootstrap.txt ++++ git/requirements/bootstrap.txt @@ -1,2 +1,2 @@ - pip>=22.0.0,<24.0.0 + pip>=22.0.0,<25.0.0 -flit_core>=3.7.1,<3.9.1 +\ No newline at end of file +flit_core>=3.7.1 diff --git a/recipes-support/aws-cli-v2/aws-cli-v2_2.15.26.bb_ b/recipes-support/aws-cli-v2/aws-cli-v2_2.17.56.bb similarity index 91% rename from recipes-support/aws-cli-v2/aws-cli-v2_2.15.26.bb_ rename to recipes-support/aws-cli-v2/aws-cli-v2_2.17.56.bb index ed41da69a..607c21f38 100644 --- a/recipes-support/aws-cli-v2/aws-cli-v2_2.15.26.bb_ +++ b/recipes-support/aws-cli-v2/aws-cli-v2_2.17.56.bb @@ -4,23 +4,6 @@ HOMEPAGE = "https://github.com/aws/aws-cli/tree/v2" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7970352423db76abb33cbe303884afbf" -SRC_URI = "\ - git://github.com/aws/aws-cli.git;protocol=https;branch=v2 \ - file://0001-remove_exact_python_version_requirements.patch \ - file://run-ptest \ -" - -SRCREV = "1654fa0818004e90ba39cd29754a808f0a3a4775" - -# version 2.x -UPSTREAM_CHECK_GITTAGREGEX = "(?P2\.\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -inherit python_pep517 python3native python3-dir setuptools3-base ptest - -export CRYPTOGRAPHY_OPENSSL_NO_LEGACY="true" - DEPENDS += "\ aws-crt-python-native \ groff \ @@ -43,6 +26,28 @@ DEPENDS += "\ python3-urllib3-1.x-native \ " +SRC_URI = "\ + git://github.com/aws/aws-cli.git;protocol=https;branch=v2 \ + file://0001-remove_exact_python_version_requirements.patch \ + file://run-ptest \ +" + +SRCREV = "9419d473fdb7f9017ff1c935da5b5cd8834ce86f" + +# version 2.x +UPSTREAM_CHECK_GITTAGREGEX = "(?P2\.\d+(\.\d+)+)" + +inherit python_pep517 python3native python3-dir setuptools3-base ptest + +export CRYPTOGRAPHY_OPENSSL_NO_LEGACY="true" + +S = "${WORKDIR}/git" + +# this package also contains aws help +PACKAGES += "${PN}-examples" + +FILES:${PN}-examples += "${libdir}/${PYTHON_DIR}/site-packages/awscli/examples" + RDEPENDS:${PN} += "\ aws-crt-python \ openssl \ @@ -63,35 +68,29 @@ RDEPENDS:${PN} += "\ python3-prompt-toolkit \ python3-rsa \ python3-ruamel-yaml \ - python3-ruamel-yaml-clib \ python3-sqlite3 \ python3-unixadmin \ python3-urllib3-1.x \ " -RDEPENDS:${PN}-examples += "\ - groff \ - less \ -" - -RRECOMMENDS:${PN} = "${PN}-examples" +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + # just install some tests with low memory (less than 4GB) consumption + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} RDEPENDS:${PN}-ptest += "\ - ${PYTHON_PN}-pytest \ bash \ python3-mock \ + python3-pytest \ python3-venv \ " -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - # just install some tests with low memory (less than 4GB) consumption - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -# this package also contains aws help -PACKAGES =+ "${PN}-examples" +RDEPENDS:${PN}-examples += "\ + groff \ + less \ +" -FILES:${PN}-examples = "${libdir}/${PYTHON_DIR}/site-packages/awscli/examples" +RRECOMMENDS:${PN} = "${PN}-examples" RCONFLICTS:${PN} = "awscli"