Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (5)
Use 2to3 to port from Python2 to Python3
· cea2cee4
Andreas Tille
authored
Dec 16, 2019
cea2cee4
Build-Depends: python3
· f7b9543f
Andreas Tille
authored
Dec 16, 2019
f7b9543f
routine-update: Standards-Version: 4.4.1
· cfdfc5a9
Andreas Tille
authored
Dec 16, 2019
cfdfc5a9
Set upstream metadata fields: Bug-Database, Repository, Repository-Browse.
· 63fec481
Andreas Tille
authored
Dec 16, 2019
63fec481
Thanks to Andrey Rahmatullin for this fix
· 0bc34fd4
Andreas Tille
authored
Dec 16, 2019
0bc34fd4
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
0bc34fd4
libncl (2.1.21+git20190531.feceb81-2) unstable; urgency=medium
* Use 2to3 to port from Python2 to Python3
Closes: #943083
* Standards-Version: 4.4.1
* Set upstream metadata fields: Bug-Database, Repository, Repository-
Browse.
-- Andreas Tille <tille@debian.org> Mon, 16 Dec 2019 08:33:03 +0100
libncl (2.1.21+git20190531.feceb81-1) unstable; urgency=medium
* Fix symbols file
...
...
debian/control
View file @
0bc34fd4
...
...
@@ -5,8 +5,8 @@ Section: science
Priority: optional
Build-Depends: debhelper-compat (= 12),
d-shlibs,
python
Standards-Version: 4.4.
0
python
3
Standards-Version: 4.4.
1
Vcs-Browser: https://salsa.debian.org/med-team/libncl
Vcs-Git: https://salsa.debian.org/med-team/libncl.git
Homepage: https://github.com/mtholder/ncl
...
...
debian/patches/2to3.patch
0 → 100644
View file @
0bc34fd4
Description: Use 2to3 to port from Python2 to Python3
Bug-Debian: https://bugs.debian.org/943083
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 16 Dec 2019 08:27:49 +0100
--- a/config/ax_python_module.m4
+++ b/config/ax_python_module.m4
@@ -16,9 +16,9 @@
dnl @license AllPermissive
AC_DEFUN([AC_PYTHON_MODULE],[
if test -z "PYTHON"
then
- AC_PATH_PROG([PYTHON], [python], [], [$PATH])
+ AC_PATH_PROG([PYTHON], [python3], [], [$PATH])
fi
- AC_MSG_CHECKING(python module: $1)
+ AC_MSG_CHECKING(python3 module: $1)
if test -z "$PYTHON"
then
false
--- a/configure.ac
+++ b/configure.ac
@@ -139,7 +139,7 @@
AC_CHECK_FUNCS([memmove strchr strtol])
# the install-check requires python with subprocess to actually perform a check
# these tests should not cause failure of configure if python is not found.
################################################################################
-AC_PATH_PROG([PYTHON], [python], [], [$PATH])
+AC_PATH_PROG([PYTHON], [python3], [], [$PATH])
AC_PYTHON_MODULE([subprocess], [], [])
AC_SUBST(PYTHON)
--- a/misc/generate_codon_recode.py
+++ b/misc/generate_codon_recode.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import sys
f = open(sys.argv[1], "rU")
bases = "ACGT"
--- a/misc/genetic_codes.py
+++ b/misc/genetic_codes.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# Parsing of information from ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt
# into code for NCL's (alphabetical) order of codons
import sys
-from cStringIO import StringIO
+from io import StringIO
codes = []
@@ -15,7 +15,7 @@
class Code(object):
assert len(self.aa) == len(self.nuc_order[1])
assert len(self.aa) == len(self.nuc_order[2])
gen_code = {}
- for codon_n in xrange(len(self.aa)):
+ for codon_n in range(len(self.aa)):
aa = self.aa[codon_n]
f = self.nuc_order[0][codon_n]
s = self.nuc_order[1][codon_n]
@@ -243,11 +243,11 @@
for n, code in enumerate(codes):
l = code.to_order_ind(desired_order)
if n == 0:
x = l
- for j in xrange(64):
+ for j in range(64):
sys.stdout.write('\taaInd[%d] = %d;\n' % (j, l[j]))
else:
sys.stdout.write('\tif (codeIndex = %s) {\n' % code.name)
- for j in xrange(64):
+ for j in range(64):
if l[j] != x[j]:
sys.stdout.write('\t\taaInd[%d] = %d;\n' % (j, l[j]))
sys.stdout.write('\t}\n')
--- a/swig_configure.ac
+++ b/swig_configure.ac
@@ -54,7 +54,7 @@
AC_ARG_WITH(
[swig],
AC_HELP_STRING(
[--with-swig=yes],
- [Compiles NCL for use with SWIG bindings for use with languages other than C++ - currently only python examples are included]
+ [Compiles NCL for use with SWIG bindings for use with languages other than C++ - currently only python3 examples are included]
),
[
if test "$withval" = "yes"; then
@@ -134,7 +134,7 @@
AC_CHECK_FUNCS([memmove strchr strtol])
# the install-check requires python with subprocess to actually perform a check
# these tests should not cause failure of configure if python is not found.
################################################################################
-AC_PATH_PROG([PYTHON], [python], [], [$PATH])
+AC_PATH_PROG([PYTHON], [python3], [], [$PATH])
AC_PYTHON_MODULE([subprocess], [], [])
AC_SUBST(PYTHON)
--- a/test/roundTripNCLTest.py
+++ b/test/roundTripNCLTest.py
@@ -1,10 +1,10 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import sys
import os
import subprocess
import filecmp
import itertools
-import cStringIO
+import io
import shutil
def runTest(inArgPath,
@@ -38,7 +38,7 @@
def runTest(inArgPath,
inFiles = [os.path.basename(inArgPath)]
if not inFiles:
- print >>sys.stderr, "No files to test (looking for " + " ".join(fileNamePatterns) + " files)"
+ print("No files to test (looking for " + " ".join(fileNamePatterns) + " files)", file=sys.stderr)
sys.exit(0)
if compareOut:
@@ -110,15 +110,15 @@
def runTest(inArgPath,
n = 1
while True:
try:
- eLine = eit.next()
+ eLine = next(eit)
try:
- oLine = oit.next()
+ oLine = next(oit)
except StopIteration:
oLine = ""
except StopIteration:
eLine = ""
try:
- oLine = oit.next()
+ oLine = next(oit)
except StopIteration:
break
if eLine != oLine:
@@ -128,7 +128,7 @@
def runTest(inArgPath,
sys.exit(basicMsg + fileInfo + diff)
e.close()
o.close()
- print >>sys.stderr, sys.argv[0], ": Call to", normalizer, "succeeded for", inFile
+ print(sys.argv[0], ": Call to", normalizer, "succeeded for", inFile, file=sys.stderr)
if os.path.exists(tf):
os.remove(tf)
@@ -209,7 +209,7 @@
if options.auto:
m = "%s does not exist." % resourceFilePath
if options.batch != "~/.ncl_round_triprc":
sys.exit(m)
- print(m + " Test stepped skipped.")
+ print((m + " Test stepped skipped."))
sys.exit(0)
resourceFileStream = open(resourceFilePath, "rU")
else:
@@ -229,7 +229,7 @@
else:
fs = "%s\n%s\n" % (args[1], args[2])
else:
fs = "%s\n" % (args[1])
- resourceFileStream = cStringIO.StringIO(fs)
+ resourceFileStream = io.StringIO(fs)
normalizer = os.path.abspath(args[0])
if not os.path.exists(normalizer):
sys.exit(normalizer + " does not exist")
@@ -240,13 +240,13 @@
try:
while True:
inputParentPath = "#"
while len(inputParentPath) < 1 or inputParentPath.strip().startswith("#"):
- inputParentPath = lineIter.next().strip()
+ inputParentPath = next(lineIter).strip()
if options.invalid:
outputParentPath = None
else:
outputParentPath = "#"
while len(outputParentPath) < 1 or outputParentPath.strip().startswith("#"):
- outputParentPath = lineIter.next().strip()
+ outputParentPath = next(lineIter).strip()
#print "next round: ", inputParentPath,"\n ", outputParentPath
if options.x:
extra_args = ['-x']
debian/patches/series
View file @
0bc34fd4
fix_rpath_issue.patch
set_soname_version.patch
spelling.patch
2to3.patch
debian/upstream/metadata
View file @
0bc34fd4
...
...
@@ -9,10 +9,8 @@ Reference:
Pages: 2330-2331
DOI: 10.1093/bioinformatics/btg319
PMID: 14630669
URL: "https://academic.oup.com/bioinformatics/article/19/17/2330/\
206304/NCL-a-C-class-library-for-interpreting-data-files"
eprint: "https://academic.oup.com/bioinformatics/article-pdf/\
19/17/2330/539234/btg319.pdf"
URL: "https://academic.oup.com/bioinformatics/article/19/17/2330/206304/NCL-a-C-class-library-for-interpreting-data-files"
eprint: "https://academic.oup.com/bioinformatics/article-pdf/19/17/2330/539234/btg319.pdf"
Registry:
- Name: OMICtools
Entry: OMICS_20523
...
...
@@ -20,3 +18,6 @@ Registry:
Entry: NA
- Name: SciCrunch
Entry: NA
Bug-Database: https://github.com/mtholder/ncl/issues
Repository: https://github.com/mtholder/ncl.git
Repository-Browse: https://github.com/mtholder/ncl