File: rules

package info (click to toggle)
scalene 1.5.51-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 15,528 kB
  • sloc: cpp: 22,930; python: 13,403; javascript: 11,769; ansic: 817; makefile: 196; sh: 45
file content (33 lines) | stat: -rwxr-xr-x 1,201 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=scalene
export PYBUILD_TEST_ARGS=-v
export PYBUILD_BEFORE_TEST=cp -rv {dir}/test {build_dir}
export PYBUILD_AFTER_TEST=rm -rfv {build_dir}/test
export PYBUILD_AFTER_BUILD=cd {build_dir}; \
  help2man -N -n 'Memory Profiler for Python' python3 -m $(PYBUILD_NAME) \
    --no-info \
    --section 1 \
    --version-string '$(DEB_VERSION_UPSTREAM)' \
    > $(CURDIR)/$(PYBUILD_NAME).1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DESTDIR=$(CURDIR)/debian/python3-scalene
PYVERS := $(shell py3versions -sv)

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
	# pass
	# pyperf must be package to run test


execute_after_dh_install:
	set -e; for pyver in $(PYVERS); do \
		abitag=.$$(python$$pyver -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
		mv $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/libscalene.so $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/libscalene$$abitag.so; \
		mv $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/get_line_atomic.abi3.so $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/get_line_atomic$$abitag.so; \
	done