|
1 | | -# Copyright 2020-2024 StackStorm contributors. |
| 1 | +# Copyright 2020-2026 StackStorm contributors. |
2 | 2 | # Copyright 2019 Extreme Networks, Inc. |
3 | 3 | # |
4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
|
15 | 15 |
|
16 | 16 | PY3 := python3 |
17 | 17 | SYS_PY3 := $(shell which $(PY3)) |
18 | | -PIP_VERSION = 24.0 |
| 18 | +PIP_VERSION ?= 25.3 |
| 19 | +SETUPTOOLS_VERSION ?= 80.10.2 |
19 | 20 |
|
20 | 21 | # Virtual Environment |
21 | 22 | VENV_DIR ?= .venv |
@@ -56,47 +57,47 @@ venv: |
56 | 57 | .PHONY: reqs |
57 | 58 | reqs: venv check_virtualenv |
58 | 59 | echo Install pip version $(PIP_VERSION) to match st2 core. |
59 | | - $(VENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)" |
60 | | - $(VENV_DIR)/bin/pip install -r requirements.txt |
61 | | - $(VENV_DIR)/bin/pip install -r requirements-test.txt |
62 | | - $(VENV_DIR)/bin/pip install -r requirements-docs.txt |
63 | | - $(VENV_DIR)/bin/pip install -r requirements-ci.txt |
64 | | - $(VENV_DIR)/bin/python setup.py develop |
| 60 | + $(VENV_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)" |
| 61 | + $(VENV_DIR)/bin/python -m pip install -r requirements.txt |
| 62 | + $(VENV_DIR)/bin/python -m pip install -r requirements-test.txt |
| 63 | + $(VENV_DIR)/bin/python -m pip install -r requirements-docs.txt |
| 64 | + $(VENV_DIR)/bin/python -m pip install -r requirements-ci.txt |
| 65 | + $(VENV_DIR)/bin/python -m pip install --editable . |
65 | 66 | echo |
66 | 67 |
|
67 | 68 | .PHONY: check_virtualenv |
68 | 69 | check_virtualenv: |
69 | | - test -d $(VENV_DIR) || exit 1 |
| 70 | + test -d "$(VENV_DIR)" || exit 1 |
70 | 71 |
|
71 | 72 | .PHONY: schemas |
72 | 73 | schemas: check_virtualenv |
73 | | - $(VENV_DIR)/bin/$(PY3) bin/orquesta-generate-schemas |
| 74 | + "$(VENV_DIR)/bin/$(PY3)" bin/orquesta-generate-schemas |
74 | 75 |
|
75 | 76 | .PHONY: format |
76 | 77 | format: check_virtualenv |
77 | | - $(VENV_DIR)/bin/black orquesta bin setup.py -l 100 |
| 78 | + "$(VENV_DIR)/bin/black" orquesta bin setup.py -l 100 |
78 | 79 |
|
79 | 80 | .PHONY: check |
80 | 81 | check: check_virtualenv |
81 | | - $(VENV_DIR)/bin/tox |
| 82 | + "$(VENV_DIR)/bin/tox" |
82 | 83 |
|
83 | 84 | .PHONY: docs |
84 | 85 | docs: reqs |
85 | | - rm -rf $(BUILDDIR) |
86 | | - . $(VENV_DIR)/bin/activate; $(SPHINXBUILD) -W -b html $(SOURCEDIR) $(BUILDDIR)/html |
| 86 | + rm -rf "$(BUILDDIR)" |
| 87 | + . "$(VENV_DIR)/bin/activate"; "$(SPHINXBUILD)" -W -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" |
87 | 88 |
|
88 | 89 | .PHONY: livedocs |
89 | 90 | livedocs: reqs |
90 | | - rm -rf $(BUILDDIR) |
91 | | - . $(VENV_DIR)/bin/activate; $(SPHINXAUTO) -H 0.0.0.0 -b html $(SOURCEDIR) $(BUILDDIR)/html |
| 91 | + rm -rf "$(BUILDDIR)" |
| 92 | + . "$(VENV_DIR)/bin/activate"; "$(SPHINXAUTO)" -H 0.0.0.0 -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" |
92 | 93 |
|
93 | 94 | .PHONY: package |
94 | 95 | package: check_virtualenv |
95 | | - rm -rf $(PKGDISTDIR) |
96 | | - rm -rf $(PKGBUILDDIR) |
97 | | - $(VENV_DIR)/bin/$(PY3) setup.py sdist bdist_wheel |
| 96 | + rm -rf "$(PKGDISTDIR)" |
| 97 | + rm -rf "$(PKGBUILDDIR)" |
| 98 | + "$(VENV_DIR)/bin/$(PY3)" -m build --outdir "${PKGDISTDIR}" |
98 | 99 |
|
99 | 100 | .PHONY: publish |
100 | 101 | publish: package |
101 | | - $(VENV_DIR)/bin/$(PY3) -m twine upload dist/* |
| 102 | + "$(VENV_DIR)/bin/$(PY3)" -m twine upload dist/* |
102 | 103 |
|
0 commit comments