From: Richard Kreckel Date: Tue, 10 Sep 2019 21:29:07 +0000 (+0200) Subject: Convert shebangs to python3. X-Git-Tag: release_1-7-7~7 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=ab655d5afacd562f817cfc4ca821ab61c7de2188;ds=sidebyside Convert shebangs to python3. PEP 394 does not require the python command to be installed. --- diff --git a/INSTALL b/INSTALL index 75b84466..d506b79a 100644 --- 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 -from . Also Python version >= 2.6 is -required. +from . 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 @@ -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), -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 diff --git a/ginac/function.py b/ginac/function.py index 465976b3..63012a26 100755 --- a/ginac/function.py +++ b/ginac/function.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # encoding: utf-8 maxargs = 14 diff --git a/ginsh/CMakeLists.txt b/ginsh/CMakeLists.txt index c350a21a..9f4c0a8f 100644 --- a/ginsh/CMakeLists.txt +++ b/ginsh/CMakeLists.txt @@ -40,13 +40,13 @@ endif() 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}) diff --git a/ginsh/ginsh_fcn_help.py b/ginsh/ginsh_fcn_help.py index 00f8f2d7..1c7ea49a 100755 --- a/ginsh/ginsh_fcn_help.py +++ b/ginsh/ginsh_fcn_help.py @@ -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 diff --git a/ginsh/ginsh_op_help.py b/ginsh/ginsh_op_help.py index cdf63b01..f0932572 100755 --- a/ginsh/ginsh_op_help.py +++ b/ginsh/ginsh_op_help.py @@ -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 diff --git a/scripts/fixupind.py b/scripts/fixupind.py index 7ebb1e1a..ac2c4b97 100755 --- a/scripts/fixupind.py +++ b/scripts/fixupind.py @@ -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 diff --git a/scripts/yaptu.py b/scripts/yaptu.py index cffb1905..734d748a 100644 --- a/scripts/yaptu.py +++ b/scripts/yaptu.py @@ -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). @@ -33,7 +33,7 @@ class copier: 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)) @@ -65,7 +65,7 @@ class copier: 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