-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 1.52 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
.PHONY: help clean setup test
help:
@echo "make clean"
@echo " clean all python build/compilation files and directories"
@echo "make setup"
@echo " install dependencies in active python environment"
@echo "make test"
@echo " run all tests and coverage"
@echo "make version"
@echo " update _version.py with current version tag"
@echo "make dist"
@echo " build the package ready for distribution and update the version tag"
clean:
find . -name '*.pyc' -exec rm --force {} +
find . -name '*.pyo' -exec rm --force {} +
find . -name '*~' -exec rm --force {} +
rm --force .coverage
rm --force --recursive .pytest_cache
rm --force --recursive build/
rm --force --recursive dist/
rm --force --recursive *.egg-info
rm --force .install.done
rm --force .install.test.done
.install.done:
pip install --upgrade pip setuptools
pip install -e .
touch .install.done
setup: .install.done
.install.test.done:
pip install --upgrade pip setuptools
pip install -e .[test]
touch .install.test.done
test: .install.test.done
pytest --verbose --ignore docs --color=yes --cov=eotransform_xarray --cov-report term-missing --doctest-modules
version:
echo "__version__ = \"$(shell git describe --always --tags --abbrev=0)\"" > src/eotransform_xarray/_version.py
dist: version
pip3 install build twine
python3 -m build
version-nightly:
echo "__version__ = \"$(shell python git_version_to_pep440.py $(shell git describe --always))\"" > src/eotransform_xarray/_version.py
dist-nightly: version-nightly
pip install build twine
python -m build