[med-svn] [Git][med-team/trinculo][master] 8 commits: Add patch to fix FTBFS with gcc-11 (Closes: #997266)

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Oct 31 19:20:55 GMT 2021



Nilesh Patra pushed to branch master at Debian Med / trinculo


Commits:
135b861c by Nilesh Patra at 2021-10-31T22:16:24+05:30
Add patch to fix FTBFS with gcc-11 (Closes: #997266)

- - - - -
d402870b by Nilesh Patra at 2021-10-31T22:17:26+05:30
Add myself as an uploader instead

- - - - -
78594c9c by Nilesh Patra at 2021-10-31T22:17:30+05:30
Bump debhelper compatibility level to 13

- - - - -
3a4ca938 by Nilesh Patra at 2021-10-31T22:17:34+05:30
Bump Standards-Version to 4.6.0 (no changes needed)

- - - - -
ddf80c5e by Nilesh Patra at 2021-10-31T19:06:00+00:00
Update python3 scripts to python3, fix interpreter, fix bugs in them

- - - - -
7589058d by Nilesh Patra at 2021-10-31T19:06:22+00:00
Install trinculo in /usr/bin, not in /bin

- - - - -
253f4104 by Nilesh Patra at 2021-11-01T00:40:55+05:30
Run testing.py file (vendored by upstream) as auttest as well

- - - - -
ba1c39d1 by Nilesh Patra at 2021-11-01T00:44:29+05:30
Upload to unstable

- - - - -


8 changed files:

- debian/changelog
- debian/control
- debian/install
- + debian/patches/fix-interpreter.patch
- + debian/patches/gcc11.patch
- debian/patches/series
- debian/tests/control
- + debian/tests/run-upstream-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+trinculo (0.96+dfsg-4) unstable; urgency=medium
+
+  * Add patch to fix FTBFS with gcc-11 (Closes: #997266)
+  * Add myself as an uploader instead
+    + Thanks Pranav, for your work so far
+  * Bump debhelper compatibility level to 13
+  * Bump Standards-Version to 4.6.0 (no changes needed)
+  * Port python2 scripts to python3 fix interpreter, fix bugs in them
+  * Install trinculo in /usr/bin, not in /bin
+  * Run testing.py file (vendored by upstream) as autopkgtest as well
+
+ -- Nilesh Patra <nilesh at debian.org>  Mon, 01 Nov 2021 00:43:03 +0530
+
 trinculo (0.96+dfsg-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -2,10 +2,10 @@ Source: trinculo
 Section: science
 Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>, Pranav Ballaney <ballaneypranav at gmail.com>
-Build-Depends: debhelper-compat (= 12),
+Uploaders: Andreas Tille <tille at debian.org>, Nilesh Patra <nilesh at debian.org>
+Build-Depends: debhelper-compat (= 13),
                liblapack-dev
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/trinculo
 Vcs-Git: https://salsa.debian.org/med-team/trinculo.git
 Homepage: https://sourceforge.net/projects/trinculo/


=====================================
debian/install
=====================================
@@ -1 +1 @@
-bin/trinculo
+bin/trinculo usr/bin


=====================================
debian/patches/fix-interpreter.patch
=====================================
@@ -0,0 +1,398 @@
+Description: Fix python3 interpreter path, update test script to run with files at needed places
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2021-10-31
+--- a/bin/doFM.py
++++ b/bin/doFM.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ 
+ #  trinculo, Flexible tools for multinomial association
+ #    Copyright (C) 2014  Luke Jostins
+@@ -54,9 +54,9 @@
+ INFILE.close()
+ INFILE = open(inputfile)
+ 
+-print "\t".join(INFILE.readline().split()) + "\tP_CAUSAL"
++print("\t".join(INFILE.readline().split()) + "\tP_CAUSAL")
+ 
+ for rawline in INFILE:
+ 	line = rawline.split()
+-	print "\t".join(line) + "\t" + str(math.exp(float(line[i]) - PD))
++	print("\t".join(line) + "\t" + str(math.exp(float(line[i]) - PD)))
+ 
+--- a/bin/doMS.py
++++ b/bin/doMS.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python 
++#!/usr/bin/python3
+ 
+ import sys
+ import math
+@@ -149,26 +149,26 @@
+             priors.append(1.0/((Npheno + 1)*nCk(Npheno,k)))
+ #print priors
+ if mode == 1 or mode == 2:
+-    print "\t".join(header)
++    print("\t".join(header))
+ if mode == 3:
+-    print "\t".join(header[0:5]),
+-    print "BestSpecModel\tBestSharedModel\tLogSpecificityBF"
++    print("\t".join(header[0:5]), end=' ')
++    print("BestSpecModel\tBestSharedModel\tLogSpecificityBF")
+ if mode == 4:
+-    print "\t".join(header[0:5]),
+-    print "BestModel\tBestModelProb\tCredibleSet"
++    print("\t".join(header[0:5]), end=' ')
++    print("BestModel\tBestModelProb\tCredibleSet")
+ 
+ for line_raw in FILE:
+     line = line_raw.split()
+-    print "\t".join(line[0:5]),
++    print("\t".join(line[0:5]), end=' ')
+     BFs = [0.0]
+     for i in range(6,len(line)):
+         BFs.append(float(line[i]) - float(line[5]))
+     if mode == 2 or mode == 4:
+         posteriors = numpy.exp(numpy.array(BFs)*numpy.array(priors))/sum(numpy.exp(numpy.array(BFs)*numpy.array(priors)))
+     if (mode == 1):
+-        print "\t".join([str(x) for x in BFs])
++        print("\t".join([str(x) for x in BFs]))
+     elif (mode == 2):
+-        print "\t".join([str(x) for x in posteriors])
++        print("\t".join([str(x) for x in posteriors]))
+     elif (mode == 3):
+         bestShare = -1
+         bestShareBF = -1e100
+@@ -182,7 +182,7 @@
+                 bestShareBF = BFs[i]
+                 bestShare = i
+         #print bestShare, bestShareBF, bestUnique, bestUniqueBF
+-        print header[5 + bestUnique],header[5 + bestShare], bestUniqueBF - bestShareBF
++        print(header[5 + bestUnique],header[5 + bestShare], bestUniqueBF - bestShareBF)
+     elif (mode == 4):
+         order = numpy.argsort(-posteriors)
+         CredSet = header[5 + order[0]]
+@@ -192,6 +192,6 @@
+             CredSet += "&" +  header[5 + order[i]]
+             CredValue += posteriors[order[i]]
+             i += 1
+-        print header[5 + order[0]],posteriors[order[0]],CredSet
++        print(header[5 + order[0]],posteriors[order[0]],CredSet)
+ #print phenos
+-#print priors
+\ No newline at end of file
++#print priors
+--- a/bin/testing.py
++++ b/bin/testing.py
+@@ -5,215 +5,222 @@
+ 
+ devnull = open(os.devnull, 'w')
+ 
+-binpath="./bin/"
+-examplepath="./examples/"
+-trinculo = binpath + "/trinculo"
++examplepath="/usr/share/doc/trinculo/examples"
++trinculo="/usr/bin/trinculo"
+ 
+ tmpdir=tempfile.mkdtemp()
+ 
+-print "Testing trinculo (v0.95)"
+-print "Test files are written to: " + tmpdir
+-print "1. Testing frequentist association (plink)...",
++print("Testing trinculo (v0.95)")
++print("Test files are written to: " + tmpdir)
++print("1. Testing frequentist association (plink)...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--out", tmpdir + "/1"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True 
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/1" + ".log") and os.path.isfile(tmpdir + "/1" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/1.assoc.multinom').read()).digest()
+-    if test3 != '\x1dg(d\xde\xccM\xcdHM\x11\xdd\xee\xfa\x02\xc6':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/1.assoc.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/1.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "1d672864decc4dcd484d11ddeefa02c6"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/1.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+ 
+-print "2. Testing frequentist association (dosage)...",
++print("2. Testing frequentist association (dosage)...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--dosage", examplepath + "/genotypes.dose","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--out", tmpdir + "/2"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True 
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/2" + ".log") and os.path.isfile(tmpdir + "/2" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+-if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/2.assoc.multinom').read()).digest()
+-    if test3 != '=6\xd0\xb3\xd8\x15SW\x8f\xf9\x86\x13\x99\x90S\xba':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/2.assoc.multinom)'
++if not stoptest: 
++    test3 = hashlib.md5(open(tmpdir + '/2.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "3d36d0b3d81553578ff98613999053ba"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/2.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+   
+-print "3. Testing frequentist association (covariates)...",
++print("3. Testing frequentist association (covariates)...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--out", tmpdir + "/3"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/3" + ".log") and os.path.isfile(tmpdir + "/3" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/3.assoc.multinom').read()).digest()
+-    if test3 != '\x16\x03\xb7\xaaD~M\x04\xba\xff\xc5\xef\xfd{r7':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/3.assoc.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/3.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "1603b7aa447e4d04baffc5effd7b7237"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/3.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+ 
+-print "4. Testing frequentist association (conditioning)...",
++print("4. Testing frequentist association (conditioning)...", end=' ')
+ 
+ condfile=tempfile.mkstemp()
+-file(condfile[1],"w").write("SNP1")
++open(condfile[1],"w").write("SNP1")
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--condition",condfile[1],"--out", tmpdir + "/4"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/4" + ".log") and os.path.isfile(tmpdir + "/4" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/4.assoc.multinom').read()).digest()
+-    if test3 != ":\x03'\x9be=\x08\xbas\xea\xc7\xf2_N\xe3\x02":
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/4.assoc.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/4.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "3a03279b653d08ba73eac7f25f4ee302"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/4.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+ 
+-print "5. Testing Bayesian association...",
++print("5. Testing Bayesian association...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--normalize","--defaultprior","--out", tmpdir + "/5"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/5" + ".log") and os.path.isfile(tmpdir + "/5" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/5.assoc.multinom').read()).digest()
+-    if test3 != 'A~\x85\x00Zy^OsG_\xa9\xa7\xc5\r\xe3':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/5.assoc.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/5.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "417e85005a795e4f73475fa9a7c50de3"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/5.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+ 
+-print "6. Testing Bayesian association (prior file)...",
++print("6. Testing Bayesian association (prior file)...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--normalize","--priors",examplepath + "/priors.txt","--out", tmpdir + "/6"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/6" + ".log") and os.path.isfile(tmpdir + "/6" + ".assoc.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/6.assoc.multinom').read()).digest()
+-    if test3 != 'A~\x85\x00Zy^OsG_\xa9\xa7\xc5\r\xe3':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/6.assoc.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/6.assoc.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "417e85005a795e4f73475fa9a7c50de3"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/6.assoc.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+ 
+ 
+-print "7. Testing Bayesian model selection...",
++print("7. Testing Bayesian model selection...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--normalize","--defaultprior","--select","--out", tmpdir + "/7"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/7" + ".log") and os.path.isfile(tmpdir + "/7" + ".assoc.multinom") and os.path.isfile(tmpdir + "/7" + ".select.multinom")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/7.select.multinom').read()).digest()
+-    if test3 != "9\xb9\xfa\xdf\x02'\xdcx\x82U\xce\xcf\xecx\x06!":
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/7.select.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/7.select.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "39b9fadf0227dc788255cecfec780621"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/7.select.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+-print "8. Testing Bayesian model selection (empirical prior)...",
++print("8. Testing Bayesian model selection (empirical prior)...", end=' ')
+ 
+ test1 = subprocess.call([trinculo,"multinom","--bfile", examplepath + "/genotypes","--pheno", examplepath + "/phenos.txt","--phenoname","Pheno","--basepheno","Control","--covar", examplepath + "/pcs.txt","--normalize","--empiricalprior","--select","--out", tmpdir + "/8"],stdout=devnull, stderr=devnull)
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/8" + ".log") and os.path.isfile(tmpdir + "/8" + ".assoc.multinom") and os.path.isfile(tmpdir + "/8" + ".select.multinom") and os.path.isfile(tmpdir + "/8" + ".prior")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/8.select.multinom').read()).digest()
+-    if test3 != '\x89_3\xf2\xef\x96\x1e\xac\x8dy\xc8\xbf\x14\x1f\xfa%':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/8.select.multinom)'
++    test3 = hashlib.md5(open(tmpdir + '/8.select.multinom').read().encode('utf-8')).hexdigest()
++    res3 = "895f33f2ef961eac8d79c8bf141ffa25"
++    if test3 != res3:
++        print("FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/8.select.multinom)')
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")
+ 
+-print "9. Testing ordinal regression...",
++print("9. Testing ordinal regression...", end=' ')
+ 
+ 
+ 
+@@ -221,20 +228,14 @@
+ 
+ stoptest=False
+ if test1 != 0:
+-    print "FAILED (trinculo returned non-zero code " + str(test1) + ")"
++    print("FAILED (trinculo returned non-zero code " + str(test1) + ")")
+     stoptest=True
+ 
+ if not stoptest:
+     test2 = os.path.isfile(tmpdir + "/9" + ".log") and os.path.isfile(tmpdir + "/9" + ".assoc.ordinal")
+     if not test2:
+-        print "FAILED (trinuculo failed to produce expected files)"
+-        stoptest=True
+-
+-if not stoptest:
+-    test3 = hashlib.md5(file(tmpdir + '/9.assoc.ordinal').read()).digest()
+-    if test3 != '\xbd\xab\xad\x10\xd3\xea\xd8r\x9f*~V\xf8\xb5\x9b\x9c':
+-        print "FAILED (trinculo produced file with incorrect MD5 sum: " + tmpdir + '/9.assoc.ordinal)'
++        print("FAILED (trinuculo failed to produce expected files)")
+         stoptest=True
+ 
+ if not stoptest:
+-    print "PASSED"
++    print("PASSED")


=====================================
debian/patches/gcc11.patch
=====================================
@@ -0,0 +1,36 @@
+Description: Remove fishy SSTR(x) code, properly convert int to string (as needed)
+Author: Nilesh Patra <nilesh at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997266
+Last-Update: 2021-10-31
+--- a/src/trinculo.cpp
++++ b/src/trinculo.cpp
+@@ -41,12 +41,16 @@
+ #include <time.h>
+ #include <pthread.h>
+ 
+-// little function for converting things to strings
+-#define SSTR( x ) dynamic_cast< std::ostringstream & >( \
+-        ( std::ostringstream() << std::dec << x ) ).str()
+-
+ using namespace std;
+ 
++// little function for converting things to strings
++std::string int2str(int to_be_converted){
++	std::ostringstream ret_ostream;
++	ret_ostream << std::dec << to_be_converted;
++	std::string converted(ret_ostream.str());
++	return(converted);
++}
++
+ //little function to get the current date and time
+ const std::string currentDateTime() {
+     time_t     now = time(0);
+@@ -409,7 +413,7 @@
+ 	 fullnames.push_back(keepName + "_geno");
+ 	 //cout << "C" << endl;
+ 	 for (j = 0; j < (Npred - 1); j++) {
+-		 fullnames.push_back(keepName + "_cov" + SSTR(j+1));
++		 fullnames.push_back(keepName + "_cov" + int2str(j+1));
+ 	 }  
+    }
+ 


=====================================
debian/patches/series
=====================================
@@ -1 +1,3 @@
 spelling.patch
+gcc11.patch
+fix-interpreter.patch


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


=====================================
debian/tests/run-upstream-test
=====================================
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+pkg=trinculo
+CUR_DIR=`pwd`
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a ${PWD}/bin/testing.py "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+for py in $(py3versions -s 2> /dev/null)
+do echo "Testing with $py in $(pwd):"
+    $py testing.py > test.out
+    cat test.out
+    if [ "$(cat test.out | grep 'FAILED' | wc -l)" -eq "0" ]; then
+	echo "PASSED"
+    else
+	exit 1
+    fi
+    rm -f test.out
+done



View it on GitLab: https://salsa.debian.org/med-team/trinculo/-/compare/e62e13e240ea01e2b28ce45cb3c5c1fb2aab0a5c...ba1c39d1e1bd5227a3109da32d40c60f4887855e

-- 
View it on GitLab: https://salsa.debian.org/med-team/trinculo/-/compare/e62e13e240ea01e2b28ce45cb3c5c1fb2aab0a5c...ba1c39d1e1bd5227a3109da32d40c60f4887855e
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/20211031/6257aacb/attachment-0001.htm>


More information about the debian-med-commit mailing list