File tree Expand file tree Collapse file tree 4 files changed +19558
-19
lines changed
Expand file tree Collapse file tree 4 files changed +19558
-19
lines changed Original file line number Diff line number Diff line change @@ -129,3 +129,4 @@ venv.bak/
129129.mypy_cache /
130130docs_build.sh
131131.buildinfo
132+ gen_docs_json.py
Original file line number Diff line number Diff line change 11VENV := venv
22PYTHON := $(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
610RM := 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
1016venv :
1117 $(RM ) $(VENV )
@@ -20,9 +26,7 @@ clean-build:
2026clean-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
2731clean-docs :
2832 $(RM ) docs/build
3539docs :
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
4145build :
4246 make clean
4953
5054dtag :
5155 git tag -d $(TAG )
52- git push origin -d $(TAG )
56+ git push origin -d $(TAG )
You can’t perform that action at this time.
0 commit comments