]> www.ginac.de Git - ginac.git/commitdiff
Convert shebangs to python3.
authorRichard Kreckel <kreckel@ginac.de>
Tue, 10 Sep 2019 21:29:07 +0000 (23:29 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 10 Sep 2019 21:33:54 +0000 (23:33 +0200)
PEP 394 does not require the python command to be installed.

INSTALL
ginac/function.py
ginsh/CMakeLists.txt
ginsh/ginsh_fcn_help.py
ginsh/ginsh_op_help.py
scripts/fixupind.py
scripts/yaptu.py

diff --git a/INSTALL b/INSTALL
index 75b8446614be0c5ee021b1a65ad475e49dc65643..d506b79a311f22b6a70e851e5fa3b2974fd30a31 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -11,8 +11,7 @@ use the same compiler you compiled CLN with because of differing
 name-mangling schemes.
 
 The pkg-config utility is required for configuration, it can be downloaded
 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
 
 To build the GiNaC tutorial and reference manual the doxygen utility
 (it can be downloaded from http://www.stack.nl/~dimitri/doxygen) and
@@ -28,7 +27,7 @@ Known not to work with:
  - 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),
  - 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
 
 
 INSTALLATION
index 465976b349c28b650afc34e698d92234ff70f2c5..63012a268c11cd3a48b25e2fc30c083fdb42fcff 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # encoding: utf-8
 
 maxargs = 14
 # encoding: utf-8
 
 maxargs = 14
index c350a21ab5a3e328b4b6cd3a298c4afa85c187ed..9f4c0a8f8ea1f4bf659abb16f60b39163ea8ade4 100644 (file)
@@ -40,13 +40,13 @@ endif()
 
 add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ginsh_fcn_help.h
 
 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
        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})
 
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ginsh.1.in ${CMAKE_CURRENT_SOURCE_DIR}/ginsh_op_help.py
        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
 
index 00f8f2d7ed38b388a7553dc399da7bc00256c288..1c7ea49adb5794f91c813763e627bdddcd87443e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/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
 # encoding: utf-8
 # Convert help for ginsh functions from man page to C source
 import sys, re, optparse
index cdf63b010d96f56119262b384706139ebea2e211..f09325728623d9fa6fbf078ee16c5419e6d06fb0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/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
 # encoding: utf-8
 # Convert help for ginsh operators from man page to C source
 import sys, re, optparse
index 7ebb1e1a002c3514ba85a8726a6afd0807331902..ac2c4b979a8e8950f513d51c6f271f3b6672432c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/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
 # 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
index cffb19050ce6d1272e9dae94ebfc4a52c7ee131b..734d748a02dc6af8dec3e3a8ae4d6de6ec096a6e 100644 (file)
@@ -1,4 +1,4 @@
-#!/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).
 """
 Yet Another Python Templating Utility, Version 1.2, by Alex Martelli.
 Distributed under PSF license (http://docs.python.org/license.html).
@@ -33,7 +33,7 @@ class copier:
         def repl(match, self=self):
             "return the eval of a found expression, for replacement"
             # uncomment for debug:
         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))
             expr = self.preproc(match.group(1), 'eval')
             try: return str(eval(expr, self.globals, self.locals))
             except: return str(self.handle(expr))
@@ -65,7 +65,7 @@ class copier:
                 stat = self.preproc(stat, 'exec')
                 stat = '%s _cb(%s,%s)' % (stat,i+1,j)
                 # for debugging, uncomment...:
                 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
                 exec(stat, self.globals, self.locals)
                 i=j+1
             else:       # normal line, just copy with substitution