summaryrefslogtreecommitdiff
path: root/openbabel-3.1.1-fix_bug2217.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-26 05:45:05 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-26 05:45:05 +0000
commit591a21a311878e2daaefd471dfbdbec97b8b66e6 (patch)
treee8622fe82c9da0d6cc2a6c38e9951477f584a1c5 /openbabel-3.1.1-fix_bug2217.patch
parentd7c45699b4b3e41973c9a1c0eadeb2cec369c50d (diff)
automatic import of openbabelopeneuler20.03
Diffstat (limited to 'openbabel-3.1.1-fix_bug2217.patch')
-rw-r--r--openbabel-3.1.1-fix_bug2217.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/openbabel-3.1.1-fix_bug2217.patch b/openbabel-3.1.1-fix_bug2217.patch
new file mode 100644
index 0000000..2f5aabf
--- /dev/null
+++ b/openbabel-3.1.1-fix_bug2217.patch
@@ -0,0 +1,39 @@
+From 7de27f309db5f7ec026ef5c5235e5b33bf7d1a85 Mon Sep 17 00:00:00 2001
+From: John Bollinger <John.Bollinger@StJude.org>
+Date: Thu, 14 May 2020 08:46:40 -0500
+Subject: [PATCH] Fix test failure with Python 3
+
+When run with Python 3.6, test/testdistgeom.py fails with a SyntaxError
+about a malformed character escape. This arises from a failure to escape
+literal backslash characters in single-quoted SMILES strings (several
+occurrences). Python 2 accepts this and does the right things with it,
+but Python 3 rejects it.
+
+Fixes #2217
+---
+ test/testdistgeom.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/test/testdistgeom.py b/test/testdistgeom.py
+index 0fa5adb576..fc3a7515b9 100644
+--- a/test/testdistgeom.py
++++ b/test/testdistgeom.py
+@@ -42,13 +42,13 @@ def testSMItoSMI(self):
+ 'C1CC[C@H]2[C@@H](C1)CCCC2', # cis-decalin
+ 'C1CC[C@@H]2[C@@H](C1)CCCC2', # trans-decalin
+ '[C@H]1(NC[C@H]2[C@H]1N2)OC',
+- 'Clc1cccc(Cl)c1\C=N\NC(=O)c1cccs1',
+- 'O=C1NC(=S)S\C1=C/c1ccco1',
++ 'Clc1cccc(Cl)c1\\C=N\\NC(=O)c1cccs1',
++ 'O=C1NC(=S)S\\C1=C/c1ccco1',
+ 'S=C1NC(=O)/C(=C/c2ccco2)/S1',
+- 'O=C1NC(=S)N\C1=C\c1ccncc1',
++ 'O=C1NC(=S)N\\C1=C\\c1ccncc1',
+ 'S=C1NC(=O)C(=C)N1',
+- 'CC(=O)N\N=C\c1ccncc1',
+- 'N/N=c/1\sc2c(n1C)cccc2',
++ 'CC(=O)N\\N=C\\c1ccncc1',
++ 'N/N=c/1\\sc2c(n1C)cccc2',
+ 'OCCN/C=C\\1/C(=NN(C1=O)c1ccccc1)C',
+ 'Cc1ccc(o1)/C=C/C=O',
+ # disabled to make test run faster: