From d7afd1d2ae2fd5291799c4f4f4175606d4fe7125 Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Thu, 25 Feb 2021 11:37:40 -0500 Subject: [PATCH] Use newer python version for releasing to pypi (#395) * Pin kube dependency properly * Use python3 instead of 2 for pushing to pypi --- .travis.yml | 2 ++ requirements.txt | 2 +- scripts/update-version.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f1f2b34..61fa8329 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,7 @@ jobs: - TEST_SUITE=lint OPENSHIFT_VERSION=latest - stage: deploy script: skip + python: '3.5' deploy: provider: pypi user: openshift @@ -49,6 +50,7 @@ jobs: repo: openshift/openshift-restclient-python condition: "$TRAVIS_TAG =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+(([ab]|dev|rc)[0-9]+)?$" - stage: test-deploy + python: '3.5' script: python -c "import openshift ; print(openshift.__version__)" install: - pip install openshift diff --git a/requirements.txt b/requirements.txt index ab2e4c80..2984992d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ jinja2 -kubernetes +kubernetes ~= 12.0 python-string-utils ruamel.yaml six diff --git a/scripts/update-version.sh b/scripts/update-version.sh index c6010dfa..d166dcf3 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -9,6 +9,6 @@ echo "--- updating version information..." sed -i'' "s/^CLIENT_VERSION = .*/CLIENT_VERSION = \\\"${CLIENT_VERSION}\\\"/" "${SCRIPT_ROOT}/../setup.py" sed -i'' "s/^__version__ = .*/__version__ = \\\"${CLIENT_VERSION}\\\"/" "${CLIENT_ROOT}/__init__.py" sed -i'' "s/^Version:.*/Version: ${CLIENT_VERSION}/" "${SCRIPT_ROOT}/../python-openshift.spec" -sed -i'' "s/^kubernetes ~= .*/kubernetes ~= ${KUBERNETES_CLIENT_VERSION}/" "${SCRIPT_ROOT}/../requirements.txt" +sed -i'' "s/^kubernetes.*/kubernetes ~= ${KUBERNETES_CLIENT_VERSION}/" "${SCRIPT_ROOT}/../requirements.txt" sed -i'' "s/^__k8s_client_version__ = .*/__k8s_client_version__ = \\\"${KUBERNETES_CLIENT_VERSION}\\\"/" "${CLIENT_ROOT}/__init__.py" sed -i'' "s/^kubernetes .=.*/kubernetes ~= ${KUBERNETES_CLIENT_VERSION}/" ${SOURCE_ROOT}/requirements.txt