[med-svn] [Git][med-team/libsonlib][master] Refresh and fix all patches
Shayan Doust
gitlab at salsa.debian.org
Tue Jun 23 13:54:39 BST 2020
Shayan Doust pushed to branch master at Debian Med / libsonlib
Commits:
1805ad4a by Shayan Doust at 2020-06-23T13:54:09+01:00
Refresh and fix all patches
Also, re-run 2to3
- - - - -
4 changed files:
- debian/patches/2to3.patch
- debian/patches/fix_test.patch
- debian/patches/rpath.patch
- debian/patches/use_debian_packaged_quicktree.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -2,50 +2,195 @@ Author: Andreas Tille <tille at debian.org>
Last-Update: Tue, 16 Jun 2020 08:23:45 +0200
Description: Port to Python3
---- a/C/Makefile
-+++ b/C/Makefile
-@@ -65,4 +65,4 @@ ${libPath}/sonLib.a : ${libSources} ${cp
- mv sonLib.a ${libPath}/
-
- test:
-- python allTests.py --testLength=SHORT --logLevel CRITICAL
-+ python3 allTests.py --testLength=SHORT --logLevel CRITICAL
---- a/Makefile
-+++ b/Makefile
-@@ -21,7 +21,7 @@ externalToolsP.clean :
- cd externalTools && make clean
-
- test : all
-- PYTHONPATH=.. PATH=../../bin:$$PATH python allTests.py --testLength=SHORT --logLevel=CRITICAL
-+ PYTHONPATH=.. PATH=../../bin:$$PATH python3 allTests.py --testLength=SHORT --logLevel=CRITICAL
+--- libsonlib.orig/treeTest.py
++++ libsonlib/treeTest.py
+@@ -7,16 +7,16 @@
+ import unittest
+ import random
+
+-from tree import remodelTreeRemovingRoot
+-from tree import binaryTree_depthFirstNumbers
+-from tree import mapTraversalIDsBetweenTrees
+-from tree import BinaryTree
+-from bioio import printBinaryTree
+-from bioio import newickTreeParser
+-from misc import close
+-from tree import moveRoot
+-from tree import calculateDupsAndLossesByReconcilingTrees
+-from tree import calculateProbableRootOfGeneTree
++from .tree import remodelTreeRemovingRoot
++from .tree import binaryTree_depthFirstNumbers
++from .tree import mapTraversalIDsBetweenTrees
++from .tree import BinaryTree
++from .bioio import printBinaryTree
++from .bioio import newickTreeParser
++from .misc import close
++from .tree import moveRoot
++from .tree import calculateDupsAndLossesByReconcilingTrees
++from .tree import calculateProbableRootOfGeneTree
+ from sonLib.bioio import TestStatus
+
+ class TestCase(unittest.TestCase):
+@@ -29,29 +29,29 @@
+ unittest.TestCase.tearDown(self)
+
+ def testRemodelTreeRemovingRoot(self):
+- for test in xrange(0, self.testNo):
++ for test in range(0, self.testNo):
+ binaryTree = getRandomTree()
+ binaryTree_depthFirstNumbers(binaryTree)
+ node = getRandomLeafNode(binaryTree)
+ remodTree = remodelTreeRemovingRoot(binaryTree, node.traversalID.mid)
+- print "test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True)
++ print("test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True))
+ binaryTree_depthFirstNumbers(remodTree)
+ distances = mapTraversalIDsBetweenTrees(binaryTree, remodTree)
+ d = getDistancesBetweenLeaves(binaryTree)
+ d2 = getDistancesBetweenLeaves(remodTree)
+- print d
+- print d2
++ print(d)
++ print(d2)
+ for key in d2:
+ assert close(d2[key], d[key], 0.0001)
+
+ def testMoveRoot(self):
+- for test in xrange(0, self.testNo):
++ for test in range(0, self.testNo):
+ binaryTree = getRandomTree()
+ binaryTree_depthFirstNumbers(binaryTree)
+ node = getRandomNode(binaryTree)
+- print "before", printBinaryTree(binaryTree, True), printBinaryTree(node, True)
++ print("before", printBinaryTree(binaryTree, True), printBinaryTree(node, True))
+ remodTree = moveRoot(binaryTree, node.traversalID.mid)
+- print "test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True)
++ print("test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True))
+ binaryTree_depthFirstNumbers(remodTree)
+ #distances = mapTraversalIDsBetweenTrees(binaryTree, remodTree)
+ #d = getDistancesBetweenLeaves(binaryTree)
+@@ -62,7 +62,7 @@
+ # assert close(d2[key], d[key], 0.0001)
+
+ def testCalculateDupsAndLossesByReconcilingTrees(self):
+- for test in xrange(0, self.testNo):
++ for test in range(0, self.testNo):
+ speciesTree = getRandomTree()
+ binaryTree_depthFirstNumbers(speciesTree)
+ geneTree = getRandomTree()
+@@ -102,13 +102,13 @@
+ geneStrings = [ geneString1, geneString2, geneString3, geneString4, \
+ geneString5, geneString6, geneString7, geneString8,
+ geneString9, geneString10, geneString11 ]
+- print ""
++ print("")
+ for geneString, dupCount, lossCount in geneStrings:
+ geneTree = newickTreeParser(geneString)
+ binaryTree_depthFirstNumbers(geneTree)
+- print printBinaryTree(geneTree, True), printBinaryTree(speciesTree, True)
++ print(printBinaryTree(geneTree, True), printBinaryTree(speciesTree, True))
+ dupCount2, lossCount2 = calculateDupsAndLossesByReconcilingTrees(speciesTree, geneTree, processID=lambda x : x)
+- print geneString, "dups", dupCount, dupCount2, "losses", lossCount, lossCount2
++ print(geneString, "dups", dupCount, dupCount2, "losses", lossCount, lossCount2)
+ assert dupCount == dupCount2
+ assert lossCount == lossCount2
+
+@@ -144,11 +144,11 @@
+ rootedGeneTree = newickTreeParser(geneString)
+ binaryTree_depthFirstNumbers(geneTree)
+ rootedGeneTree2, dupCount, lossCount = calculateProbableRootOfGeneTree(speciesTree, geneTree)
+- print "rootedGeneTree", rootedGeneString, dupCount, lossCount, printBinaryTree(rootedGeneTree2, False)
++ print("rootedGeneTree", rootedGeneString, dupCount, lossCount, printBinaryTree(rootedGeneTree2, False))
+ #assert printBinaryTree(rootedGeneTree, False) == printBinaryTree(rootedGeneTree2, False)
+
+ def testCalculateProbableRootOfGeneTree(self):
+- for test in xrange(0, self.testNo):
++ for test in range(0, self.testNo):
+ speciesTree = getRandomTree()
+ binaryTree_depthFirstNumbers(speciesTree)
+ geneTree = getRandomTree()
+--- libsonlib.orig/allTests.py
++++ libsonlib/allTests.py
+@@ -5,16 +5,16 @@
+ #Released under the MIT license, see LICENSE.txt
+ import unittest
+
+-import bioioTest
+-import cigarsTest
+-import treeTest
+-import kvdbTest
++from . import bioioTest
++from . import cigarsTest
++from . import treeTest
++from . import kvdbTest
+ import socket
+ try:
+ import networkx as NX
+ networkx_installed = True
+- import nxtreeTest
+- import nxnewickTest
++ from . import nxtreeTest
++ from . import nxnewickTest
+ except ImportError:
+ networkx_installed = False
+
+--- libsonlib.orig/sonLib_daemonize.py
++++ libsonlib/sonLib_daemonize.py
+@@ -66,7 +66,7 @@
+
+ if __name__ == '__main__':
+ if len(sys.argv) != 2:
+- raise Exception, "%s: Wrong number of arguments" % sys.argv[0]
++ raise Exception("%s: Wrong number of arguments" % sys.argv[0])
+
+ pid = os.fork()
+ if pid > 0:
+--- libsonlib.orig/nxnewick.py
++++ libsonlib/nxnewick.py
+@@ -14,7 +14,7 @@
+ import random
+ from string import whitespace as ws
+ from sonLib.misc import close
+-import bioio
++from . import bioio
+ import networkx as NX
+ from optparse import OptionParser
+ from sonLib.nxtree import NXTree
+@@ -187,15 +187,15 @@
+ parser.parseFile(args[0])
+ NX.drawing.nx_agraph.write_dot(parser.nxTree.nxDg, args[1])
+ parser.writeFile(args[2])
+- print "PRE"
++ print("PRE")
+ for i in parser.nxTree.preOrderTraversal():
+- print ("%d %s" % (i, parser.nxTree.getName(i)))
+- print "POST"
++ print(("%d %s" % (i, parser.nxTree.getName(i))))
++ print("POST")
+ for i in parser.nxTree.postOrderTraversal():
+- print ("%d %s" % (i, parser.nxTree.getName(i)))
+- print "BFS"
++ print(("%d %s" % (i, parser.nxTree.getName(i))))
++ print("BFS")
+ for i in parser.nxTree.breadthFirstTraversal():
+- print ("%d %s" % (i, parser.nxTree.getName(i)))
++ print(("%d %s" % (i, parser.nxTree.getName(i))))
+ return 0
- ${binPath}/sonLib_daemonize.py : sonLib_daemonize.py
- cp sonLib_daemonize.py ${binPath}/sonLib_daemonize.py
---- a/setup.py
-+++ b/setup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- from setuptools import setup, find_packages
- #import subprocess
---- a/src/sonLib/__init__.py
-+++ b/src/sonLib/__init__.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
---- a/src/sonLib/bioio.py
-+++ b/src/sonLib/bioio.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
-@@ -421,14 +421,14 @@ def nameValue(name, value, valueType=str
+ if __name__ == '__main__':
+--- libsonlib.orig/bioio.py
++++ libsonlib/bioio.py
+@@ -16,8 +16,8 @@
+ import shutil
+ from argparse import ArgumentParser
+ from optparse import OptionParser, OptionContainer, OptionGroup
+-from tree import BinaryTree
+-from misc import close
++from .tree import BinaryTree
++from .misc import close
+ import subprocess
+ import array
+ import string
+@@ -421,14 +421,14 @@
def getRandomAlphaNumericString(length=10):
"""Returns a random alpha numeric string of the given length.
"""
@@ -62,7 +207,7 @@ Description: Port to Python3
return dirName
def getTempFile(suffix="", rootDir=None):
-@@ -441,7 +441,7 @@ def getTempFile(suffix="", rootDir=None)
+@@ -441,7 +441,7 @@
else:
tmpFile = os.path.join(rootDir, "tmp_" + getRandomAlphaNumericString() + suffix)
open(tmpFile, 'w').close()
@@ -71,7 +216,7 @@ Description: Port to Python3
return tmpFile
def getTempDirectory(rootDir=None):
-@@ -468,7 +468,7 @@ def getTempDirectory(rootDir=None):
+@@ -468,7 +468,7 @@
break
os.mkdir(tmpDir)
@@ -80,7 +225,7 @@ Description: Port to Python3
return tmpDir
class TempFileTree:
-@@ -744,7 +744,7 @@ def fastaWrite(fileHandleOrFile, name, s
+@@ -744,7 +744,7 @@
fileHandle = _getFileHandle(fileHandleOrFile, mode)
valid_chars = {x for x in string.ascii_letters + "-"}
try:
@@ -89,7 +234,7 @@ Description: Port to Python3
except AssertionError:
raise RuntimeError("Sequence is not unicode or string")
try:
-@@ -754,7 +754,7 @@ def fastaWrite(fileHandleOrFile, name, s
+@@ -754,7 +754,7 @@
raise RuntimeError("Invalid FASTA character(s) see in fasta sequence: {}".format(bad_chars))
fileHandle.write(">%s\n" % name)
chunkSize = 100
@@ -98,7 +243,7 @@ Description: Port to Python3
fileHandle.write("%s\n" % seq[i:i+chunkSize])
if isinstance(fileHandleOrFile, "".__class__):
fileHandle.close()
-@@ -849,23 +849,23 @@ def fastaAlignmentRead(fasta, mapFn=(lam
+@@ -849,23 +849,23 @@
else:
l = l[:]
seqNo = len(l)
@@ -127,7 +272,7 @@ Description: Port to Python3
assert column[j] != '>' and column[j] != ''
column[j] = mapFn(column[j])
yield column[:]
-@@ -878,8 +878,8 @@ def fastaAlignmentWrite(columnAlignment,
+@@ -878,8 +878,8 @@
Writes out column alignment to given file multi-fasta format
"""
fastaFile = open(fastaFile, 'w')
@@ -138,7 +283,7 @@ Description: Port to Python3
fastaFile.write(">%s\n" % names[seq])
for column in columnAlignment:
fastaFile.write(column[seq])
-@@ -890,10 +890,10 @@ def getRandomSequence(length=500):
+@@ -890,10 +890,10 @@
"""Generates a random name and sequence.
"""
fastaHeader = ""
@@ -151,16 +296,7 @@ Description: Port to Python3
def _expLength(i=0, prob=0.95):
if random.random() >= prob:
-@@ -932,7 +932,7 @@ def reverseComplementChar(x):
- _reverseComplementDict else x
-
- def reverseComplement(seq):
-- return "".join(map(lambda x : reverseComplementChar(x), seq[::-1]))
-+ return "".join([reverseComplementChar(x) for x in seq[::-1]])
-
- #########################################################
- #########################################################
-@@ -1044,9 +1044,9 @@ def pWMRead(fileHandle, alphabetSize=4):
+@@ -1043,9 +1043,9 @@
for line in lines[1:]:
l2 = [ float(i) for i in line.split() ]
assert len(l) == len(l2)
@@ -172,7 +308,7 @@ Description: Port to Python3
j = sum(l[i]) + 0.0
l[i] = [ k/j for k in l[i] ]
return l
-@@ -1054,8 +1054,8 @@ def pWMRead(fileHandle, alphabetSize=4):
+@@ -1053,8 +1053,8 @@
def pWMWrite(fileHandle, pWM, alphabetSize=4):
"""Writes file in standard PWM format, is reverse of pWMParser
"""
@@ -183,7 +319,7 @@ Description: Port to Python3
#########################################################
#########################################################
-@@ -1230,8 +1230,8 @@ def cigarWrite(fileHandle, pairwiseAlign
+@@ -1229,8 +1229,8 @@
def _getRandomSegment():
contig = random.choice([ "one", "two", "three", "four" ])
@@ -194,7 +330,7 @@ Description: Port to Python3
strand = random.choice([ True, False ])
if not strand:
start, end = end, start
-@@ -1245,7 +1245,7 @@ def getRandomOperationList(xLength, yLen
+@@ -1244,7 +1244,7 @@
if operationMaxLength == 1:
length = 1
else:
@@ -203,7 +339,7 @@ Description: Port to Python3
if opType != PairwiseAlignment.PAIRWISE_INDEL_Y and xLength - length < 0:
continue
if opType != PairwiseAlignment.PAIRWISE_INDEL_X and yLength - length < 0:
-@@ -1263,7 +1263,7 @@ def getRandomPairwiseAlignment():
+@@ -1262,7 +1262,7 @@
"""
i, j, k, l = _getRandomSegment()
m, n, o, p = _getRandomSegment()
@@ -212,79 +348,61 @@ Description: Port to Python3
return PairwiseAlignment(i, j, k, l, m, n, o, p, score, getRandomOperationList(abs(k - j), abs(o - n)))
#########################################################
---- a/src/sonLib/misc.py
-+++ b/src/sonLib/misc.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
---- a/src/sonLib/nxnewick.py
-+++ b/src/sonLib/nxnewick.py
-@@ -1,9 +1,8 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Glenn Hickey
- #
- #Released under the MIT license, see LICENSE.txt
--#!/usr/bin/env python
-
- """read and write newick trees to and from networkx graphs (as wrapped by nxtree).
- """
-@@ -187,15 +186,15 @@ def main():
- parser.parseFile(args[0])
- NX.drawing.nx_agraph.write_dot(parser.nxTree.nxDg, args[1])
- parser.writeFile(args[2])
-- print "PRE"
-+ print("PRE")
- for i in parser.nxTree.preOrderTraversal():
-- print ("%d %s" % (i, parser.nxTree.getName(i)))
-- print "POST"
-+ print(("%d %s" % (i, parser.nxTree.getName(i))))
-+ print("POST")
- for i in parser.nxTree.postOrderTraversal():
-- print ("%d %s" % (i, parser.nxTree.getName(i)))
-- print "BFS"
-+ print(("%d %s" % (i, parser.nxTree.getName(i))))
-+ print("BFS")
- for i in parser.nxTree.breadthFirstTraversal():
-- print ("%d %s" % (i, parser.nxTree.getName(i)))
-+ print(("%d %s" % (i, parser.nxTree.getName(i))))
- return 0
-
- if __name__ == '__main__':
---- a/src/sonLib/nxtree.py
-+++ b/src/sonLib/nxtree.py
-@@ -1,9 +1,8 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Glenn Hickey
- #
- #Released under the MIT license, see LICENSE.txt
--#!/usr/bin/env python
-
- """A more general (ie arbitrary degree) tree to replace the BinaryTree
- in sonLib.tree.py. Implemented as a lightweight wrapper over a
---- a/src/sonLib/test/allTests.py
-+++ b/src/sonLib/test/allTests.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
---- a/src/sonLib/test/bioioTest.py
-+++ b/src/sonLib/test/bioioTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
-@@ -61,12 +61,12 @@ class TestCase(unittest.TestCase):
+--- libsonlib.orig/bioioTest.py
++++ libsonlib/bioioTest.py
+@@ -11,32 +11,32 @@
+ import random
+ import math
+
+-from bioio import getTempFile
+-from bioio import getTempDirectory
+-from bioio import TempFileTree
+-from bioio import getRandomAlphaNumericString
++from .bioio import getTempFile
++from .bioio import getTempDirectory
++from .bioio import TempFileTree
++from .bioio import getRandomAlphaNumericString
+
+-from bioio import fastaRead
+-from bioio import fastaWrite
+-from bioio import fastqRead
+-from bioio import fastqWrite
+-from bioio import getRandomSequence
++from .bioio import fastaRead
++from .bioio import fastaWrite
++from .bioio import fastqRead
++from .bioio import fastqWrite
++from .bioio import getRandomSequence
+
+-from bioio import pWMRead
+-from bioio import pWMWrite
++from .bioio import pWMRead
++from .bioio import pWMWrite
+
+-from bioio import newickTreeParser
+-from bioio import printBinaryTree
++from .bioio import newickTreeParser
++from .bioio import printBinaryTree
+
+-from bioio import cigarRead
+-from bioio import cigarWrite
+-from bioio import PairwiseAlignment
+-from bioio import getRandomPairwiseAlignment
++from .bioio import cigarRead
++from .bioio import cigarWrite
++from .bioio import PairwiseAlignment
++from .bioio import getRandomPairwiseAlignment
+
+ from sonLib.bioio import TestStatus
+
+-from bioio import system
+-from bioio import logger
++from .bioio import system
++from .bioio import logger
+
+ class TestCase(unittest.TestCase):
+
+@@ -61,12 +61,12 @@
#########################################################
def testTempFileTree(self):
@@ -301,7 +419,7 @@ Description: Port to Python3
tempFileTreeRootDir = os.path.join(self.tempDir, getRandomAlphaNumericString())
tempFileTree = TempFileTree(tempFileTreeRootDir, fileNo, levels)
-@@ -74,7 +74,7 @@ class TestCase(unittest.TestCase):
+@@ -74,7 +74,7 @@
tempFiles = []
tempDirs = []
#Check we can mac number of temp files.
@@ -310,7 +428,7 @@ Description: Port to Python3
if random.random() > 0.5:
tempFile = tempFileTree.getTempFile()
assert os.path.isfile(tempFile)
-@@ -132,9 +132,9 @@ class TestCase(unittest.TestCase):
+@@ -132,9 +132,9 @@
def testFastaReadWrite(self):
tempFile = getTempFile()
self.tempFiles.append(tempFile)
@@ -323,7 +441,7 @@ Description: Port to Python3
fileHandle = open(tempFile, 'w')
for name, seq in l:
fastaWrite(fileHandle, name, seq)
-@@ -150,9 +150,9 @@ class TestCase(unittest.TestCase):
+@@ -150,9 +150,9 @@
def testFastqReadWrite(self):
tempFile = getTempFile()
self.tempFiles.append(tempFile)
@@ -336,7 +454,7 @@ Description: Port to Python3
fH = open(tempFile, 'w')
for name, seq, quals in fastqs:
fastqWrite(fH, name, seq, quals)
-@@ -170,9 +170,9 @@ class TestCase(unittest.TestCase):
+@@ -170,9 +170,9 @@
self.tempFiles.append(tempFile)
tempFile2 = getTempFile()
self.tempFiles.append(tempFile2)
@@ -349,7 +467,7 @@ Description: Port to Python3
fileHandle = open(tempFile, 'w')
for name, seq in l:
fastaWrite(fileHandle, name, seq)
-@@ -180,7 +180,7 @@ class TestCase(unittest.TestCase):
+@@ -180,7 +180,7 @@
command = "sonLib_fastaCTest %s %s" % (tempFile, tempFile2)
@@ -358,7 +476,7 @@ Description: Port to Python3
system(command)
-@@ -205,12 +205,12 @@ class TestCase(unittest.TestCase):
+@@ -205,12 +205,12 @@
d = '((human,baboon),chimp);'
e = newickTreeParser(d)
f = printBinaryTree(e, False)
@@ -373,7 +491,7 @@ Description: Port to Python3
tree = getRandomTreeString()
logger.debug("tree to try\t", tree)
tree2 = newickTreeParser(tree, reportUnaryNodes=True)
-@@ -229,7 +229,7 @@ class TestCase(unittest.TestCase):
+@@ -229,7 +229,7 @@
def testPWMParser(self):
tempFile = getTempFile()
self.tempFiles.append(tempFile)
@@ -382,7 +500,7 @@ Description: Port to Python3
pWM = getRandomPWM()
fileHandle = open(tempFile, 'w')
-@@ -240,7 +240,7 @@ class TestCase(unittest.TestCase):
+@@ -240,7 +240,7 @@
pWM2 = pWMRead(fileHandle)
fileHandle.close()
@@ -391,7 +509,7 @@ Description: Port to Python3
pWM[i] == pWM2[i]
#########################################################
-@@ -254,9 +254,9 @@ class TestCase(unittest.TestCase):
+@@ -254,9 +254,9 @@
def testCigarReadWrite(self):
tempFile = getTempFile()
self.tempFiles.append(tempFile)
@@ -404,7 +522,7 @@ Description: Port to Python3
fileHandle = open(tempFile, 'w')
for cigar in l:
cigarWrite(fileHandle, cigar)
-@@ -292,10 +292,10 @@ def getRandomPWM(length=-1):
+@@ -292,10 +292,10 @@
if length == -1:
length = 1 + int(random.random()*10)
def fn():
@@ -417,15 +535,27 @@ Description: Port to Python3
if __name__ == '__main__':
unittest.main()
---- a/src/sonLib/test/cigarsTest.py
-+++ b/src/sonLib/test/cigarsTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
-@@ -36,9 +36,9 @@ class TestCase(unittest.TestCase):
+--- libsonlib.orig/cigarsTest.py
++++ libsonlib/cigarsTest.py
+@@ -10,12 +10,12 @@
+ import sys
+ import random
+
+-from bioio import getTempFile
++from .bioio import getTempFile
+
+-from bioio import cigarRead
+-from bioio import cigarWrite
+-from bioio import getRandomPairwiseAlignment
+-from bioio import system
++from .bioio import cigarRead
++from .bioio import cigarWrite
++from .bioio import getRandomPairwiseAlignment
++from .bioio import system
+ from sonLib.bioio import TestStatus
+ from sonLib.bioio import logger
+
+@@ -36,9 +36,9 @@
"""
tempFile = getTempFile()
self.tempFiles.append(tempFile)
@@ -438,149 +568,9 @@ Description: Port to Python3
fileHandle = open(tempFile, 'w')
keepProbs = random.random() > 0.5
---- a/src/sonLib/test/kvdbTest.py
-+++ b/src/sonLib/test/kvdbTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
---- a/src/sonLib/test/nxnewickTest.py
-+++ b/src/sonLib/test/nxnewickTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 011 by Glenn Hickey
- #
---- a/src/sonLib/test/nxtreeTest.py
-+++ b/src/sonLib/test/nxtreeTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 011 by Glenn Hickey
- #
---- a/src/sonLib/test/sonLib_daemonize.py
-+++ b/src/sonLib/test/sonLib_daemonize.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- # Glenn Hickey 2011
- #
-@@ -66,7 +66,7 @@ else:
-
- if __name__ == '__main__':
- if len(sys.argv) != 2:
-- raise Exception, "%s: Wrong number of arguments" % sys.argv[0]
-+ raise Exception("%s: Wrong number of arguments" % sys.argv[0])
-
- pid = os.fork()
- if pid > 0:
---- a/src/sonLib/test/treeTest.py
-+++ b/src/sonLib/test/treeTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
-@@ -29,29 +29,29 @@ class TestCase(unittest.TestCase):
- unittest.TestCase.tearDown(self)
-
- def testRemodelTreeRemovingRoot(self):
-- for test in xrange(0, self.testNo):
-+ for test in range(0, self.testNo):
- binaryTree = getRandomTree()
- binaryTree_depthFirstNumbers(binaryTree)
- node = getRandomLeafNode(binaryTree)
- remodTree = remodelTreeRemovingRoot(binaryTree, node.traversalID.mid)
-- print "test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True)
-+ print("test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True))
- binaryTree_depthFirstNumbers(remodTree)
- distances = mapTraversalIDsBetweenTrees(binaryTree, remodTree)
- d = getDistancesBetweenLeaves(binaryTree)
- d2 = getDistancesBetweenLeaves(remodTree)
-- print d
-- print d2
-+ print(d)
-+ print(d2)
- for key in d2:
- assert close(d2[key], d[key], 0.0001)
-
- def testMoveRoot(self):
-- for test in xrange(0, self.testNo):
-+ for test in range(0, self.testNo):
- binaryTree = getRandomTree()
- binaryTree_depthFirstNumbers(binaryTree)
- node = getRandomNode(binaryTree)
-- print "before", printBinaryTree(binaryTree, True), printBinaryTree(node, True)
-+ print("before", printBinaryTree(binaryTree, True), printBinaryTree(node, True))
- remodTree = moveRoot(binaryTree, node.traversalID.mid)
-- print "test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True)
-+ print("test", test, printBinaryTree(binaryTree, True), printBinaryTree(node, True), printBinaryTree(remodTree, True))
- binaryTree_depthFirstNumbers(remodTree)
- #distances = mapTraversalIDsBetweenTrees(binaryTree, remodTree)
- #d = getDistancesBetweenLeaves(binaryTree)
-@@ -62,7 +62,7 @@ class TestCase(unittest.TestCase):
- # assert close(d2[key], d[key], 0.0001)
-
- def testCalculateDupsAndLossesByReconcilingTrees(self):
-- for test in xrange(0, self.testNo):
-+ for test in range(0, self.testNo):
- speciesTree = getRandomTree()
- binaryTree_depthFirstNumbers(speciesTree)
- geneTree = getRandomTree()
-@@ -102,13 +102,13 @@ class TestCase(unittest.TestCase):
- geneStrings = [ geneString1, geneString2, geneString3, geneString4, \
- geneString5, geneString6, geneString7, geneString8,
- geneString9, geneString10, geneString11 ]
-- print ""
-+ print("")
- for geneString, dupCount, lossCount in geneStrings:
- geneTree = newickTreeParser(geneString)
- binaryTree_depthFirstNumbers(geneTree)
-- print printBinaryTree(geneTree, True), printBinaryTree(speciesTree, True)
-+ print(printBinaryTree(geneTree, True), printBinaryTree(speciesTree, True))
- dupCount2, lossCount2 = calculateDupsAndLossesByReconcilingTrees(speciesTree, geneTree, processID=lambda x : x)
-- print geneString, "dups", dupCount, dupCount2, "losses", lossCount, lossCount2
-+ print(geneString, "dups", dupCount, dupCount2, "losses", lossCount, lossCount2)
- assert dupCount == dupCount2
- assert lossCount == lossCount2
-
-@@ -144,11 +144,11 @@ class TestCase(unittest.TestCase):
- rootedGeneTree = newickTreeParser(geneString)
- binaryTree_depthFirstNumbers(geneTree)
- rootedGeneTree2, dupCount, lossCount = calculateProbableRootOfGeneTree(speciesTree, geneTree)
-- print "rootedGeneTree", rootedGeneString, dupCount, lossCount, printBinaryTree(rootedGeneTree2, False)
-+ print("rootedGeneTree", rootedGeneString, dupCount, lossCount, printBinaryTree(rootedGeneTree2, False))
- #assert printBinaryTree(rootedGeneTree, False) == printBinaryTree(rootedGeneTree2, False)
-
- def testCalculateProbableRootOfGeneTree(self):
-- for test in xrange(0, self.testNo):
-+ for test in range(0, self.testNo):
- speciesTree = getRandomTree()
- binaryTree_depthFirstNumbers(speciesTree)
- geneTree = getRandomTree()
---- a/src/sonLib/test/unitTest.py
-+++ b/src/sonLib/test/unitTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
---- a/src/sonLib/tree.py
-+++ b/src/sonLib/tree.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- #Copyright (C) 2006-2012 by Benedict Paten (benedictpaten at gmail.com)
- #
-@@ -69,7 +69,7 @@ def binaryTree_depthFirstNumbers(binaryT
+--- libsonlib.orig/tree.py
++++ libsonlib/tree.py
+@@ -69,7 +69,7 @@
return mid+1, leafNo+1
traverse(binaryTree)
if labelTree:
@@ -589,7 +579,7 @@ Description: Port to Python3
binaryTree.traversalID = traversalIDs[binaryTree]
return traversalIDs
-@@ -164,18 +164,18 @@ def transformByDistance(wV, subModel, al
+@@ -164,18 +164,18 @@
transform wV by given substitution matrix
"""
nc = [0.0]*alphabetSize
@@ -612,7 +602,7 @@ Description: Port to Python3
def normaliseWV(wV, normFac=1.0):
"""
-@@ -187,7 +187,7 @@ def normaliseWV(wV, normFac=1.0):
+@@ -187,7 +187,7 @@
def sumWVA(wVA, alphabetSize=4):
totals = [0.0]*alphabetSize
for wV in wVA:
@@ -621,7 +611,7 @@ Description: Port to Python3
totals[i] += wV[i]
return totals
-@@ -222,7 +222,7 @@ def felsensteins(binaryTree, subMatrices
+@@ -222,7 +222,7 @@
def calculateCharacterFrequencies(seq, map, alphabetSize):
counts = [0.0]*alphabetSize
for i in seq:
@@ -630,7 +620,7 @@ Description: Port to Python3
return counts
#########################################################
-@@ -261,9 +261,9 @@ def calculateDNADistanceMatrix(seqNo, fa
+@@ -261,9 +261,9 @@
transversions = [0.1]*seqNo*seqNo
counts = [1.0]*seqNo*seqNo
for column in fastaIter:
@@ -642,7 +632,7 @@ Description: Port to Python3
if column[j] in [ 'A', 'C', 'T', 'G' ]:
counts[i*seqNo + j] += 1
if column[i] != column[j]:
-@@ -277,9 +277,9 @@ def calculateDNADistanceMatrix(seqNo, fa
+@@ -277,9 +277,9 @@
transversions[i*seqNo + j] += 1
else:
transitions[i*seqNo + j] += 1
@@ -655,7 +645,7 @@ Description: Port to Python3
k = i * seqNo + j
distanceMatrix[i][j] = -0.75*math.log(1 - (4/3)*((transitions[k]+transversions[k])/counts[k])) #jukes cantor correction
distanceMatrix[j][i] = distanceMatrix[i][j]
-@@ -288,10 +288,10 @@ def calculateDNADistanceMatrix(seqNo, fa
+@@ -288,10 +288,10 @@
return distanceMatrix
def makeDistancePairs(distanceMatrix, iDs, seqNo):
@@ -669,7 +659,7 @@ Description: Port to Python3
distancePairs.append(DistancePair(distanceMatrix[i][j], binaryTrees[i], 1, binaryTrees[j], 1))
distancePairs.append(DistancePair(distanceMatrix[i][j], binaryTrees[j], 1, binaryTrees[i], 1))
return distancePairs
-@@ -327,10 +327,10 @@ def upgmaI(distancePairs, leafNo):
+@@ -327,10 +327,10 @@
holder1[i.leaf2] = i
if i.leaf1 == distancePair.leaf2 and i.leaf2 != distancePair.leaf1:
holder2[i.leaf2] = i
@@ -683,7 +673,7 @@ Description: Port to Python3
j = holder1[i]
k = holder2[i]
newDistance = (j.distance*j.leafNo1 + k.distance*k.leafNo1)/(j.leafNo1 + k.leafNo1)
-@@ -346,7 +346,7 @@ def nj(distanceMatrix, iDs, leafNo):
+@@ -346,7 +346,7 @@
def getMinPair(distancePairs, rValues, leafNo):
j = None
@@ -692,7 +682,7 @@ Description: Port to Python3
for i in distancePairs:
adjustD = i.distance - (rValues[i.leaf1] + rValues[i.leaf2])/(leafNo-2)
#print "the adjusted value ", adjustD, i.distance, rValues[i.leaf1]/(leafNo-2), rValues[i.leaf2]/(leafNo-2)
-@@ -359,11 +359,11 @@ def getMinPair(distancePairs, rValues, l
+@@ -359,11 +359,11 @@
def calculateRValues(distancePairs, leafNo):
j = {}
for i in distancePairs:
@@ -706,7 +696,7 @@ Description: Port to Python3
return j
def njI(distancePairs, leafNo):
-@@ -391,10 +391,10 @@ def njI(distancePairs, leafNo):
+@@ -391,10 +391,10 @@
holder1[i.leaf2] = i
if i.leaf1 == distancePair.leaf2 and i.leaf2 != distancePair.leaf1:
holder2[i.leaf2] = i
@@ -720,7 +710,7 @@ Description: Port to Python3
j = holder1[i]
k = holder2[i]
assert j.leaf2 == k.leaf2
-@@ -416,13 +416,13 @@ def njI(distancePairs, leafNo):
+@@ -416,13 +416,13 @@
def checkMatrix(m, fV, AS=4, reversible=True):
#print m
@@ -736,7 +726,7 @@ Description: Port to Python3
#print "comp2", (fV[i] * m[i][k]), (fV[k] * m[k][i] )
assert close(fV[i] * m[i][k], fV[k] * m[k][i], 0.00001)
-@@ -436,9 +436,9 @@ def checkMatrix(m, fV, AS=4, reversible=
+@@ -436,9 +436,9 @@
assert close(i, j, 0.00001)
def reverseSubMatrix(m, AS=4):
@@ -749,7 +739,7 @@ Description: Port to Python3
k[j][i] = m[i][j]
return k
-@@ -476,7 +476,7 @@ def subMatrix_TamuraNei(d, fA, fC, fG, f
+@@ -476,7 +476,7 @@
AS = 4
freq = ( fA, fC, fG, fT )
alpha = ( alphaPur, alphaPyr, alphaPur, alphaPyr )
@@ -758,7 +748,7 @@ Description: Port to Python3
#see page 203 of Felsenstein's Inferring Phylogenies for explanation of calculations
def watKro(j, k):
if (j % 2) == (k % 2):
-@@ -486,10 +486,10 @@ def subMatrix_TamuraNei(d, fA, fC, fG, f
+@@ -486,10 +486,10 @@
if i == j:
return 1.0
return 0.0
@@ -772,7 +762,7 @@ Description: Port to Python3
l += watKro(j, k) * freq[k]
matrix[i][j] =\
math.exp(-(alpha[i] + beta) * d) * kroenickerDelta(i, j) + \
-@@ -516,9 +516,9 @@ def subMatrix_HKY(d, fA, fC, fG, fT, tra
+@@ -516,9 +516,9 @@
def subMatrix_HalpernBruno(d, freqColumn, subMatrix, AS=4):
#return subMatrix_HKY(d, freqColumn[0], freqColumn[1], freqColumn[2], freqColumn[3], 2.0)
#return subMatrix
@@ -785,7 +775,7 @@ Description: Port to Python3
a = freqColumn[i] * subMatrix[i][j]
b = freqColumn[j] * subMatrix[j][i]
if not close(a, b, 0.0001):
-@@ -580,8 +580,8 @@ def mapTraversalIDsBetweenTrees(oldTree,
+@@ -580,8 +580,8 @@
internalMap[(fn(oldTree), fn(oldTree.left))] = fn(oldTree.right)
internalMap[(fn(oldTree.left), fn(oldTree))] = fn(oldTree.right)
fn3(oldTree)
@@ -796,7 +786,25 @@ Description: Port to Python3
def fn4(newTree):
if newTree.internal:
fn4(newTree.left)
-@@ -703,7 +703,7 @@ def calculateDupsAndLossesByReconcilingT
+@@ -596,7 +596,7 @@
+ """
+ Node is mid order number
+ """
+- import bioio
++ from . import bioio
+ assert root.traversalID.mid != node
+ hash = {}
+ def fn(bT):
+@@ -632,7 +632,7 @@
+ """
+ Removes the old root and places the new root at the mid point along the given branch
+ """
+- import bioio
++ from . import bioio
+ if root.traversalID.mid == branch:
+ return bioio.newickTreeParser(bioio.printBinaryTree(root, True))
+ def fn2(tree, seq):
+@@ -703,7 +703,7 @@
if nodes.issubset(a[speciesTree.right.traversalID.mid]):
return fn2(nodes, speciesTree.right)
return speciesTree.traversalID.mid
@@ -805,7 +813,7 @@ Description: Port to Python3
nodes = b[iD]
b[iD] = fn2(nodes, speciesTree)
dups = []
-@@ -725,7 +725,7 @@ def calculateDupsAndLossesByReconcilingT
+@@ -725,7 +725,7 @@
nodes.append((node, losses+1))
return nodes
for node, losses in fn4(speciesTree):
@@ -814,7 +822,7 @@ Description: Port to Python3
losses = [0]
def fn5(geneTree, ancestor):
if geneTree.internal:
-@@ -745,7 +745,7 @@ def calculateDupsAndLossesByReconcilingT
+@@ -745,7 +745,7 @@
if speciesTree.internal:
fn6(speciesTree.left, speciesTree.traversalID.mid, node)
fn6(speciesTree.right, speciesTree.traversalID.mid, node)
@@ -823,3 +831,22 @@ Description: Port to Python3
assert ancestorHolder[0] is not None
fn5(geneTree, ancestorHolder[0])
return len(dups), losses[0]
+--- libsonlib.orig/C/Makefile
++++ libsonlib/C/Makefile
+@@ -59,4 +59,4 @@
+ mv sonLib.a ${libPath}/
+
+ test:
+- python allTests.py --testLength=SHORT --logLevel CRITICAL
++ python3 allTests.py --testLength=SHORT --logLevel CRITICAL
+--- libsonlib.orig/Makefile
++++ libsonlib/Makefile
+@@ -21,7 +21,7 @@
+ cd externalTools && $(MAKE) clean
+
+ test : all
+- PYTHONPATH=.. PATH=../../bin:$$PATH python allTests.py --testLength=SHORT --logLevel=CRITICAL
++ PYTHONPATH=.. PATH=../../bin:$$PATH python3 allTests.py --testLength=SHORT --logLevel=CRITICAL
+
+ ${binPath}/sonLib_daemonize.py : sonLib_daemonize.py cP
+ cp sonLib_daemonize.py ${binPath}/sonLib_daemonize.py
=====================================
debian/patches/fix_test.patch
=====================================
@@ -2,22 +2,22 @@ Author: Andreas Tille <tille at debian.org>
Last-Update: Tue, 16 Jun 2020 08:23:45 +0200
Description: Somehow the test suite was non-functional. Fix some PATHs here
---- a/C/Makefile
-+++ b/C/Makefile
-@@ -65,4 +65,4 @@ ${libPath}/sonLib.a : ${libSources} ${cp
+--- libsonlib.orig/C/Makefile
++++ libsonlib/C/Makefile
+@@ -59,4 +59,4 @@
mv sonLib.a ${libPath}/
test:
- python3 allTests.py --testLength=SHORT --logLevel CRITICAL
+ PYTHONPATH=../src/sonLib python3 allTests.py --testLength=SHORT --logLevel CRITICAL
---- a/Makefile
-+++ b/Makefile
-@@ -21,7 +21,7 @@ externalToolsP.clean :
- cd externalTools && make clean
+--- libsonlib.orig/Makefile
++++ libsonlib/Makefile
+@@ -21,7 +21,7 @@
+ cd externalTools && $(MAKE) clean
test : all
- PYTHONPATH=.. PATH=../../bin:$$PATH python3 allTests.py --testLength=SHORT --logLevel=CRITICAL
+ PYTHONPATH=$(CURDIR)/src:$(CURDIR)/src/sonLib PATH=$(CURDIR)/bin:$$PATH python3 src/sonLib/test/allTests.py --testLength=SHORT --logLevel=CRITICAL
- ${binPath}/sonLib_daemonize.py : sonLib_daemonize.py
+ ${binPath}/sonLib_daemonize.py : sonLib_daemonize.py cP
cp sonLib_daemonize.py ${binPath}/sonLib_daemonize.py
=====================================
debian/patches/rpath.patch
=====================================
@@ -2,9 +2,9 @@ Author: Andreas Tille <tille at debian.org>
Last-Update: Tue, 16 Jun 2020 08:23:45 +0200
Description: No rpath
---- a/include.mk
-+++ b/include.mk
-@@ -66,7 +66,7 @@ else ifneq ($(wildcard /usr/include/tcbd
+--- libsonlib.orig/include.mk
++++ libsonlib/include.mk
+@@ -90,7 +90,7 @@
# /usr install (Ubuntu, and probably most Debain-based systems)
tcPrefix = /usr
tokyoCabinetIncl = -I${tcPrefix}/include -DHAVE_TOKYO_CABINET=1
=====================================
debian/patches/use_debian_packaged_quicktree.patch
=====================================
@@ -3,8 +3,8 @@ Last-Update: Tue, 16 Jun 2020 08:23:45 +0200
Description: To avoid a code copy of quicktree here inside the quicktree
package a static lib is built and used to link here
---- a/externalTools/Makefile
-+++ b/externalTools/Makefile
+--- libsonlib.orig/externalTools/Makefile
++++ libsonlib/externalTools/Makefile
@@ -1,20 +1,14 @@
include ../include.mk
-.PHONY: all clean cutestM cutestM.clean quicktreeM.clean
@@ -25,39 +25,39 @@ Description: To avoid a code copy of quicktree here inside the quicktree
cd cutest && make clean
-
-quicktreeM :
-- cd quicktree_1.1 && make all
+- cd quicktree_1.1 && make all CC="${cxx}"
-
-quicktreeM.clean :
- cd quicktree_1.1 && make clean
---- a/C/Makefile
-+++ b/C/Makefile
-@@ -7,12 +7,11 @@ cppSources = impl/*.cpp
+--- libsonlib.orig/C/Makefile
++++ libsonlib/C/Makefile
+@@ -7,12 +7,11 @@
libHeaders = $(wildcard inc/*.h)
libInternalHeaders = impl/*.h
libTests = tests/sonLib*.c tests/st*
-quickTreeObjects = ../externalTools/quicktree_1.1/obj/buildtree.o ../externalTools/quicktree_1.1/obj/cluster.o ../externalTools/quicktree_1.1/obj/distancemat.o ../externalTools/quicktree_1.1/obj/options.o ../externalTools/quicktree_1.1/obj/sequence.o ../externalTools/quicktree_1.1/obj/tree.o ../externalTools/quicktree_1.1/obj/util.o
quickTreeLibPath = ../externalTools/quicktree_1.1/include/
- testProgs = ${binPath}/sonLibTests ${binPath}/sonLib_kvDatabaseTest ${binPath}/sonLib_cigarTest ${binPath}/sonLib_fastaCTest ${binPath}/sonLib_dynamicConnectivity_performance
+ testProgs = ${binPath}/sonLibTests ${binPath}/sonLib_kvDatabaseTest ${binPath}/sonLib_cigarTest ${binPath}/sonLib_fastaCTest
--cflags += ${tokyoCabinetIncl} ${kyotoTycoonIncl} ${tokyoTyrantIncl} ${mysqlIncl} ${pgsqlIncl} -I${quickTreeLibPath}
-+cflags += ${tokyoCabinetIncl} ${kyotoTycoonIncl} ${tokyoTyrantIncl} ${mysqlIncl} ${pgsqlIncl} -I/usr/include/quicktree
+-cflags += ${tokyoCabinetIncl} ${kyotoTycoonIncl} ${tokyoTyrantIncl} ${mysqlIncl} ${pgsqlIncl} -I${quickTreeLibPath} $(CFLAGS)
++cflags += ${tokyoCabinetIncl} ${kyotoTycoonIncl} ${tokyoTyrantIncl} ${mysqlIncl} ${pgsqlIncl} -I$/usr/include/quicktree $(CFLAGS)
cppflags += ${kyotoTycoonIncl}
all : ${libPath}/sonLib.a ${testProgs}
-@@ -22,7 +21,7 @@ clean :
+@@ -22,7 +21,7 @@
${binPath}/sonLibTests : ${libTests} ${libInternalHeaders} ${libPath}/sonLib.a ${libPath}/cuTest.a tests/allTests.c
@mkdir -p $(dir $@)
-- ${cxx} ${cflags} -I inc -I ${libPath} -o $@.tmp tests/allTests.c ${libTests} ${libPath}/sonLib.a ${libPath}/cuTest.a ${dblibs} ${mysqlLibs} -lm -lstdc++ -lpthread
-+ ${cxx} ${cflags} -I inc -I ${libPath} -o $@.tmp tests/allTests.c ${libTests} ${libPath}/sonLib.a ${libPath}/cuTest.a ${dblibs} ${mysqlLibs} -lm -lstdc++ -lpthread -lquicktree
+- ${cxx} $(LDFLAGS) $(CPPFLAGS) ${cflags} -I inc -I ${libPath} -o $@.tmp tests/allTests.c ${libTests} ${libPath}/sonLib.a ${libPath}/cuTest.a ${dblibs} ${mysqlLibs} -lm -lstdc++ -lpthread
++ ${cxx} $(LDFLAGS) $(CPPFLAGS) ${cflags} -I inc -I ${libPath} -o $@.tmp tests/allTests.c ${libTests} ${libPath}/sonLib.a ${libPath}/cuTest.a ${dblibs} ${mysqlLibs} -lm -lstdc++ -lpthread -lquicktree
mv $@.tmp $@
${binPath}/sonLib_kvDatabaseTest : ${libTests} ${libInternalHeaders} ${libPath}/sonLib.a ${libPath}/cuTest.a tests/kvDatabaseTest.c tests/kvDatabaseTestCommon.c
-@@ -60,7 +59,7 @@ ${libPath}/sonLib.a : ${libSources} ${cp
+@@ -54,7 +53,7 @@
@mkdir -p $(dir $@)
- ${cxx} ${cflags} -I inc -I ${libPath}/ -c ${libSources}
- ${cpp} ${cppflags} -I inc -I ${libPath}/ -c ${cppSources}
+ ${cxx} $(CPPFLAGS) ${cflags} -I inc -I ${libPath}/ -c ${libSources}
+ ${cpp} $(CPPFLAGS) ${cppflags} -I inc -I ${libPath}/ -c ${cppSources}
- ar rc sonLib.a *.o ${quickTreeObjects}
+ ar rc sonLib.a *.o
ranlib sonLib.a
View it on GitLab: https://salsa.debian.org/med-team/libsonlib/-/commit/1805ad4a76860e4ae8f88eb4314fa83210bcfb76
--
View it on GitLab: https://salsa.debian.org/med-team/libsonlib/-/commit/1805ad4a76860e4ae8f88eb4314fa83210bcfb76
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/20200623/cfd91de6/attachment-0001.html>
More information about the debian-med-commit
mailing list