File tree Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 40
40
41
41
- name : Install dependencies
42
42
run : |
43
- python -m pip install 'pip==25.0.1'
44
- pip install 'packaging==24.0'
43
+ export PIP_VERSION=$(grep -oP 'pip\s*==\s*\K([0-9]+\.[0-9]+\.[0-9]+)' pyproject.toml || echo '')
44
+ if [ -z "$PIP_VERSION" ]; then
45
+ echo '::warning title=Could not detect pip version::in pyproject.toml; falling back to latest.'
46
+ PIP_INSTALL="pip"
47
+ else
48
+ echo "Will install pip version $PIP_VERSION."
49
+ PIP_INSTALL="pip==$PIP_VERSION"
50
+ fi
51
+ python -m pip install "$PIP_INSTALL"
52
+
53
+ export PACKAGING_VERSION=$(grep -oP 'packaging\s*==\s*\K([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' pyproject.toml || echo '')
54
+ if [ -z "$PACKAGING_VERSION" ]; then
55
+ echo '::warning title=Could not detect packaging version::in pyproject.toml; falling back to latest.'
56
+ PACKAGING_INSTALL="packaging"
57
+ else
58
+ echo "Will install packaging version $PACKAGING_VERSION."
59
+ PACKAGING_INSTALL="packaging==$PACKAGING_VERSION"
60
+ fi
61
+ pip install "$PACKAGING_INSTALL"
45
62
46
63
- name : Validate version format
47
64
run : |
Original file line number Diff line number Diff line change 48
48
49
49
- name : Install python-gettext requirement
50
50
run : |
51
- python -m pip install 'pip==25.0.1' 'python-gettext==5.0'
51
+ export PIP_VERSION=$(grep -oP 'pip\s*==\s*\K([0-9]+\.[0-9]+\.[0-9]+)' pyproject.toml || echo '')
52
+ export PYTHON_GETTEXT_VERSION=$(grep -oP 'python-gettext\s*==\s*\K([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' pyproject.toml || echo '')
53
+
54
+ if [ -z "$PIP_VERSION" ]; then
55
+ echo '::warning title=Could not detect pip version::in pyproject.toml; falling back to latest.'
56
+ PIP_INSTALL="pip"
57
+ else
58
+ echo "Will install pip version $PIP_VERSION."
59
+ PIP_INSTALL="pip==$PIP_VERSION"
60
+ fi
61
+
62
+ if [ -z "$PYTHON_GETTEXT_VERSION" ]; then
63
+ echo '::warning title=Could not detect python-gettext version::in pyproject.toml; falling back to 5.0.'
64
+ PYTHON_GETTEXT_INSTALL="python-gettext==5.0"
65
+ else
66
+ echo "Will install python-gettext version $PYTHON_GETTEXT_VERSION."
67
+ PYTHON_GETTEXT_INSTALL="python-gettext==$PYTHON_GETTEXT_VERSION"
68
+ fi
69
+
70
+ python -m pip install "$PIP_INSTALL" "$PYTHON_GETTEXT_INSTALL"
52
71
53
72
- name : Extract strings
54
73
run : |
Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ jobs:
40
40
export TYPES_REQUESTS_VERSION=$(grep -oP 'types-requests\s*==\s*\K([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' pyproject.toml || echo '')
41
41
42
42
if [ -z "$MYPY_VERSION" ]; then
43
- echo " Could not detect mypy version in pyproject.toml; falling back to latest."
43
+ echo '::warning title= Could not detect mypy version:: in pyproject.toml; falling back to latest.'
44
44
MYPY_INSTALL="mypy"
45
45
else
46
46
echo "Will install mypy version $MYPY_VERSION."
47
47
MYPY_INSTALL="mypy==$MYPY_VERSION"
48
48
fi
49
49
50
50
if [ -z "$TYPES_REQUESTS_VERSION" ]; then
51
- echo " Could not detect types-requests version in pyproject.toml; falling back to latest."
51
+ echo '::warning title= Could not detect types-requests version:: in pyproject.toml; falling back to latest.'
52
52
TYPES_REQUESTS_INSTALL="types-requests"
53
53
else
54
54
echo "Will install types-requests version $TYPES_REQUESTS_VERSION."
You can’t perform that action at this time.
0 commit comments