File: rules

package info (click to toggle)
mrcal 2.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,004 kB
  • sloc: python: 28,652; ansic: 9,833; cpp: 1,010; perl: 390; makefile: 115; lisp: 47
file content (35 lines) | stat: -rwxr-xr-x 1,003 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export VERSION_USE_LATEST_TAG  = 1

%:
	dh $@ --with python3

# I build the python libraries for all the available python versions. The
# non-Python stuff shouldn't be rebuilt because Make should see that it's
# up-to-date
override_dh_auto_build:
	for v in `py3versions -s | sed s/python//g`; do		\
	  rm -f *pywrap*.o;					\
	  PYTHON_VERSION_FOR_EXTENSIONS=$$v dh_auto_build;	\
	done

# Similarly, I install everything, looping through all the available python
# versions, which could be more than just the default. All the non-python stuff
# will be installed multiple times, but it's the same files going to the same
# paths, so it hurts nothing
override_dh_auto_install:
	for v in `py3versions -s | sed s/python//g`; do		\
	  PYTHON_VERSION_FOR_EXTENSIONS=$$v dh_auto_install;	\
	done

override_dh_python3:
	dh_numpy3
	dh_python3

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	make test-nosampling
endif