Skip to content

Commit 7ee9a0e

Browse files
authored
Merge pull request #81 from radarhere/extras_require
2 parents c55d5d2 + 2e71925 commit 7ee9a0e

File tree

3 files changed

+35
-17
lines changed

3 files changed

+35
-17
lines changed

Makefile

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ clean:
99

1010
.PHONY: coverage
1111
coverage:
12-
pytest -qq
12+
python3 -c "import pytest" > /dev/null 2>&1 || python3 -m pip install pytest
13+
python3 -m pytest -qq
1314
rm -r htmlcov || true
14-
coverage report
15+
python3 -c "import coverage" > /dev/null 2>&1 || python3 -m pip install coverage
16+
python3 -m coverage report
1517

1618
.PHONY: doc
1719
doc:
@@ -39,7 +41,6 @@ help:
3941
@echo " inplace make inplace extension"
4042
@echo " install make and install"
4143
@echo " install-coverage make and install with C coverage"
42-
@echo " install-venv (deprecated) install in virtualenv"
4344
@echo " lint run the lint checks"
4445
@echo " lint-fix run Black and isort to (mostly) fix lint issues"
4546
@echo " release-test run code and package tests before release"
@@ -67,11 +68,6 @@ debug:
6768
make clean > /dev/null
6869
CFLAGS='-g -O0' python3 -m pip install --global-option="build_ext" . > /dev/null
6970

70-
.PHONY: install-venv
71-
install-venv:
72-
echo "'install-venv' is deprecated and will be removed in a future Pillow release"
73-
virtualenv .
74-
7571
.PHONY: release-test
7672
release-test:
7773
python3 -m pip install -e .[tests]
@@ -92,30 +88,30 @@ sdist:
9288

9389
.PHONY: test
9490
test:
95-
python3 -c "import pytest" || python3 -m pip install pytest
91+
python3 -c "import pytest" > /dev/null 2>&1 || python3 -m pip install pytest
9692
python3 -m pytest -qq
9793

9894
.PHONY: valgrind
9995
valgrind:
100-
python3 -c "import pytest_valgrind" || python3 -m pip install pytest-valgrind
96+
python3 -c "import pytest_valgrind" > /dev/null 2>&1 || python3 -m pip install pytest-valgrind
10197
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
10298
--log-file=/tmp/valgrind-output \
10399
python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output
104100

105101
.PHONY: readme
106102
readme:
107-
python3 -c "import markdown2" || python3 -m pip install markdown2
103+
python3 -c "import markdown2" > /dev/null 2>&1 || python3 -m pip install markdown2
108104
python3 -m markdown2 README.md > .long-description.html && open .long-description.html
109105

110106

111107
.PHONY: lint
112108
lint:
113-
python3 -c "import tox" || python3 -m pip install tox
109+
python3 -c "import tox" > /dev/null 2>&1 || python3 -m pip install tox
114110
python3 -m tox -e lint
115111

116112
.PHONY: lint-fix
117113
lint-fix:
118-
python3 -c "import black" || python3 -m pip install black
119-
python3 -c "import isort" || python3 -m pip install isort
114+
python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black
115+
python3 -c "import isort" > /dev/null 2>&1 || python3 -m pip install isort
120116
python3 -m black --target-version py37 .
121117
python3 -m isort .

docs/Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line.
55
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
6+
SPHINXBUILD = python3 -m sphinx.cmd.build
77
PAPER =
88
BUILDDIR = _build
99

