[med-svn] [Git][med-team/macsyfinder][master] 5 commits: Use unittests for autopkgtests

Michael R. Crusoe gitlab at salsa.debian.org
Sat Feb 6 14:36:10 GMT 2021



Michael R. Crusoe pushed to branch master at Debian Med / macsyfinder


Commits:
153545ee by Michael R. Crusoe at 2021-02-06T14:21:39+01:00
Use unittests for autopkgtests

- - - - -
3e1dacaf by Michael R. Crusoe at 2021-02-06T14:50:59+01:00
Fix conffile placement

- - - - -
905685e6 by Michael R. Crusoe at 2021-02-06T14:56:09+01:00
Make sure no build paths are embedded

- - - - -
4447898f by Michael R. Crusoe at 2021-02-06T15:31:03+01:00
Build the docs

- - - - -
609d9859 by Michael R. Crusoe at 2021-02-06T15:35:04+01:00
routine-update: Ready to upload to unstable

- - - - -


13 changed files:

- debian/changelog
- + debian/clean
- debian/control
- debian/docs
- debian/macsyfinder.doc-base
- + debian/macsyfinder.docs
- + debian/macsyfinder.lintian-overrides
- + debian/patches/debian_path
- + debian/patches/privacy
- debian/patches/series
- debian/rules
- debian/tests/control
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-macsyfinder (2.0~rc1-1) UNRELEASED; urgency=medium
+macsyfinder (2.0~rc1-1) unstable; urgency=medium
 
   * Team upload
 
@@ -16,8 +16,12 @@ macsyfinder (2.0~rc1-1) UNRELEASED; urgency=medium
 
   [ Michael R. Crusoe ]
   * debian/patches/allow_setuptools: added to fix build. Closes: #933928
+  * Use unittests for autopkgtests
+  * Fix conffile placement
+  * Make sure no build paths are embedded
+  * Build the docs
 
- -- Andreas Tille <tille at debian.org>  Fri, 06 Sep 2019 10:40:05 +0200
+ -- Michael R. Crusoe <crusoe at debian.org>  Sat, 06 Feb 2021 15:35:04 +0100
 
 macsyfinder (1.0.5-3) unstable; urgency=medium
 


=====================================
debian/clean
=====================================
@@ -0,0 +1,3 @@
+uninstall.cfg
+uninstall_files
+doc/_build/


=====================================
debian/control
=====================================
@@ -28,6 +28,7 @@ Rules-Requires-Root: no
 Package: macsyfinder
 Architecture: all
 Depends: ${python3:Depends},
+         ${sphinxdoc:Depends},
          ${misc:Depends},
          python3-networkx,
          python3-yaml,
@@ -36,6 +37,7 @@ Depends: ${python3:Depends},
          ncbi-blast+,
          libjs-jquery,
          libjs-underscore
+Built-Using: ${sphinxdoc:Built-Using}
 Description: detection of macromolecular systems in protein datasets
  MacSyFinder is a program to model and detect macromolecular systems,
  genetic pathways... in protein datasets. In prokaryotes, these systems


=====================================
debian/docs
=====================================
@@ -1,2 +1,2 @@
-debian/README.test
-debian/tests/run-unit-test
+#debian/README.test
+#debian/tests/run-unit-test


