Skip to content

Commit

Permalink
Pin python libraries
Browse files Browse the repository at this point in the history
Use pinned `requirements.txt` and an additional `constraints.txt` file
to ensure pip constructs a viable build environment. The upstream
version (see [1]) partially depends on the distribution repositories
for versioning via packages like `python3-doc8` but I went though and
pinned everything in the `pip` files instead to create a single source
of truth independent of system packages.

Based on [1] by @clalancette upstream in `ros2/ros2_documentation`

[1] ros2/ros2_documentation@e43347d
  • Loading branch information
Bckempa committed Dec 18, 2023
1 parent dd8cff4 commit 7de6e47
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/spaceros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Install dependencies with pip
run: |
pip install --no-warn-script-location --user --upgrade -r requirements.txt
pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt
- name: Build
run: make html
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Install dependencies with pip
run: |
pip install --no-warn-script-location --user --upgrade -r requirements.txt
pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt
- name: Build
run: make multiversion
Expand Down
33 changes: 33 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Jinja2==3.0.3
MarkupSafe==2.0.1
Pygments==2.11.2
alabaster==0.7.12
babel==2.8.0
certifi==2020.6.20
chardet==4.0.0
imagesize==1.3.0
importlib-metadata==4.6.4
more-itertools==8.10.0
packaging==21.3
pbr==5.8.0
pip==22.0.2
pyparsing==2.4.7
pytz==2022.1
requests==2.25.1
restructuredtext-lint==1.3.2
roman==3.3
setuptools==59.6.0
six==1.16.0
snowballstemmer==2.2.0
doc8==0.8.1
docutils==0.16.0
Sphinx==4.3.2
sphinx-copybutton==0.4.0
sphinx-multiversion==0.2.4
sphinx-rtd-theme==1.0.0
sphinx-sitemap==2.3.0
sphinx-tabs==3.2.0
stevedore==3.5.0
urllib3==1.26.5
wheel==0.37.1
zipp==1.0.0
2 changes: 1 addition & 1 deletion docker/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ WORKDIR /tmp/doc_repository

USER $user

CMD pip3 install --no-warn-script-location --user --upgrade -r requirements.txt && make multiversion
CMD pip3 install --no-warn-script-location --user -r requirements.txt -c constraints.txt && make multiversion
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
doc8
docutils==0.16
pip
sphinx
sphinx-copybutton
sphinx-multiversion
sphinx-rtd-theme
sphinx-sitemap
sphinx-tabs
doc8==0.8.1
docutils==0.16.0
pip==22.0.2
sphinx==4.3.2
sphinx-copybutton==0.4.0
sphinx-multiversion==0.2.4
sphinx-rtd-theme==1.0.0
sphinx-sitemap==2.3.0
sphinx-tabs==3.2.0

0 comments on commit 7de6e47

Please sign in to comment.