Skip to content
Commits on Source (10)
srst2 (0.2.0-7) UNRELEASED; urgency=medium
* Use 2to3 to port from Python2 to Python3
Closes: #938560
* debhelper-compat 12
* Standards-Version: 4.4.1
* Remove trailing whitespace in debian/rules
* autopkgtest: s/ADTTMP/AUTOPKGTEST_TMP/g
* Set upstream metadata fields: Repository, Repository-Browse.
* Use markdown instead of python-markdown
TODO:
cd tests && python3 test_slurm_srst2.py && python3 test_srst2.py
...........
----------------------------------------------------------------------
Ran 11 tests in 0.024s
OK
...........EE....
======================================================================
ERROR: test_get_pileup_with_defaults (__main__.TestMPileup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mock/mock.py", line 1330, in patched
return func(*args, **keywargs)
File "test_srst2.py", line 294, in test_get_pileup_with_defaults
'bowtie_sam_mod', 'fasta', 'pileup')
File "/build/srst2-0.2.0/scripts/srst2.py", line 735, in get_pileup
if args.threads > 1 and samtools_v1:
TypeError: '>' not supported between instances of 'MagicMock' and 'int'
======================================================================
ERROR: test_get_pileup_with_overides (__main__.TestMPileup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mock/mock.py", line 1330, in patched
return func(*args, **keywargs)
File "test_srst2.py", line 242, in test_get_pileup_with_overides
'bowtie_sam_mod', 'fasta', 'pileup')
File "/build/srst2-0.2.0/scripts/srst2.py", line 735, in get_pileup
if args.threads > 1 and samtools_v1:
TypeError: '>' not supported between instances of 'MagicMock' and 'int'
----------------------------------------------------------------------
Ran 17 tests in 0.042s
FAILED (errors=2)
make[1]: *** [debian/rules:34: override_dh_auto_test] Error 1
-- Andreas Tille <tille@debian.org> Wed, 11 Dec 2019 15:20:13 +0100
srst2 (0.2.0-6) unstable; urgency=medium
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test
......
......@@ -3,31 +3,31 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.
Uploaders: Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
dh-python,
python-all,
python-setuptools,
python-markdown,
python3-all,
python3-setuptools,
markdown,
dos2unix,
python-mock,
python-scipy,
bowtie2,
samtools
Standards-Version: 4.2.1
python3-mock <!nocheck>,
python3-scipy <!nocheck>,
bowtie2 <!nocheck>,
samtools <!nocheck>
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/srst2
Vcs-Git: https://salsa.debian.org/med-team/srst2.git
Homepage: https://katholt.github.io/srst2/
Package: srst2
Architecture: any
Depends: ${python:Depends},
Depends: ${python3:Depends},
${misc:Depends},
bowtie2,
cd-hit,
samtools,
python-scipy,
python-biopython
Recommends: python-rpy2
python3-scipy,
python3-biopython
Recommends: python3-rpy2
Description: Short Read Sequence Typing for Bacterial Pathogens
This program is designed to take Illumina sequence data, a MLST database
and/or a database of gene sequences (e.g. resistance genes, virulence
......
This diff is collapsed.
......@@ -2,3 +2,4 @@ check_command_line_arguments.patch
add_usr_bin_python_to_scripts.patch
fix_test.patch
fix_grep_call.patch
2to3.patch
......@@ -5,20 +5,20 @@
include /usr/share/dpkg/default.mk
%:
dh $@ --with python2
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_build:
dh_auto_build
markdown_py -f README.html README.md
markdown_py -f README_database_clustering.html database_clustering/README.md
markdown README.md > README.html
markdown database_clustering/README.md > database_clustering_README.html
override_dh_install:
dh_install
mv debian/$(DEB_SOURCE)/usr/lib/*/dist-packages/$(DEB_SOURCE)/* debian/$(DEB_SOURCE)/usr/share/$(DEB_SOURCE)
rm -rf debian/*/usr/bin/*.py debian/$(DEB_SOURCE)/usr/lib/*/dist-packages/
# fix line endings to make sure Python interpreter will be found
# fix line endings to make sure Python3 interpreter will be found
find debian/*/usr/share -name "VFDB*" -exec dos2unix \{\} \;
sed -i '1s:^#!/usr/local.*python[.0-9]*$$:#!/usr/bin/python:' debian/$(DEB_SOURCE)/usr/share/$(DEB_SOURCE)/qsub_srst2.py
sed -i '1s:^#!/usr/local.*python[.0-9]*$$:#!/usr/bin/python3:' debian/$(DEB_SOURCE)/usr/share/$(DEB_SOURCE)/qsub_srst2.py
override_dh_fixperms:
dh_fixperms
......@@ -31,13 +31,9 @@ override_dh_fixperms:
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
cd tests && python test_slurm_srst2.py && python test_srst2.py
cd tests && python3 test_slurm_srst2.py && python3 test_srst2.py
endif
override_dh_installdocs:
dh_installdocs
sed -i "s?sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__).*scripts.*?sys.path.append(os.path.abspath('/usr/share/$(DEB_SOURCE)'))?" debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/tests/*.py
# README.html contains a really maintained changelog
#override_dh_installchangelogs:
# dh_installchangelogs CHANGES.txt
Tests: run-unit-test
Depends: @, python-mock
Depends: @, python3-mock
Restrictions: allow-stderr
......@@ -2,13 +2,13 @@
pkg=srst2
if [ "$ADTTMP" = "" ] ; then
ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp /usr/share/doc/$pkg/tests/* $ADTTMP
cd $AUTOPKGTEST_TMP
cp /usr/share/doc/$pkg/tests/* $AUTOPKGTEST_TMP
find . -name "*.gz" -exec gunzip \{\} \;
for runtest in *.py ; do
python $runtest
python3 $runtest
done
# rm -rf *
......@@ -24,3 +24,5 @@ Registry:
Entry: NA
- Name: SciCrunch
Entry: NA
Repository: https://github.com/katholt/srst2.git
Repository-Browse: https://github.com/katholt/srst2