diff options
Diffstat (limited to 'pythia.patch')
-rw-r--r-- | pythia.patch | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/pythia.patch b/pythia.patch index 7604319a7ce6..acc9f710cdbe 100644 --- a/pythia.patch +++ b/pythia.patch @@ -1,14 +1,37 @@ ---- a/get_pythia8_version.py -+++ b/get_pythia8_version.py -@@ -29,14 +29,14 @@ +--- a/get_pythia8_version.py 2021-04-07 07:31:51.000000000 +0800 ++++ b/get_pythia8_version.py 2021-04-08 12:32:12.100076666 +0800 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python + + import sys + import os +@@ -6,7 +6,7 @@ + import subprocess + pjoin = os.path.join + +-local_path = os.path.abspath(os.path.dirname(os.path.realpath( __file__ ))) ++local_path = '/usr' + + error_exit_code = 9 + +@@ -22,21 +22,21 @@ + print( help_msg) + sys.exit(error_exit_code) + +-pythia8_path = os.path.abspath(os.path.realpath(sys.argv[1])) ++pythia8_path = '/usr' + + # The technique above didn't work, so we will try to obtain the version from the xml doc instead + version = None def get_version_from_xml(): - if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','xmldoc','Version.xml')): + if not os.path.exists(pjoin(pythia8_path,'share','pythia8','xmldoc','Version.xml')): - print "Error in 'get_pythia8_version.py': could not get Pyhtia8 file \n '%s'\n storing the version number"% \ -- pjoin(local_path,'share','Pythia8','xmldoc','Version.xml') -+ pjoin(local_path,'share','pythia8','xmldoc','Version.xml') + print( "Error in 'get_pythia8_version.py': could not get Pyhtia8 file \n '%s'\n storing the version number"% \ +- pjoin(local_path,'share','Pythia8','xmldoc','Version.xml')) ++ pjoin(local_path,'share','pythia8','xmldoc','Version.xml')) return None versionfinder = re.compile('^\s*\<parmfix\s*name\=\"Pythia:versionNumber\"\s*default=\"(?P<version>[\d\.]+)\"\>') @@ -18,30 +41,3 @@ match = versionfinder.match(line) if match: version = match.group('version') - ---- a/compile.py -+++ b/compile.py -@@ -103,17 +103,17 @@ - - # Now proceed with the installation - --if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc')): -+if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc')): - print "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\ -- pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc') -+ pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc') - sys.exit(error_exit_code) --shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc'), -+shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc'), - pjoin(local_path,'Makefile.inc')) --if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile')): -+if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile')): - print "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\ -- pjoin(pythia8_path,'share','Pythia8','examples','Makefile') -+ pjoin(pythia8_path,'share','pythia8','examples','Makefile') - sys.exit(error_exit_code) --shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile'), -+shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile'), - pjoin(local_path,'Makefile')) - - if _use_original_PY8_makefile: |