Skip to content

Commit

Permalink
aws-cli-v2: re-enable, python 3.12 compatible
Browse files Browse the repository at this point in the history
Closes #7265
  • Loading branch information
thomas-roos committed Sep 23, 2024
1 parent 2fde673 commit ea51b14
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 111 deletions.
24 changes: 24 additions & 0 deletions recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb
Original file line number Diff line number Diff line change
@@ -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"
45 changes: 0 additions & 45 deletions recipes-devtools/python/python3-ruamel-yaml-clib_0.2.8.bb_

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
From 21a53665a43fb875f56de42d58b92f1cec95af0c Mon Sep 17 00:00:00 2001
From: Thomas Roos <[email protected]>
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 <[email protected]>

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",
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "(?P<pver>2\.\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 \
Expand All @@ -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 = "(?P<pver>2\.\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 \
Expand All @@ -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"

0 comments on commit ea51b14

Please sign in to comment.