=====================================
debian/macsyfinder.doc-base
=====================================
@@ -16,4 +16,4 @@ Files: /usr/share/doc/macsyfinder/html/*
 Index: /usr/share/doc/macsyfinder/html/index.html
 
 Format:pdf
-Files: /usr/share/doc/macsyfinder/pdf/Macsyfinder.pdf.gz
+Files: /usr/share/doc/macsyfinder/macsyfinder.pdf.gz


=====================================
debian/macsyfinder.docs
=====================================
@@ -0,0 +1,2 @@
+doc/build/latex/macsyfinder.pdf
+doc/build/html/


=====================================
debian/macsyfinder.lintian-overrides
=====================================
@@ -0,0 +1 @@
+macsyfinder: package-contains-documentation-outside-usr-share-doc usr/share/macsyfinder/data/models/readme


=====================================
debian/patches/debian_path
=====================================
@@ -0,0 +1,16 @@
+Author: Michael R. Crusoe <crusoe at debian.org>
+Description: Use the final Debian paths
+Forwarded: not-needed
+--- macsyfinder.orig/setup.py
++++ macsyfinder/setup.py
+@@ -61,8 +61,8 @@
+ 
+         inst = self.distribution.command_options.get('install', {})
+         _file = os.path.join('macsypy', '__init__.py')
+-        subst_file(_file, {'MACSYDATA': os.path.join(get_install_data_dir(inst), 'macsyfinder'),
+-                           'MACSYCONF': os.path.join(get_install_conf_dir(inst), 'macsyfinder')})
++        subst_file(_file, {'MACSYDATA': os.path.join('/usr/share', 'macsyfinder'),
++                           'MACSYCONF': os.path.join('/etc/', 'macsyfinder')})
+ 
+         _install_lib.run(self)
+ 


=====================================
debian/patches/privacy
=====================================
@@ -0,0 +1,19 @@
+Author: Michael R. Crusoe <crusoe at debian.org>
+Description: Fix privacy-breach-generic due to external image
+Forwarded: not-needed
+--- macsyfinder.orig/doc/source/_templates/layout.html
++++ macsyfinder/doc/source/_templates/layout.html
+@@ -3,10 +3,7 @@
+ {% block footer %}
+ 
+ <a href="https://github.com/gem-pasteur/macsyfinder">
+-    <img style="position: absolute; top: 0; right: 0; border: 0;"
+-         src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
+-         alt="Fork me on GitHub"
+-         data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
++Fork me on GitHub
+ </a>
+ 
+-{% endblock %}
+\ No newline at end of file
++{% endblock %}


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,4 @@
 skip_failing_test.patch
 allow_setuptools
+debian_path
+privacy


=====================================
debian/rules
=====================================
@@ -3,36 +3,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-%:
-	dh $@ --with python3 --buildsystem=pybuild
-
-_override_dh_auto_install:
-	cd doc && make html
-	cd doc && make latexpdf
-	# ln -sf $(shell pybuild --print build_dir --interpreter python3) build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)-$(shell py3versions -vs)
-	python3 setup.py install --prefix=debian/macsyfinder/usr/ --install-conf=debian/macsyfinder/etc/ --no-viewer
-	# The better solution would be to use
-	#	dh_auto_install -- --prefix=/usr --install-conf=/etc --no-viewer
-	# and fiy setup.py to use --root as install location (which is ignored unfortunately)
-	# Since I have no idea how to fix setup.py here the broken config files are hacked afterwards
-	for conffile in \
-		etc/macsyfinder/macsyfinder.conf.new \
-		usr/lib/python3*/site-packages/macsypy/config.py \
-		usr/lib/python3*/site-packages/macsypy/registries.py \
-		; do \
-	    sed -i 's:debian/macsyfinder::g' debian/macsyfinder/$${conffile} ; \
-	done
-	mv debian/macsyfinder/etc/macsyfinder/macsyfinder.conf.new debian/macsyfinder/etc/macsyfinder/macsyfinder.conf
-	rm debian/macsyfinder/usr/share/doc/macsyfinder/html/_static/jquery.js
-	rm debian/macsyfinder/usr/share/doc/macsyfinder/html/_static/underscore.js
-	rm -Rf debian/macsyfinder/usr/share/macsyfinder/macsyview
+export PYBUILD_AFTER_INSTALL=mv {destdir}/usr/etc {destdir}/etc && cd {dir}/doc && make html latexpdf
 
-override_dh_clean:
-	rm -Rf doc/_build
-	rm -f uninstall.cfg
-	rm -f uninstall_files
-	dh_clean
+%:
+	dh $@ --with python3,sphinxdoc --buildsystem=pybuild
 
 override_dh_fixperms:
 	dh_fixperms
 	find debian -name "test_*.fa" -executable -exec chmod -x \{\} \;
+	find debian -name "*.prt" -executable -exec chmod -x \{\} \;


=====================================
debian/tests/control
=====================================
@@ -1,4 +1,3 @@
 Tests: run-unit-test
-Depends: @
-Restrictions:
-
+Depends: @, python3-setuptools
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -1,17 +1,19 @@
 #!/bin/bash
 set -e
 pkg="macsyfinder"
-if [ "$AUTOPKGTEST_TMP" = "" ] ; then
-AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
-fi
-cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
-cd $AUTOPKGTEST_TMP
-find . -name "*.gz" -exec gunzip \{\} \;
+# if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+# AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+# fi
+# cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
+# cd $AUTOPKGTEST_TMP
+# find . -name "*.gz" -exec gunzip \{\} \;
+# 
+# echo "TEST START"
+# 
+# /usr/bin/macsyfinder --db-type unordered --sequence-db test_base.fa all
+# 
+# /usr/bin/macsyfinder --db-type ordered_replicon --sequence-db ordered_replicon_base all
+# 
+# echo "PASS"
 
-echo "TEST START"
-
-/usr/bin/macsyfinder --db-type unordered --sequence-db test_base.fa all
-
-/usr/bin/macsyfinder --db-type ordered_replicon --sequence-db ordered_replicon_base all
-
-echo "PASS"
+python3 setup.py test



View it on GitLab: https://salsa.debian.org/med-team/macsyfinder/-/compare/421623a15e365930a72f4c874d378db053db05c3...609d985930fc5ba1ea9da68a3c202bf2f47f86ba

-- 
View it on GitLab: https://salsa.debian.org/med-team/macsyfinder/-/compare/421623a15e365930a72f4c874d378db053db05c3...609d985930fc5ba1ea9da68a3c202bf2f47f86ba
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/20210206/665c43aa/attachment-0001.html>


More information about the debian-med-commit mailing list