PEP 394 does not require the python command to be installed.
name-mangling schemes.
The pkg-config utility is required for configuration, it can be downloaded
-from <http://pkg-config.freedesktop.org/>. Also Python version >= 2.6 is
-required.
+from <http://pkg-config.freedesktop.org/>. Also, Python 3 is required.
To build the GiNaC tutorial and reference manual the doxygen utility
(it can be downloaded from http://www.stack.nl/~dimitri/doxygen) and
- GCC < 4.6.0 due to missing C++-11 support
If you install from git, you also need GNU autoconf (>=2.59), automake (>=1.8),
-libtool (>= 1.5), python (>= 2.5), bison (>= 2.3), flex (>= 2.5.33) to be installed.
+libtool (>= 1.5), python3, bison (>= 2.3), flex (>= 2.5.33) to be installed.
INSTALLATION
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
maxargs = 14
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ginsh_fcn_help.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_fcn_help.py -o ginsh_fcn_help.h ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_fcn_help.py -o ginsh_fcn_help.h ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_fcn_help.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ginsh_op_help.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_op_help.py -o ginsh_op_help.h ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_op_help.py -o ginsh_op_help.h ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_op_help.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
# Convert help for ginsh functions from man page to C source
import sys, re, optparse
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
# Convert help for ginsh operators from man page to C source
import sys, re, optparse
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
# TeX Live 2012 seems to dislike files produces by doxygen (1.8.x.y)
# In particular, makeindex(1) program creates invalid index entries like
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Yet Another Python Templating Utility, Version 1.2, by Alex Martelli.
Distributed under PSF license (http://docs.python.org/license.html).
def repl(match, self=self):
"return the eval of a found expression, for replacement"
# uncomment for debug:
- # print '!!! replacing',match.group(1)
+ # print('!!! replacing',match.group(1))
expr = self.preproc(match.group(1), 'eval')
try: return str(eval(expr, self.globals, self.locals))
except: return str(self.handle(expr))
stat = self.preproc(stat, 'exec')
stat = '%s _cb(%s,%s)' % (stat,i+1,j)
# for debugging, uncomment...:
- # print "-> Executing: {"+stat+"}"
+ # print("-> Executing: {"+stat+"}")
exec(stat, self.globals, self.locals)
i=j+1
else: # normal line, just copy with substitution