-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (43 loc) · 1.22 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
55
56
57
58
59
60
61
SHELL:=/bin/bash
ZIP=pseries_basis# ZIP name
VERSION=$(shell cat ./VERSION)
# change to your sage command if needed
SAGE=sage
# Package folder
PACKAGE=pseries_basis
all: install lint doc test
# Installing commands
install:
$(SAGE) -pip install --upgrade .
no-deps:
$(SAGE) -pip install --upgrade --no-deps .
uninstall:
$(SAGE) -pip uninstall $(PACKAGE)
develop:
$(SAGE) -pip install --upgrade -e .
test: no-deps
$(SAGE) -tox -e doctest -- pseries_basis
coverage:
$(SAGE) -tox -e coverage -- pseries_basis
lint:
$(SAGE) -tox -e relint,pycodestyle-minimal -- pseries_basis
ready: lint test
@echo "Repository is ready to push: check with act th actions in case of changes."
# Documentation commands
doc: no-deps
cd docsrc && $(SAGE) -sh -c "make html"
doc-github: doc
@rm -rf ./docs
@cp -a docsrc/build/html/. ./docs
@echo "" > ./docs/.nojekyll
# Cleaning commands
clean: clean_doc clean_pyc
clean_doc:
@echo "Cleaning documentation"
@cd docsrc && $(SAGE) -sh -c "make clean"
clean_pyc:
@echo "Cleaning the Python precompiled files (.pyc)"
@find . -name "*.pyc" -exec rm {} +
@find . -name "__pycache__" -exec rm -d {} +
@rm -rf ./build
.PHONY: all install develop test coverage clean clean_doc doc doc-pdf