Skip to content

Commit 2e71925

Browse files
committed
Further ensuring dependencies are installed
1 parent fa1e89f commit 2e71925

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

Makefile

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

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

1618
.PHONY: doc
@@ -86,30 +88,30 @@ sdist:
8688

8789
.PHONY: test
8890
test:
89-
python3 -c "import pytest" || python3 -m pip install pytest
91+
python3 -c "import pytest" > /dev/null 2>&1 || python3 -m pip install pytest
9092
python3 -m pytest -qq
9193

9294
.PHONY: valgrind
9395
valgrind:
94-
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
9597
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
9698
--log-file=/tmp/valgrind-output \
9799
python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output
98100

99101
.PHONY: readme
100102
readme:
101-
python3 -c "import markdown2" || python3 -m pip install markdown2
103+
python3 -c "import markdown2" > /dev/null 2>&1 || python3 -m pip install markdown2
102104
python3 -m markdown2 README.md > .long-description.html && open .long-description.html
103105

104106

105107
.PHONY: lint
106108
lint:
107-
python3 -c "import tox" || python3 -m pip install tox
109+
python3 -c "import tox" > /dev/null 2>&1 || python3 -m pip install tox
108110
python3 -m tox -e lint
109111

110112
.PHONY: lint-fix
111113
lint-fix:
112-
python3 -c "import black" || python3 -m pip install black
113-
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
114116
python3 -m black --target-version py37 .
115117
python3 -m isort .

docs/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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."

0 commit comments

Comments
 (0)