| 1 |
#! /usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=biomaj-download |
| 4 |
DTMP = $(CURDIR)/debian/python3-biomaj3-download |
| 5 |
PRESERVED_FILE = $(CURDIR)/biomaj_download/message/downmessage_pb2.py |
| 6 |
|
| 7 |
%: |
| 8 |
dh $@ --buildsystem=pybuild |
| 9 |
|
| 10 |
execute_before_dh_clean: |
| 11 |
rm -rf biomaj_download.egg-info |
| 12 |
if [ -f $(PRESERVED_FILE).bak ] \ |
| 13 |
; then mv -v $(PRESERVED_FILE).bak $(PRESERVED_FILE) \ |
| 14 |
; fi |
| 15 |
|
| 16 |
execute_before_dh_auto_configure: |
| 17 |
cp -av $(PRESERVED_FILE) $(PRESERVED_FILE).bak |
| 18 |
|
| 19 |
execute_before_dh_auto_build: |
| 20 |
cd biomaj_download/message \ |
| 21 |
&& protoc --python_out=. downmessage.proto |
| 22 |
|
| 23 |
execute_after_dh_install: |
| 24 |
sed -i '1s;^;#!/usr/bin/python3\n;' \ |
| 25 |
$(DTMP)/usr/bin/biomaj_download_consumer.py |
| 26 |
|
| 27 |
override_dh_auto_test: |
| 28 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 29 |
LOCAL_IRODS=0 NETWORK=0 python3 -m pytest -v tests/biomaj_tests.py |
| 30 |
endif |