Skip to content

Commit 8b09cc9

Browse files
committed
Test against py3.10 to py3.12.
1 parent 5372b95 commit 8b09cc9

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

Makefile

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,33 @@ play:
4545
@echo "`cat /etc/os-release`"
4646
@echo
4747

48+
.PHONY: clean
49+
clean:
50+
@echo
51+
@echo "==================== clean cache files and virtualenv ===================="
52+
@echo
53+
rm -rf ./.pytest_cache ./virtualenv ./st2_auth_ldap.egg-info
54+
find . -iname '*.pyc' -delete
55+
find . -iname '__pycache__' -delete
56+
4857
.PHONY: requirements
4958
requirements: .clone_st2_repo virtualenv
5059
@echo
5160
@echo "==================== requirements ===================="
5261
@echo
53-
$(eval PIP_VERSION := $(shell grep 'PIP_VERSION ?= ' /tmp/st2/Makefile | awk '{ print $$3}'))
54-
$(VIRTUALENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
55-
$(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r $(ST2_REPO_PATH)/requirements.txt
56-
$(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r $(ST2_REPO_PATH)/test-requirements.txt
57-
$(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r requirements.txt
58-
$(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r test-requirements.txt
62+
$(eval PIP_VERSION ?= $(shell awk '/^PIP_VERSION/ {print $$3}' /tmp/st2/Makefile))
63+
$(eval SETUPTOOLS_VERSION ?= $(shell awk '/^SETUPTOOLS_VERSION/ {print $$3}' /tmp/st2/Makefile))
64+
@echo
65+
@echo
66+
@echo Install pip $(PIP_VERSION) and setuptools $(SETUPTOOLS_VERSION) to match st2 core.
67+
@echo
68+
@echo
69+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --upgrade "pip==$(PIP_VERSION)"
70+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)"
71+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r $(ST2_REPO_PATH)/requirements.txt
72+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r $(ST2_REPO_PATH)/test-requirements.txt
73+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r requirements.txt
74+
$(VIRTUALENV_DIR)/bin/$(PYBIN) -m pip install --cache-dir $(HOME)/.pip-cache $(PIP_OPTIONS) -r test-requirements.txt
5975

6076
@echo ""
6177
@echo "================== register st2auth ======================"
@@ -127,10 +143,12 @@ unit-tests: requirements .clone_st2_repo .unit-tests
127143
.PHONY: .clone_st2_repo
128144
.clone_st2_repo:
129145
@echo
130-
@echo "==================== cloning st2 repo ===================="
146+
@echo "==================== cloning st2 repo [$(ST2_REPO_BRANCH)] ===================="
131147
@echo
132148
@rm -rf /tmp/st2
133-
@git clone https://github.com/StackStorm/st2.git --depth 1 --single-branch --branch $(ST2_REPO_BRANCH) /tmp/st2
149+
#~ @git clone https://github.com/StackStorm/st2.git --depth 1 --single-branch --branch $(ST2_REPO_BRANCH) /tmp/st2
150+
# debug branch
151+
@git clone https://github.com/nzlosh/st2.git --depth 1 --single-branch --branch $(ST2_REPO_BRANCH) /tmp/st2
134152

135153
.PHONY: .flake8
136154
.flake8:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ python-ldap>=3.4.0,<3.5.0
44
# - 3.1 adds python3.8
55
# - 4.2 adds python3.9
66
# - 5.2.1 adds python3.11
7-
cachetools>=3.1,<5.4.0
7+
cachetools<5.4.0,>=3.1

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py38,py39,py310,py311,lint
2+
envlist = py310,py311,py312,lint
33

44
[testenv]
55
deps = -r{toxinidir}/requirements.txt

0 commit comments

Comments
 (0)