diff options
Diffstat (limited to 'pkgs/applications/science/chemistry/openmolcas')
-rw-r--r-- | pkgs/applications/science/chemistry/openmolcas/default.nix | 3 | ||||
-rw-r--r-- | pkgs/applications/science/chemistry/openmolcas/pyparsing.patch | 37 |
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix index 33c77c063bf91..0aeb01c2916b5 100644 --- a/pkgs/applications/science/chemistry/openmolcas/default.nix +++ b/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -59,6 +59,9 @@ stdenv.mkDerivation { # Required for a local QCMaquis build ./qcmaquis.patch + + # PyParsing >= 3.11 compatibility, can be removed on next release + ./pyparsing.patch ]; postPatch = '' diff --git a/pkgs/applications/science/chemistry/openmolcas/pyparsing.patch b/pkgs/applications/science/chemistry/openmolcas/pyparsing.patch new file mode 100644 index 0000000000000..271b52840ff93 --- /dev/null +++ b/pkgs/applications/science/chemistry/openmolcas/pyparsing.patch @@ -0,0 +1,37 @@ +diff --git a/Tools/pymolcas/emil_grammar.py b/Tools/pymolcas/emil_grammar.py +index acbbae8..509c56f 100644 +--- a/Tools/pymolcas/emil_grammar.py ++++ b/Tools/pymolcas/emil_grammar.py +@@ -15,6 +15,14 @@ + + from __future__ import (unicode_literals, division, absolute_import, print_function) + ++try: ++ u = unicode ++ del u ++ py2 = True ++except NameError: ++ pass ++ ++ + from re import sub + from pyparsing import * + +@@ -24,6 +32,8 @@ def chomp(s): + + def chompAction(s, l, t): + try: ++ if (py2): ++ pass + return list(map(lambda s: chomp(unicode(s)), t)) + except NameError: + return list(map(chomp, t)) +@@ -33,6 +43,8 @@ def removeEMILEnd(s): + + def removeEMILEndAction(s, l, t): + try: ++ if (py2): ++ pass + return list(map(lambda s: removeEMILEnd(unicode(s)), t)) + except NameError: + return list(map(removeEMILEnd, t)) |