diff options
author | Soc Virnyl S. Estela | 2021-04-08 13:45:55 +0800 |
---|---|---|
committer | Soc Virnyl S. Estela | 2021-04-08 13:45:55 +0800 |
commit | 0020e92e2c5a558b12a7248f7835a87a4b092822 (patch) | |
tree | c4e66bb61c3786a74927d319c5c9a5297af6fc6b /pythia.patch | |
parent | dc323b9d1f91f8ff39cb831d91fe0e6befef6842 (diff) | |
download | aur-0020e92e2c5a558b12a7248f7835a87a4b092822.tar.gz |
Update PKGBUILD
Diffstat (limited to 'pythia.patch')
-rw-r--r-- | pythia.patch | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/pythia.patch b/pythia.patch index b5fbe8de8e50..acc9f710cdbe 100644 --- a/pythia.patch +++ b/pythia.patch @@ -1,34 +1,43 @@ ---- a/get_pythia8_version.py -+++ b/get_pythia8_version.py +--- 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/python2 +-#! /usr/bin/env python +#!/usr/bin/env python import sys import os -@@ -29,17 +29,17 @@ +@@ -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')): -- 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')) -- return None + 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') -+ return None + 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\.]+)\"\>') - for line in open(pjoin(pythia8_path,'share','Pythia8','xmldoc','Version.xml')): -- match = versionfinder.match(line) -- if match: -- version = match.group('version') + for line in open(pjoin(pythia8_path,'share','pythia8','xmldoc','Version.xml')): -+ match = versionfinder.match(line) -+ if match: -+ version = match.group('version') - return version - return None - + match = versionfinder.match(line) + if match: + version = match.group('version') |