From 43b98b64167822c82cb54c659b2a58f5eff63e55 Mon Sep 17 00:00:00 2001 From: Rafael Lopez Date: Mon, 16 Jan 2023 04:22:20 +0000 Subject: [PATCH] Minimal update to tox.ini for tests to pass - remove pip.sh - unpin top level requirements - update charm-tools version for pep8 test - update osci.yaml tox_extra_args for compatibility Signed-off-by: Rafael Lopez Change-Id: Iec9fbd296d6d5b5fa647739d5588218c28e0a773 --- osci.yaml | 2 +- pip.sh | 18 ------------------ tox.ini | 18 +++++++----------- 3 files changed, 8 insertions(+), 30 deletions(-) delete mode 100755 pip.sh diff --git a/osci.yaml b/osci.yaml index 01e1b16..61cd7fb 100644 --- a/osci.yaml +++ b/osci.yaml @@ -16,4 +16,4 @@ - osci-lint - tox-py36 vars: - tox_extra_args: bionic_model:bionic-ha + tox_extra_args: '-- bionic_model:bionic-ha' diff --git a/pip.sh b/pip.sh deleted file mode 100755 index 9a7e6b0..0000000 --- a/pip.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# -# This file is managed centrally by release-tools and should not be modified -# within individual charm repos. See the 'global' dir contents for available -# choices of tox.ini for OpenStack Charms: -# https://github.com/openstack-charmers/release-tools -# -# setuptools 58.0 dropped the support for use_2to3=true which is needed to -# install blessings (an indirect dependency of charm-tools). -# -# More details on the beahvior of tox and virtualenv creation can be found at -# https://github.com/tox-dev/tox/issues/448 -# -# This script is wrapper to force the use of the pinned versions early in the -# process when the virtualenv was created and upgraded before installing the -# depedencies declared in the target. -pip install 'pip<20.3' 'setuptools<50.0.0' -pip "$@" diff --git a/tox.ini b/tox.ini index 457ddfe..d02ca71 100644 --- a/tox.ini +++ b/tox.ini @@ -22,25 +22,21 @@ skip_missing_interpreters = False # * It is also necessary to pin virtualenv as a newer virtualenv would still # lead to fetching the latest pip in the func* tox targets, see # https://stackoverflow.com/a/38133283 -requires = - pip < 20.3 - virtualenv < 20.0 - setuptools < 50.0.0 - -# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 CHARM_DIR={envdir} -install_command = - {toxinidir}/pip.sh install {opts} {packages} commands = stestr run --slowest {posargs} allowlist_externals = charmcraft rename.sh -passenv = HOME TERM CS_* OS_* TEST_* +passenv = + HOME + TERM + CS_* + OS_* + TEST_* deps = -r{toxinidir}/test-requirements.txt [testenv:build] @@ -77,7 +73,7 @@ commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + charm-tools commands = flake8 {posargs} hooks unit_tests tests actions lib files charm-proof