@@ -41,38 +41,48 @@ help:
4141
clean:
4242
-rm -rf $(BUILDDIR)/*
4343

44+
install-sphinx:
45+
python3 -c "import sphinx" > /dev/null 2>&1 || python3 -m pip install sphinx
46+
4447
html:
48+
$(MAKE) install-sphinx
4549
$(SPHINXBUILD) -b html -W --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html
4650
@echo
4751
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
4852

4953
dirhtml:
54+
$(MAKE) install-sphinx
5055
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
5156
@echo
5257
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
5358

5459
singlehtml:
60+
$(MAKE) install-sphinx
5561
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
5662
@echo
5763
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
5864

5965
pickle:
66+
$(MAKE) install-sphinx
6067
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
6168
@echo
6269
@echo "Build finished; now you can process the pickle files."
6370

6471
json:
72+
$(MAKE) install-sphinx
6573
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
6674
@echo
6775
@echo "Build finished; now you can process the JSON files."
6876

6977
htmlhelp:
78+
$(MAKE) install-sphinx
7079
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
7180
@echo
7281
@echo "Build finished; now you can run HTML Help Workshop with the" \
7382
".hhp project file in $(BUILDDIR)/htmlhelp."
7483

7584
qthelp:
85+
$(MAKE) install-sphinx
7686
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
7787
@echo
7888
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
@@ -82,6 +92,7 @@ qthelp:
8292
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PillowPILfork.qhc"
8393

8494
devhelp:
95+
$(MAKE) install-sphinx
8596
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
8697
@echo
8798
@echo "Build finished."
@@ -91,63 +102,74 @@ devhelp:
91102
@echo "# devhelp"
92103

93104
epub:
105+
$(MAKE) install-sphinx
94106
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
95107
@echo
96108
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
97109

98110
latex:
111+
$(MAKE) install-sphinx
99112
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100113
@echo
101114
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
102115
@echo "Run \`make' in that directory to run these through (pdf)latex" \
103116
"(use \`make latexpdf' here to do that automatically)."
104117

105118
latexpdf:
119+
$(MAKE) install-sphinx
106120
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
107121
@echo "Running LaTeX files through pdflatex..."
108122
$(MAKE) -C $(BUILDDIR)/latex all-pdf
109123
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
110124

111125
text:
126+
$(MAKE) install-sphinx
112127
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
113128
@echo
114129
@echo "Build finished. The text files are in $(BUILDDIR)/text."
115130

116131
man:
132+
$(MAKE) install-sphinx
117133
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
118134
@echo
119135
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
120136

121137
texinfo:
138+
$(MAKE) install-sphinx
122139
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
123140
@echo
124141
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
125142
@echo "Run \`make' in that directory to run these through makeinfo" \
126143
"(use \`make info' here to do that automatically)."
127144

128145
info:
146+
$(MAKE) install-sphinx
129147
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
130148
@echo "Running Texinfo files through makeinfo..."
131149
make -C $(BUILDDIR)/texinfo info
132150
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
133151

134152
gettext:
153+
$(MAKE) install-sphinx
135154
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
136155
@echo
137156
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
138157

139158
changes:
159+
$(MAKE) install-sphinx
140160
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
141161
@echo
142162
@echo "The overview file is in $(BUILDDIR)/changes."
143163

144164
linkcheck:
165+
$(MAKE) install-sphinx
145166
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck -j auto
146167
@echo
147168
@echo "Link check complete; look for any errors in the above output " \
148169
"or in $(BUILDDIR)/linkcheck/output.txt."
149170

150171
doctest:
172+
$(MAKE) install-sphinx
151173
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152174
@echo "Testing of doctests in the sources finished, look at the " \
153175
"results in $(BUILDDIR)/doctest/output.txt."

docs/releasenotes/9.1.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Deprecations
4545
============
4646

4747
Constants
48-
~~~~~~~~~
48+
^^^^^^^^^
4949

5050
A number of constants have been deprecated and will be removed in Pillow 10.0.0
5151
(2023-07-01). Instead, ``enum.IntEnum`` classes have been added.
@@ -121,7 +121,7 @@ In effect, ``viewer.show_file("test.jpg")`` will continue to work unchanged.
121121
``viewer.show_file(path="test.jpg")`` instead.
122122

123123
FitsStubImagePlugin
124-
~~~~~~~~~~~~~~~~~~~
124+
^^^^^^^^^^^^^^^^^^^
125125

126126
.. deprecated:: 9.1.0
127127

0 commit comments

Comments
 (0)