[med-svn] [Git][med-team/unicycler][master] Modify debian/rules

Liubov Chuprikova gitlab at salsa.debian.org
Fri Sep 7 18:04:07 BST 2018


Liubov Chuprikova pushed to branch master at Debian Med / unicycler


Commits:
01c6541c by Liubov Chuprikova at 2018-09-07T17:01:06Z
Modify debian/rules

- - - - -


2 changed files:

- debian/control
- debian/rules


Changes:

=====================================
debian/control
=====================================
@@ -9,7 +9,6 @@ Build-Depends: debhelper (>= 11~),
                python3-setuptools,
                default-jdk,
                bowtie2,
-               freebayes,
                ncbi-blast+,
                pilon,
                racon,


=====================================
debian/rules
=====================================
@@ -2,7 +2,16 @@
 
 # DH_VERBOSE := 1
 
-export PYBUILD_NAME=unicycler
+# NOTE: All build steps are described in setup.py:UnicyclerInstall
+
+# copy all nacessary data before testing and make clean after the testing
+export PYBUILD_BEFORE_TEST=cp -a unicycler-runner.py {build_dir}; \
+	cp -a unicycler/cpp_functions.so {build_dir}/unicycler; \
+	cp -r sample_data {build_dir}
+export PYBUILD_AFTER_TEST=rm {build_dir}/unicycler-runner.py; \
+	rm -r {build_dir}/sample_data; \
+	rm -r {build_dir}/unicycler/__pycache__
+
 
 # Build time tests are flaky
 export DH_BUILD_MAINT_OPTIONS=nocheck
@@ -15,27 +24,11 @@ include /usr/share/dpkg/default.mk
 	dh $@ --with python3 --buildsystem=pybuild
 
 override_dh_auto_clean:
-	echo "Avoid:  command 'UnicyclerClean' has no such option 'all'"
-	find . -name "*.o" -delete
-	find . -name "*.so" -delete
-	find . -name __pycache__ -type d | xargs rm -rf
-	rm -rf .pybuild unicycler.egg-info
+	make distclean
 
 override_dh_auto_build:
-	dh_auto_build
-	# building the dynamic library requires extra make call
 	make
-	# for some reason it also needs to be manually moved
-	cp -a unicycler/cpp_functions.so `dirname $$(find .pybuild -name cpp_wrappers.py)`
-
-override_dh_auto_test:
-	BUILDPATH=$(shell pybuild --print build_dir --interpreter python3) ; \
-	for bp in .pybuild/cpython*$(DEB_SOURCE)/build ; do \
-	    ln -s $(CURDIR)/sample_data $${bp} ; \
-	    ln -s $(CURDIR)/unicycler-runner.py $${bp} ; \
-	    cp -a unicycler/*.so $${bp}/$(PYBUILD_NAME) ; \
-	done ; \
-	PYTHONPATH=$${BUILDPATH}/$(PYBUILD_NAME) dh_auto_test # || true
+	dh_auto_build
 
 override_dh_link:
 	dh_link



View it on GitLab: https://salsa.debian.org/med-team/unicycler/commit/01c6541c861301a856a6e35db2e08d34411ae68b

-- 
View it on GitLab: https://salsa.debian.org/med-team/unicycler/commit/01c6541c861301a856a6e35db2e08d34411ae68b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180907/b759fae9/attachment-0001.html>


More information about the debian-med-commit mailing list