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 36 37
|
#!/usr/bin/make -f
export DH_VERBOSE = 1
export PYBUILD_NAME = heudiconv
# for paranoid
export http_proxy=http://127.0.0.1:9/
# to please datalad and git
export EMAIL=debian@example.com
export GIT_AUTHOR_NAME="The Name"
export GIT_COMMITTER_NAME=$(GIT_AUTHOR_NAME)
export PYBUILD_BEFORE_TEST := cp -a heudiconv/tests {build_dir}/heudiconv/
# zeros.bval does not exists (in the tarbal at least...)
export PYBUILD_TEST_ARGS=heudiconv/tests/test_* -k 'not test_bvals_are_zero and not test_reproin_largely_smoke'
# test_reproin_largely_smoke likely only fails on 32 bit platform
%:
dh $@ --buildsystem=pybuild
execute_after_dh_auto_install:
mkdir -p build
PYTHONPATH=$$(/bin/ls -d ./debian/heudiconv/usr/lib/python*/*-packages | head -n 1) \
help2man -n 'DICOM converter for organizing brain imaging data into structured directory layouts' \
-N --no-discard-stderr \
"python3 -W ignore ./debian/heudiconv/usr/bin/heudiconv" >| build/heudiconv.1
find debian -iname *.pyc -delete
# https://github.com/nipy/heudiconv/issues/399
rm -rf debian/heudiconv/usr/lib/python*/*-packages/Research
find debian -name __pycache__ | xargs rm -rf
execute_after_dh_clean:
# Ahhhhhhh!
rm -rf .pybuild build .pytest_cache/
-rm -rf heudiconv.egg-info/
|