From 98e37383c2c9a1c505379c32b07d5928596c9830 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Thu, 6 Apr 2023 22:14:51 -0400 Subject: [PATCH 1/2] Temporary workaround for make requirements_awx failure --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 9afc7c7440..fffa237d3d 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) MANAGEMENT_COMMAND ?= awx-manage VERSION := $(shell $(PYTHON) tools/scripts/scm_version.py) +# temparary workaround for pip resolver issues +PIP_OPTIONS="--use-deprecated=legacy-resolver" + # ansible-test requires semver compatable version, so we allow overrides to hack it COLLECTION_VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py | cut -d . -f 1-3) # args for the ansible-test sanity command From 14e613bc922e634564097cd6ffced13375f3fc96 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Thu, 6 Apr 2023 23:20:58 -0400 Subject: [PATCH 2/2] Fix failed license check psycopg2 also start with psycopg Co-Authored-By: Gabriel Muniz --- awx/main/tests/functional/test_licenses.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/awx/main/tests/functional/test_licenses.py b/awx/main/tests/functional/test_licenses.py index 4b8ee7a918..9961c7ca96 100644 --- a/awx/main/tests/functional/test_licenses.py +++ b/awx/main/tests/functional/test_licenses.py @@ -26,12 +26,12 @@ def test_python_and_js_licenses(): return (is_gpl, is_lgpl) def find_embedded_source_version(path, name): - for entry in os.listdir(path): - # Check variations of '-' and '_' in filenames due to python - for fname in [name, name.replace('-', '_')]: - if entry.startswith(fname) and entry.endswith('.tar.gz'): - v = entry.split(name + '-')[1].split('.tar.gz')[0] - return v + files = os.listdir(path) + tgz_files = [f for f in files if f.endswith('.tar.gz')] + for tgz in tgz_files: + pkg_name = tgz.split('-')[0].split('_')[0] + if pkg_name == name: + return tgz.split('-')[1].split('.tar.gz')[0] return None list = {}