Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure dependencies are installed when building docs #6612

Merged
merged 4 commits into from Sep 24, 2022

Conversation

radarhere
Copy link
Member

Moves the sphinx requirements from

python3 -m pip install furo sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph
to

Pillow/docs/Makefile

Lines 45 to 47 in af8260e

install-sphinx:
$(PYTHON) -c "import sphinx" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx
$(PYTHON) -c "import furo" > /dev/null 2>&1 || $(PYTHON) -m pip install furo
so that make doc can ensure that all of the dependencies are installed.

Also ensures that Pillow and olefile are installed, two more requirements for building the docs.

Makefile Outdated
Comment on lines 20 to 21
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
python3 -c "import olefile" > /dev/null 2>&1 || python3 -m pip install olefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're building Pillow anyway, shall we just use the docs extra?

Suggested change
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
python3 -c "import olefile" > /dev/null 2>&1 || python3 -m pip install olefile
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install ".[docs]"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Pillow was already installed, but olefile wasn't, your version wouldn't install it. Unless you'd like to add olefile to the docs/Makefile install command?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, makes more sense to move it to docs/Makefile.

docs/Makefile Outdated Show resolved Hide resolved
radarhere and others added 2 commits September 24, 2022 19:03
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@hugovk hugovk added the automerge Automatically merge PRs that are ready label Sep 24, 2022
@radarhere radarhere merged commit ef7e1ee into python-pillow:main Sep 24, 2022
@radarhere radarhere deleted the makedoc branch September 25, 2022 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants