Skip to content

Commit f671fb5

Browse files
committed
fixed raw base docs
thanks to TelegramPlayground/pyrogram@ca7d979
1 parent e638c2a commit f671fb5

File tree

4 files changed

+19558
-19
lines changed

4 files changed

+19558
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,4 @@ venv.bak/
129129
.mypy_cache/
130130
docs_build.sh
131131
.buildinfo
132+
gen_docs_json.py

Makefile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
VENV := venv
22
PYTHON := $(VENV)/bin/python
3-
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
4-
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)
3+
ifeq ($(OS),Windows_NT)
4+
PYTHON := $(VENV)/Scripts/python.exe
5+
endif
6+
7+
HOST := $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2 2>/dev/null || echo "127.0.0.1")
8+
TAG := v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)
59

610
RM := rm -rf
711

8-
.PHONY: venv clean-build clean-api clean api build docs clean-docs
12+
NUM_CORES := $(shell $(PYTHON) -c "import os; print(os.cpu_count())")
13+
14+
.PHONY: venv clean-build clean-api clean api build docs clean-docs tag dtag
915

1016
venv:
1117
$(RM) $(VENV)
@@ -20,9 +26,7 @@ clean-build:
2026
clean-api:
2127
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/raw/types
2228

23-
clean:
24-
make clean-build
25-
make clean-api
29+
clean: clean-build clean-api
2630

2731
clean-docs:
2832
$(RM) docs/build
@@ -35,8 +39,8 @@ api:
3539
docs:
3640
make clean-docs
3741
cd compiler/docs && ../../$(PYTHON) compiler.py
38-
$(VENV)/bin/sphinx-build \
39-
-b html "docs/source" "docs/build/html" -j6
42+
$(PYTHON) -m sphinx \
43+
-b html "docs/source" "docs/build/html" -j$(NUM_CORES)
4044

4145
build:
4246
make clean
@@ -49,4 +53,4 @@ tag:
4953

5054
dtag:
5155
git tag -d $(TAG)
52-
git push origin -d $(TAG)
56+
git push origin -d $(TAG)

0 commit comments

Comments
 (0)