| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
include /usr/share/dpkg/pkg-info.mk |
| 5 |
|
| 6 |
export PYBUILD_NAME=scalene |
| 7 |
export PYBUILD_TEST_ARGS=-v |
| 8 |
export PYBUILD_BEFORE_TEST=cp -rv {dir}/test {build_dir} |
| 9 |
export PYBUILD_AFTER_TEST=rm -rfv {build_dir}/test |
| 10 |
export PYBUILD_AFTER_BUILD=cd {build_dir}; \ |
| 11 |
help2man -N -n 'Memory Profiler for Python' python3 -m $(PYBUILD_NAME) \ |
| 12 |
--no-info \ |
| 13 |
--section 1 \ |
| 14 |
--version-string '$(DEB_VERSION_UPSTREAM)' \ |
| 15 |
> $(CURDIR)/$(PYBUILD_NAME).1 |
| 16 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 17 |
export DESTDIR=$(CURDIR)/debian/python3-scalene |
| 18 |
PYVERS := $(shell py3versions -sv) |
| 19 |
|
| 20 |
%: |
| 21 |
dh $@ --buildsystem=pybuild |
| 22 |
|
| 23 |
override_dh_auto_test: |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
execute_after_dh_install: |
| 29 |
set -e; for pyver in $(PYVERS); do \ |
| 30 |
abitag=.$$(python$$pyver -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \ |
| 31 |
mv $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/libscalene.so $(DESTDIR)/usr/lib/python$$pyver/dist-packages/scalene/libscalene$$abitag.so; \ |
| 32 |
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; \ |
| 33 |
done |