| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_VERBOSE = 1 |
| 4 |
export PYBUILD_NAME = heudiconv |
| 5 |
|
| 6 |
# for paranoid |
| 7 |
export http_proxy=http://127.0.0.1:9/ |
| 8 |
|
| 9 |
# to please datalad and git |
| 10 |
export [email protected] |
| 11 |
export GIT_AUTHOR_NAME="The Name" |
| 12 |
export GIT_COMMITTER_NAME=$(GIT_AUTHOR_NAME) |
| 13 |
|
| 14 |
# zeros.bval does not exists (in the tarbal at least...) |
| 15 |
# test_reproin_largely_smoke likely only fails on 32 bit platform |
| 16 |
export PYBUILD_BEFORE_TEST = \ |
| 17 |
rm -rf {build_dir}/heudiconv/tests \ |
| 18 |
; cp -a heudiconv/tests {build_dir}/ |
| 19 |
export PYBUILD_TEST_ARGS = \ |
| 20 |
-k 'not test_bvals_are_zero and not test_reproin_largely_smoke' |
| 21 |
export PYBUILD_AFTER_TEST = \ |
| 22 |
rm -r {build_dir}/tests |
| 23 |
|
| 24 |
%: |
| 25 |
dh $@ --buildsystem=pybuild |
| 26 |
|
| 27 |
execute_after_dh_auto_install: |
| 28 |
mkdir -p build |
| 29 |
PYTHONPATH=$$(/bin/ls -d ./debian/heudiconv/usr/lib/python*/*-packages | head -n 1) \ |
| 30 |
help2man -n 'DICOM converter for organizing brain imaging data into structured directory layouts' \ |
| 31 |
-N --no-discard-stderr \ |
| 32 |
"python3 -W ignore ./debian/heudiconv/usr/bin/heudiconv" >| build/heudiconv.1 |
| 33 |
find debian -iname *.pyc -delete |
| 34 |
# https://github.com/nipy/heudiconv/issues/399 |
| 35 |
rm -rf debian/heudiconv/usr/lib/python*/*-packages/Research |
| 36 |
find debian -name __pycache__ | xargs rm -rf |
| 37 |
|
| 38 |
|
| 39 |
execute_after_dh_clean: |
| 40 |
# Ahhhhhhh! |
| 41 |
rm -rf .pybuild build .pytest_cache/ |
| 42 |
-rm -rf heudiconv.egg-info/ |