-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 1.3 KB
/
Makefile
File metadata and controls
46 lines (34 loc) · 1.3 KB
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
## ------------------------
## mathphys - Makefile help
## ------------------------
PACKAGE = $(shell basename $(shell pwd))
PREFIX ?=
PIP ?= pip
ifeq ($(CONDA_PREFIX),)
PREFIX=sudo -H
PIP=pip-sirius
endif
## Install package using the local repository
install: uninstall
$(PREFIX) $(PIP) install --no-deps --compile ./
$(PREFIX) git clean -fdX
uninstall:
$(PREFIX) $(PIP) uninstall -y $(PACKAGE)
## Install in editable mode (i.e. setuptools "develop mode")
develop-install: develop-uninstall
$(PIP) install --no-deps -e ./
develop-uninstall:
$(PIP) uninstall -y $(PACKAGE)
help: ## Show this help.
@grep '##' Makefile| sed -e '/@/d' | sed -r 's,(.*?:).*##(.*),\1\2,g'
dist: ## Build setuptools dist
python -m build
distupload: ## Upload package dist to PyPi
python -m twine upload --verbose dist/*
distinstall: ## Install package from PyPi
python -m pip install $(PACKAGE)==$(shell cat "VERSION")
disttestupload: ## Upload package dist to Test PyPi
python -m twine upload --verbose --repository testpypi dist/*
disttestinstall: ## Install package from Test PyPi
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps $(PACKAGE)==$(shell cat "VERSION")
disttest: dist disttestupload disttestinstall test ## Build the package, upload to Test PyPi, install from PyPi and run tests