From 5d91f89fae29fe37ffd31bafa74d7bff10c7db12 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Wed, 17 Feb 2021 12:06:05 +0000 Subject: [PATCH] Updates to pin charm-tools to 2.8.3 * Update requirements.txt to pin charm-tools to 2.8.3 * Update tox.ini to change the build parameters. * This upgrades from <2.7 which adds reproducible charms * Bug was fixed that controlled the default output directory doesn't get 'builds' appended. The tox change puts it back so that stable & master both build to the same directory. This may be reviewed in the future. Change-Id: If175d58b7b663927d7e7be1c44550a9b8aaa5d79 --- requirements.txt | 22 +++++++++++++++++++--- tox.ini | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index dd1e256..46b4e99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,24 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +# NOTE(lourot): This might look like a duplication of test-requirements.txt but +# some tox targets use only test-requirements.txt whereas charm-build uses only +# requirements.txt +setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 + # Build requirements -charm-tools>=2.4.4,<2.8 -# importlib-resources 1.1.0 removed Python 3.5 support -importlib-resources<1.1.0 +charm-tools==2.8.3 + +# Workaround until https://github.com/juju/charm-tools/pull/589 gets +# published +keyring<21 + simplejson + +# Newer versions use keywords that didn't exist in python 3.5 yet (e.g. +# "ModuleNotFoundError") +# NOTE(lourot): This might look like a duplication of test-requirements.txt but +# some tox targets use only test-requirements.txt whereas charm-build uses only +# requirements.txt +importlib-metadata<3.0.0; python_version < '3.6' +importlib-resources<3.0.0; python_version < '3.6' diff --git a/tox.ini b/tox.ini index c91922e..ce79fa1 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ deps = [testenv:build] basepython = python3 commands = - charm-build --log-level DEBUG -o {toxinidir}/build src {posargs} + charm-build --log-level DEBUG -o {toxinidir}/build/builds src {posargs} [testenv:py3] basepython = python3