File: rules

package info (click to toggle)
pyobjcryst 2024.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,964 kB
  • sloc: cpp: 5,824; python: 3,423; makefile: 22; sh: 6
file content (27 lines) | stat: -rwxr-xr-x 1,233 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
#!/usr/bin/make -f
export DH_VERBOSE = 1

ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
else
  NJOBS := -j $(shell nproc)
endif

export PYBUILD_NAME=pyobjcryst
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export PYBUILD_SYSTEM=custom
export PYBUILD_BEFORE_BUILD=mkdir -p debian/$(PYBUILD_NAME)
export PYBUILD_BUILD_ARGS=scons $(NJOBS) python=/usr/bin/{interpreter} build=debug prefix=debian/$(PYBUILD_NAME) develop
export PYBUILD_INSTALL_ARGS=scons python=/usr/bin/{interpreter} build=debug prefix=debian/$(PYBUILD_NAME) install
export PYBUILD_TEST_ARGS=PYTHONPATH=src scons python=/usr/bin/{interpreter} build=debug prefix=debian/$(PYBUILD_NAME) test

%:
	dh $@ --with numpy3,python3 --buildsystem=pybuild

override_dh_auto_clean:
	dh_clean
	$(RM) -r src/pyobjcryst/version.cfg src/pyobjcryst.egg-info/ .pybuild build/
	$(RM) -r .sconf_temp/ .sconsign.dblite config.log src/pyobjcryst/_pyobjcryst.so
	find . -name "*.pyc" -delete
	$(RM) -r dist src/pyobjcryst/_pyobjcryst.* .pytest_cache/ debian/$(PYBUILD_NAME)