forked from pwaller/pyfiglet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (53 loc) · 2.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.DEFAULT_GOAL := help
help:
@echo "Usage:"
@echo " make install Install the package"
@echo " make install-full Install the package with all extras"
@echo " make activate Activate the virtual environment"
@echo " make run Run the demo with defined entry command (requires install)"
@echo " make run-demo Run the demo with python -m (works with poetry's --no-root)"
@echo " make run-dev Run the demo in dev mode"
@echo " make clean Delete dist and pycache files"
@echo " make build Build the package, cleans first"
@echo " make publish Publish the package, builds first"
@echo " make del-env Delete the virtual environment"
.PHONY: install install-full activate run run-demo run-dev console clean build publish del-env
install:
poetry install
install-full:
poetry install --all-extras
activate:
poetry shell
# This is set as entry script and assumes package is installed:
# note that this actually points to the original source package.
# poetry uses symbolic links for the current project
run:
textual-pyfiglet
# this works without installing the package:
run-demo:
python -m textual_pyfiglet
# dev mode sends messages to textual debug console
run-dev:
textual run --dev textual_pyfiglet.__main__:PyFigletDemo
# I turn off events because its just too much output
# Note: requires dev tools.
console:
textual console -x EVENT
clean:
rm -rf build dist
find . -name "*.pyc" -delete
build: clean
poetry build
publish: build
poetry publish
del-env:
rm -rf .venv
rm -rf poetry.lock
#-------------------------------------------------------------------------------
# I made sure to preserve the original PyFiglet CLI.
# You can access the original CLI with the following command:
#$ python -m textual_pyfiglet.pyfiglet
# The original PyFiglet CLI has a demo that can be accessed like this (verbatim, with the spaces):
#$ python -m textual_pyfiglet.pyfiglet some text here
# In order to change fonts with the original demo, do this:
#$ python -m textual_pyfiglet.pyfiglet -f small Hello, World!