mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
33 lines
787 B
Makefile
33 lines
787 B
Makefile
VENV := venv
|
|
PYTHON := $(VENV)/bin/python
|
|
HOST = $(shell ifconfig | grep "inet " | tail -1 | 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 -r requirements.txt -r dev-requirements.txt
|
|
@echo "Created venv with $$($(PYTHON) --version)"
|
|
|
|
clean-build:
|
|
$(RM) *.egg-info build dist
|
|
|
|
clean-api:
|
|
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/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
|