Skip to content

Commit

Permalink
Update makefile to pin pip version to fix nightly CI (kedro-org#3182)
Browse files Browse the repository at this point in the history
* Update makefile to pin pip version to fix nightly CI

* Add more comments

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>

* Update pip for RTD

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>

* update RTD build

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>

* hijack the pre_install steps

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>

* Fix linting

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>

---------

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Adam Kells <adamjkells93@gmail.com>
  • Loading branch information
noklam authored and adamkells committed Oct 30, 2023
1 parent f4b27c0 commit 9f70211
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
21 changes: 14 additions & 7 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ build:
jobs:
post_create_environment:
- npm install -g @mermaid-js/mermaid-cli
pre_install:
# pip==23.2 breaks pip-tools<7.0, and pip-tools>=7.0 does not support Python 3.7
# pip==23.3 breaks dependency resolution
- python -m pip install -U "pip>=21.2,<23.2"
# These are technically installation steps, due to RTD's limit we need to inject the installation earlier.
- python -m pip install --upgrade --no-cache-dir sphinx readthedocs-sphinx-ext
- python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir .[docs,test]
pre_build:
- pip freeze
- python -m sphinx -WETan -j auto -D language=en -b linkcheck -d _build/doctrees docs/source _build/linkcheck
Expand All @@ -30,10 +37,10 @@ sphinx:
# configuration: mkdocs.yml

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
- test
# python:
# install:
# - method: pip
# path: .
# extra_requirements:
# - docs
# - test
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ package: clean install
python -m pip install build && python -m build

install-test-requirements:
# pip==23.2 breaks pip-tools<7.0, and pip-tools>=7.0 does not support Python 3.7
# pip==23.3 breaks dependency resolution
python -m pip install -U "pip>=21.2,<23.2"
pip install .[test]

install-pre-commit: install-test-requirements
Expand Down
4 changes: 2 additions & 2 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def _setup_minimal_env(context):
"install",
"-U",
# pip==23.2 breaks pip-tools<7.0, and pip-tools>=7.0 does not support Python 3.7
"pip>=21.2,<23.2; python_version < '3.8'",
"pip>=21.2; python_version >= '3.8'",
# pip==23.3 breaks dependency resolution
"pip>=21.2,<23.2",
],
env=context.env,
)
Expand Down

0 comments on commit 9f70211

Please sign in to comment.