Merge pull request #13816 from TheRealHaoLiu/workaround-failed-make-requirements_awx

Temporary workaround for make requirements_awx failure and fix license test
This commit is contained in:
Hao Liu
2023-04-07 00:07:13 -04:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -10,6 +10,9 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
MANAGEMENT_COMMAND ?= awx-manage MANAGEMENT_COMMAND ?= awx-manage
VERSION := $(shell $(PYTHON) tools/scripts/scm_version.py) 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 # 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) COLLECTION_VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py | cut -d . -f 1-3)
# args for the ansible-test sanity command # args for the ansible-test sanity command

View File

@@ -26,12 +26,12 @@ def test_python_and_js_licenses():
return (is_gpl, is_lgpl) return (is_gpl, is_lgpl)
def find_embedded_source_version(path, name): def find_embedded_source_version(path, name):
for entry in os.listdir(path): files = os.listdir(path)
# Check variations of '-' and '_' in filenames due to python tgz_files = [f for f in files if f.endswith('.tar.gz')]
for fname in [name, name.replace('-', '_')]: for tgz in tgz_files:
if entry.startswith(fname) and entry.endswith('.tar.gz'): pkg_name = tgz.split('-')[0].split('_')[0]
v = entry.split(name + '-')[1].split('.tar.gz')[0] if pkg_name == name:
return v return tgz.split('-')[1].split('.tar.gz')[0]
return None return None
list = {} list = {}