1+ ifneq ($(strip $(AUDITWHEEL ) ) ,)
2+ WHEEL_OUTDIR = ./wheelhouse
3+ else
4+ WHEEL_OUTDIR = ./dist
5+ endif
16PYTHON = python
27SPHINX_APIDOC = sphinx-apidoc
38SPHINX_BUILD = sphinx-build
@@ -12,25 +17,31 @@ all: lint type test dist doc
1217req :
1318 $(PYTHON ) -m pip install --quiet --upgrade pip
1419 $(PYTHON ) -m pip install --quiet setuptools wheel build cython pytest mypy flake8 sphinx sphinx-rtd-theme myst-parser
20+ ifneq ($(strip $(AUDITWHEEL ) ) ,)
21+ $(PYTHON) -m pip install --quiet auditwheel
22+ endif
1523
1624lint :
1725 $(PYTHON ) -m flake8 --doctests $(PYROOTDIR )
1826
1927type :
20- $(PYTHON ) -m pip install --quiet --force-reinstall ./dist/ * .whl
28+ $(PYTHON ) -m pip install --quiet --force-reinstall $( WHEEL_OUTDIR ) /softfloatpy- * .whl
2129 $(PYTHON ) -m mypy --strict $(PYROOTDIR )
2230
2331test :
24- $(PYTHON ) -m pip install --quiet --force-reinstall ./dist/ * .whl
32+ $(PYTHON ) -m pip install --quiet --force-reinstall $( WHEEL_OUTDIR ) /softfloatpy- * .whl
2533 $(PYTHON ) -m pytest $(PYROOTDIR ) -vv --doctest-modules
2634
2735dist :
2836 $(PYTHON ) -m build
37+ ifneq ($(strip $(AUDITWHEEL ) ) ,)
38+ auditwheel repair dist/softfloatpy-*.whl
39+ endif
2940
3041doc :
31- $(PYTHON ) -m pip install --quiet --force-reinstall ./dist/ * .whl
42+ $(PYTHON ) -m pip install --quiet --force-reinstall $( WHEEL_OUTDIR ) /softfloatpy- * .whl
3243 $(SPHINX_APIDOC ) -T -f -o $(PYDOCSRCDIR ) /apidoc $(PYROOTDIR ) /src
3344 $(SPHINX_BUILD ) -b html $(PYDOCSRCDIR ) $(PYDOCOUTDIR ) /html
3445
3546clean :
36- rm -rf $(PYDOCOUTDIR ) $(PYROOTDIR ) /src/softfloatpy.egg-info ./dist
47+ rm -rf $(PYDOCOUTDIR ) $(PYROOTDIR ) /src/softfloatpy.egg-info ./dist ./wheelhouse
0 commit comments