Issue when trying to create Python3 bindings when using Python 3.7

16 views
Skip to first unread message

Andreas Tille

unread,
Dec 4, 2018, 7:12:26 AM12/4/18
to libsbml-development
Hi,
I intend to switch the Python bindings of the Debian packaged version of sbml to Python3.  In Debian the default Python3 version is 3.7.  When I try to build libsbml I'm running into

make[4]: Entering directory '/build/libsbml-5.17.0+dfsg/build'
[ 99%] Swig Python source
Traceback (most recent call last):
 
File "/usr/lib/python3.7/sre_parse.py", line 1021, in parse_template
   
this = chr(ESCAPES[this][1])
KeyError: '\\s'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1924, in <module>
    main
(sys.argv)
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1881, in main
    processFile
(file, stream, language, preprocessor_defines)
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1697, in processFile
    processFunctions
(ostream, header.functions)
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1673, in processFunctions
    ostream
.write(generateFunctionDocString(f.name, f.docstring, f.args, f.isInternal,f))
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1617, in generateFunctionDocString
    doc
= rewriteDocstringForPython(docstring)
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 1397, in rewriteDocstringForPython
    docstring
= translateAllowingBreaks(breakable_translations, docstring)
 
File "/build/libsbml-5.17.0+dfsg/src/bindings/python/../swig/swigdoc.py", line 816, in translateAllowingBreaks
    new_pattern
= re.sub(' ', r'\s+\*?\s*', pair[0])
 
File "/usr/lib/python3.7/re.py", line 192, in sub
   
return _compile(pattern, flags).sub(repl, string, count)
 
File "/usr/lib/python3.7/re.py", line 309, in _subx
   
template = _compile_repl(template, pattern)
 
File "/usr/lib/python3.7/re.py", line 300, in _compile_repl
   
return sre_parse.parse_template(repl, pattern)
 
File "/usr/lib/python3.7/sre_parse.py", line 1024, in parse_template
   
raise s.error('bad escape %s' % this, len(this))
re
.error: bad escape \s at position 0
make
[4]: *** [src/bindings/python/CMakeFiles/binding_python_swig.dir/build.make:618: src/bindings/python/libsbml_wrap.cpp] Error 1


Any idea how to deal with this?

Kind regards, Andreas.

Michael Hucka

unread,
Dec 4, 2018, 7:16:25 PM12/4/18
to libsbml-development
Hi,

There is indeed a problem with 5.17, and we are right in the process
(this week) of producing a release of 5.18 (experimental) with a fix for
supporting Python 3.7. If you can afford to wait a few days, this will
be available very soon.

MH
> --
> You received this message because you are subscribed to the Google
> Groups "libsbml-development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to libsbml-develop...@googlegroups.com.
> To post to this group, send email to
> libsbml-d...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/libsbml-development/43538ebb-5f5b-470c-a97b-82dc1b2f6388%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andreas Tille

unread,
Dec 5, 2018, 1:36:11 AM12/5/18
to libsbml-d...@googlegroups.com
Hi,
thanks, yes, I can wait.  I'd happily do some test build on Debian in case this might help.
Kind regards, Andreas.

You received this message because you are subscribed to a topic in the Google Groups "libsbml-development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/libsbml-development/hiqhyd6-7s0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to libsbml-develop...@googlegroups.com.

To post to this group, send email to libsbml-d...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Keating, Sarah M.

unread,
Dec 5, 2018, 5:10:39 AM12/5/18
to libsbml-d...@googlegroups.com, Michael Hucka
Just to note that the release will be 5.17.2-experimental :-)

Sarah

Michael Hucka

unread,
Dec 5, 2018, 12:14:35 PM12/5/18
to Keating, Sarah M., libsbml-d...@googlegroups.com
Whoops, sorry about that! Thanks for catching my error.

MH
Reply all
Reply to author
Forward
0 new messages