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
|
#!/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 $@ --with python3 --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/crdp.abi3.so $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/crdp$$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
|