-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathMakefile
27 lines (18 loc) · 1.11 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
version = $(shell poetry version -s)
python_sources = $(wildcard streamlit_cookies_manager/*.py) pyproject.toml MANIFEST.in
js_sources := $(wildcard streamlit_cookies_manager/public/*) $(wildcard streamlit_cookies_manager/src/*) streamlit_cookies_manager/tsconfig.json
js_npm_install_marker = streamlit_cookies_manager/node_modules/.package-lock.json
build: streamlit_cookies_manager/build/index.html sdist wheels
sdist: dist/streamlit-cookies-manager-$(version).tar.gz
wheels: dist/streamlit_cookies_manager-$(version)-py3-none-any.whl
js: streamlit_cookies_manager/build/index.html
dist/streamlit-cookies-manager-$(version).tar.gz: $(python_sources) js
poetry build -f sdist
dist/streamlit_cookies_manager-$(version)-py3-none-any.whl: $(python_sources) js
poetry build -f wheel
streamlit_cookies_manager/build/index.html: $(js_sources) $(js_npm_install_marker)
cd streamlit_cookies_manager && npm run build
$(js_npm_install_marker): streamlit_cookies_manager/package.json streamlit_cookies_manager/package-lock.json
cd streamlit_cookies_manager && npm install
clean:
-rm -r -f dist/* streamlit_cookies_manager/build/*