-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
51 lines (44 loc) · 937 Bytes
/
justfile
File metadata and controls
51 lines (44 loc) · 937 Bytes
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
pkg := "shazam"
alias d := docs
alias c := clean
alias b := build
alias i := install
alias u := uninstall
# List available commands.
default:
@just --choose
# Clean up.
@clean:
echo "Cleaning..."
rm -rf tmp
rm -rf dist
rm -rf .eggs
rm -rf .cache
rm -rf .coverage
rm -rf .mypy_cache
rm -rf docs/build/*
rm -rf .pytest_cache
fd -I -e pyc -x rm -rf
fd -I __pycache__ -x rm -rf
# Build
@build:
echo "Building..."
rm -rf build
mkdir -p build
cd build && cmake .. && make -j`nproc`
cd ..
# Install.
@install: && clean
echo "Installing..."
pip install --no-build-isolation -Ceditable.rebuild=true -ve .
# Uninstall.
@uninstall: && clean
echo "Uninstalling {{pkg}}..."
pip uninstall {{pkg}}
rm -rf build
rm -rf python/{{pkg}}.egg-info
rm -rf python/{{pkg}}/_version.py
# Build docs.
@docs:
echo "Building docs for {{pkg}}..."
sphinx-reload docs