-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
64 lines (46 loc) · 1.44 KB
/
makefile
File metadata and controls
64 lines (46 loc) · 1.44 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# PYTHONLIB = python installation directory if use 'make install'
# make sure this is part of PYTHONPATH (in .bashrc, eg)
PIP = python -m pip
PYTHON = python
PYTHONVERSION = python`python -c 'import platform; print(platform.python_version())'`
VERSION = `python -c 'import qcdevol; print(qcdevol.__version__)'`
SRCFILES := $(shell ls setup.py pyproject.toml src/qcdevol/*.py)
DOCFILES := $(shell ls doc/*.rst doc/conf.py)
install-user :
$(PIP) install . --user --no-cache-dir
install install-sys :
$(PIP) install . --no-cache-dir
uninstall : # mostly works (may leave some empty directories)
$(PIP) uninstall qcdevol
update:
make uninstall install
.PHONY : doc
doc/html/index.html : $(SRCFILES) $(DOCFILES)
sphinx-build -b html doc/ doc/html
doc-html doc:
make doc/html/index.html
clear-doc:
rm -rf doc/html
.PHONY : tests
tests:
python -m unittest discover
coverage:
pytest --cov-report term-missing --cov=qcdevol tests/
sdist: # make source distribution and pure-Python wheel
$(PYTHON) -m build
# $(PYTHON) -m build --sdist
upload-twine: $(CYTHONFILES)
twine upload dist/qcdevol-$(VERSION)*
upload-git: $(CYTHONFILES)
echo "version $(VERSION)"
make doc-html
git diff --exit-code
git diff --cached --exit-code
git push origin master
tag-git:
echo "version $(VERSION)"
git tag -a v$(VERSION) -m "version $(VERSION)"
git push origin v$(VERSION)
test-download:
-$(PIP) uninstall qcdevol
$(PIP) install qcdevol --no-cache-dir