Skip to content

Commit 736747a

Browse files
Fix Makefile to use tox for docs (#752)
* Fix Makefile to use tox for docs * Resolve `open` based upon operating system Co-authored-by: Abhinav Singh <[email protected]>
1 parent 2b3f0cb commit 736747a

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ dist
2828
build
2929

3030
proxy/public
31-
docs/_build

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ CA_KEY_FILE_PATH := ca-key.pem
1414
CA_CERT_FILE_PATH := ca-cert.pem
1515
CA_SIGNING_KEY_FILE_PATH := ca-signing-key.pem
1616

17+
OPEN=$(shell which open)
18+
UNAME := $(shell uname)
19+
ifeq ($(UNAME), Linux)
20+
OPEN=$(shell which xdg-open)
21+
endif
22+
1723
.PHONY: all https-certificates sign-https-certificates ca-certificates
1824
.PHONY: lib-check lib-clean lib-test lib-package lib-coverage lib-lint lib-pytest
1925
.PHONY: lib-release-test lib-release lib-profile lib-doc
@@ -89,7 +95,6 @@ lib-dep:
8995
-r requirements-testing.txt \
9096
-r requirements-release.txt \
9197
-r requirements-tunnel.txt \
92-
-r docs/requirements.txt
9398

9499
lib-lint:
95100
python -m tox -e lint
@@ -115,18 +120,12 @@ lib-release: lib-package
115120
twine upload dist/*
116121

117122
lib-doc:
118-
pushd docs && \
119-
python -m sphinx \
120-
--keep-going \
121-
-b dirhtml \
122-
-d _build/doctrees \
123-
-D language=en . _build/html && \
124-
popd && \
125-
open docs/_build/html/index.html
123+
python -m tox -e lint && \
124+
$(OPEN) .tox/build-docs/docs_out/index.html
126125

127126
lib-coverage:
128127
pytest --cov=proxy --cov=tests --cov-report=html tests/
129-
open htmlcov/index.html
128+
$(OPEN) htmlcov/index.html
130129

131130
lib-profile:
132131
sudo py-spy record -o profile.svg -t -F -s -- python -m proxy

0 commit comments

Comments
 (0)