Lines Matching +full:petsc4py +full:- +full:pip
1 -include ../../../petscdir.mk
4 default: opt=--inplace
6 package = petsc4py
12 # ----
21 test-%:
22 ${MPIEXEC} -n $* ${VALGRIND} ${PYTHON} ${PWD}/test/runtests.py ${opt}
28 -${RM} src/${package}/${MODULE}.c
29 -${RM} src/${package}/${MODULE}.h
30 -${RM} src/${package}/${MODULE}_api.h
34 ${PYTHON} setup.py clean --all
36 -${RM} -r build _configtest.* *.py[co]
37 -${RM} -r MANIFEST dist ${package}.egg-info
38 -${RM} -r `find . -name '__pycache__'`
39 -${RM} `find . -name '*.py[co]'`
41 -find . -name '*~' -exec rm -f {} ';'
43 # ----
47 ${PYTHON} setup.py install --prefix='' --user ${opt}
49 -${RM} -r $(shell ${PYTHON} -m site --user-site)/${package}
50 -${RM} -r $(shell ${PYTHON} -m site --user-site)/${package}-*-py*.egg-info
52 # ----
54 .PHONY: lint ruff-lint cython-lint check-docs stubtest
60 cython-lint:
61 conf/cythonize.sh -Wextra -Werror
62 cython-lint ${CYTHONLINT_OPTS} ${CYTHONLINT_SRC}
64 ruff-lint:
68 ${RM} -r petsc4py-lint-env
69 ${PYTHON} -m venv petsc4py-lint-env
70 . petsc4py-lint-env/bin/activate && python -m pip install -r conf/requirements-lint.txt
71 . petsc4py-lint-env/bin/activate && ${MAKE} cython-lint
72 . petsc4py-lint-env/bin/activate && ${MAKE} ruff-lint
74 check-docs:
75 ${RM} -r petsc4py-docs-env
76 ${PYTHON} -m venv petsc4py-docs-env
77 . petsc4py-docs-env/bin/activate && python -m pip install -r conf/requirements-docs.txt
78 . petsc4py-docs-env/bin/activate && CFLAGS=-O0 python -m pip install .
79 . petsc4py-docs-env/bin/activate && ${MAKE} sphinx-html SPHINXOPTS=-Wj1
82 python -m pip install .
86 …python -m mypy.stubtest petsc4py --ignore-missing-stub --allowlist conf/stubtest-allowlist --ignor…
89 git diff --quiet -- src/petsc4py/PETSc.pyi
92 ${RM} -r petsc4py-stubtest-env
93 ${PYTHON} -m venv petsc4py-stubtest-env
94 . petsc4py-stubtest-env/bin/activate && python -m pip install -r conf/requirements-stubtest.txt
95 . petsc4py-stubtest-env/bin/activate && ${MAKE} stubgen
96 . petsc4py-stubtest-env/bin/activate && ${MAKE} stubcheck
97 . petsc4py-stubtest-env/bin/activate && ${MAKE} stubdiff
98 # ----
100 .PHONY: docs docs-html docs-pdf docs-misc
101 docs: docs-html docs-pdf docs-misc
102 docs-html: rst2html sphinx-html
103 docs-pdf: sphinx-pdf
104 docs-misc: sphinx-man sphinx-info
106 RST2HTML = $(shell command -v rst2html || command -v rst2html.py || false)
107 RST2HTMLOPTS = --input-encoding=utf-8
108 RST2HTMLOPTS += --no-compact-lists
109 RST2HTMLOPTS += --cloak-email-addresses
116 SPHINXBUILD = sphinx-build
118 .PHONY: sphinx sphinx-html sphinx-pdf sphinx-man sphinx-info
119 sphinx: sphinx-html sphinx-pdf sphinx-man sphinx-info
120 sphinx-html:
121 mkdir -p build/doctrees docs/html
122 ${SPHINXBUILD} -a -b html -d build/doctrees ${SPHINXOPTS} \
125 sphinx-pdf:
126 mkdir -p build/doctrees build/latex
127 ${SPHINXBUILD} -b latex -d build/doctrees ${SPHINXOPTS} \
129 ${MAKE} -C build/latex all-pdf > /dev/null
131 sphinx-man:
132 mkdir -p build/doctrees build/man
133 ${SPHINXBUILD} -b man -d build/doctrees ${SPHINXOPTS} \
136 sphinx-info:
137 mkdir -p build/doctrees build/texinfo
138 ${SPHINXBUILD} -b texinfo -d build/doctrees ${SPHINXOPTS} \
140 ${MAKE} -C build/texinfo info > /dev/null
145 -${RM} docs/*.html docs/*.pdf
146 -${RM} docs/*.info docs/*.[137]
147 -${RM} -r docs/html
148 -${RM} -r docs/source/_build
149 -${RM} -r docs/source/demo
150 -${RM} -r docs/source/reference
151 -${RM} docs/source/*.inv
154 CFLAGS=-O0 python -m pip install .
155 ${MAKE} sphinx-html SPHINXOPTS=-Wj2
156 mkdir -p ${LOC}/petsc4py
157 mv docs/html/* ${LOC}/petsc4py
159 # ----
165 # ----