/
Makefile
50 lines (42 loc) · 1.05 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
.RECIPEPREFIX = >
# Remove build artefacts
.PHONY: clean
clean:
> @echo Cleaning
> @rm -rf build
# Rebuild the pickled `.dat` file from `rmsfact.txt`
.PHONY: build_binary_data
build_binary_data:
> @echo Building binary data
> @rm -f rmsfact/data/rmsfact.dat
> @python rmsfact/data/build_rmsfact.py
# Build the package in wheel and source form
.PHONY: build
build: clean build_binary_data
> @echo Building package
> @python -m build
# Build the package and install locally for development
.PHONY: install_dev
install_dev: build
> @echo Installing locally
> @python -m pip install -e .
# Install
.PHONY: install
install: build
> @echo Installing
> @python -m pip install .
# Build the package and upload to TestPyPI
.PHONY: upload_test
upload_test: test build
> @echo Uploading to testpypi
> @python -m twine upload --repository testpypi dist/*
# Build the package and upload to PyPI
.PHONY: upload
upload: test build
> @echo Uploading to PyPi
> @python -m twine upload dist/*
# Run unit tests
.PHONY: test
test: clean build_binary_data
> @echo Running tests
> @python test