File: rules

package info (click to toggle)
fenics-basix 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,076 kB
  • sloc: cpp: 22,542; python: 10,184; makefile: 40; sh: 24
file content (50 lines) | stat: -rwxr-xr-x 1,896 bytes parent folder | download
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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/default.mk
export DEB_HOST_MULTIARCH

PY3VERS := $(shell py3versions -v --requested debian/control | tac -s' ')
PY3VER_DEFAULT := $(shell py3versions -dv)

PYTEST_OPTIONS = -k "not numba"

%:
	dh $@ --with sphinxdoc --buildsystem=cmake


override_dh_auto_clean:
	rm -rf cpp/basix/version.h
	rm -rf doc/cpp/html doc/cpp/latex
	rm -rf .pybuild
	rm -rf python/LICENSE
	rm -rf ./.pytest_cache test/.pytest_cache  test/__pycache__  python/testing_build
	dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure --sourcedir=cpp

override_dh_auto_build-indep: export http_proxy=127.0.0.1:9
override_dh_auto_build-indep: export https_proxy=127.0.0.1:9
override_dh_auto_build-indep:
	dh_auto_build --sourcedir=cpp -i
	cd doc/cpp; doxygen

execute_after_dh_auto_install:
	cp LICENSE python
	LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
	  CMAKE_PREFIX_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake \
	  pybuild --dir=$(CURDIR)/python --system=pyproject --name=basix --disable test

execute_before_dh_install-indep:
	LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
	  PYTHONPATH=$(CURDIR)/debian/python3-basix/usr/lib/python$(PY3VER_DEFAULT)/dist-packages:${PYTHONPATH} \
	  python3 -m sphinx -W -b html doc/python/source/ .pybuild/html/
	sed 's|href="https://fenicsproject.org/docs/basix/main/cpp/"|href="file:/usr/share/doc/basix-doc/cpp/index.html"|' -i .pybuild/html/index.html

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
execute_before_dh_python3:
	cd test; LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) PYTHONPATH=$(CURDIR)/debian/python3-basix/usr/lib/python$(PY3VER_DEFAULT)/dist-packages:${PYTHONPATH} pytest-3 $(PYTEST_OPTIONS)
endif