pyrofork/Makefile
wulan17 8353e5a2a2
Pyrofork: Full rebrand
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2024-02-06 04:41:59 +07:00

46 lines
1 KiB
Makefile

VENV := venv
PYTHON := $(VENV)/bin/python
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
TAG = v$(shell grep -E '__version__ = ".*"' pyrofork/__init__.py | cut -d\" -f2)
RM := rm -rf
.PHONY: venv clean-build clean-api clean api build
venv:
$(RM) $(VENV)
python3 -m venv $(VENV)
$(PYTHON) -m pip install -U pip wheel setuptools
$(PYTHON) -m pip install -U -e .
@echo "Created venv with $$($(PYTHON) --version)"
clean-docs:
$(RM) docs/build
$(RM) docs/source/api/bound-methods docs/source/api/methods docs/source/api/types docs/source/telegram
clean-build:
$(RM) *.egg-info build dist
clean-api:
$(RM) pyrofork/errors/exceptions pyrofork/raw/all.py pyrofork/raw/base pyrofork/raw/functions pyrofork/raw/types
clean:
make clean-build
make clean-api
api:
cd compiler/api && ../../$(PYTHON) compiler.py
cd compiler/errors && ../../$(PYTHON) compiler.py
build:
make clean
$(PYTHON) setup.py sdist
$(PYTHON) setup.py bdist_wheel
tag:
git tag $(TAG)
git push origin $(TAG)
dtag:
git tag -d $(TAG)
git push origin -d $(TAG)