aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP-Ellis2017-02-14 14:28:12 +1100
committerJP-Ellis2017-02-14 16:38:27 +1100
commitf3b675e14648970b4a46a6e107b33949ff1151ef (patch)
tree914052e9f553192cde101645ef26330ce4b72e22
parentbc158d0c53c571311f645e8b9795bb69df4495cc (diff)
downloadaur-f3b675e14648970b4a46a6e107b33949ff1151ef.tar.gz
Major rework of PKGBUILD
Changes include: - Move installation to /opt/madgraph. This means that the files don't have to be patched and work 'out-of-the-box' - Replace sed with proper patches - Add optional dependencies - Remove the installation of vendor items. They can be added later as need be (please let me know!) Signed-off-by: JP-Ellis <josh@jpellis.me>
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD123
-rw-r--r--mg5_configuration.patch82
-rw-r--r--python2.patch530
4 files changed, 663 insertions, 92 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aeef1aade061..74223e2e1474 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,32 @@
# Generated by mksrcinfo v8
-# Wed Jan 25 07:20:55 UTC 2017
+# Tue Feb 14 03:30:10 UTC 2017
pkgbase = madgraph
pkgdesc = MadGraph5_aMC@NLO is a framework that aims at providing all the elements necessary for SM and BSM phenomenology
pkgver = 2.5.2
- pkgrel = 1
+ pkgrel = 2
url = http://madgraph.hep.uiuc.edu/
arch = i686
arch = x86_64
license = MIT
- depends = python2
depends = bash
+ depends = gcc-fortran
depends = perl
+ depends = python2
depends = tcsh
- depends = gcc-fortran
- depends = cmake
+ optdepends = delphes
+ optdepends = exrootanalysis
+ optdepends = fastjet
+ optdepends = hepmc
+ optdepends = lhapdf
+ optdepends = madgraph-pythia-pgs
+ optdepends = pythia8
options = !strip
source = https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz
+ source = python2.patch
+ source = mg5_configuration.patch
sha256sums = 7968f6d0543b3af2649ba497d17c3a23b089cc6f5ba352e0fd7fa106aa07a512
+ sha256sums = b16bcfebae4d50eb145436c97a06daf706691bbef4e7f45cde1c6116d2869720
+ sha256sums = 3a7065d9b8273f0c0e5530d85510a13c9b8241f9961a0d3a836786c8e3e151b4
pkgname = madgraph
diff --git a/PKGBUILD b/PKGBUILD
index d8a894e9c12d..c79bc3a80ac9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,99 +3,47 @@
pkgname=madgraph
pkgver=2.5.2
_dirname="MG5_aMC_v${pkgver//./_}"
-pkgrel=1
+pkgrel=2
pkgdesc="MadGraph5_aMC@NLO is a framework that aims at providing all the elements necessary for SM and BSM phenomenology"
url="http://madgraph.hep.uiuc.edu/"
arch=('i686' 'x86_64')
license=('MIT')
depends=(
- 'python2'
'bash'
+ 'gcc-fortran'
'perl'
+ 'python2'
'tcsh'
- 'gcc-fortran'
- 'cmake'
)
-source=("https://launchpad.net/mg5amcnlo/${pkgver%%.*}.0/${pkgver%.*}.x/+download/MG5_aMC_v${pkgver}.tar.gz")
-sha256sums=('7968f6d0543b3af2649ba497d17c3a23b089cc6f5ba352e0fd7fa106aa07a512')
+optdepends=(
+ 'delphes'
+ 'exrootanalysis'
+ 'fastjet'
+ 'hepmc'
+ 'lhapdf'
+ 'madgraph-pythia-pgs'
+ 'pythia8'
+)
+source=("https://launchpad.net/mg5amcnlo/${pkgver%%.*}.0/${pkgver%.*}.x/+download/MG5_aMC_v${pkgver}.tar.gz"
+ "python2.patch"
+ "mg5_configuration.patch")
+sha256sums=('7968f6d0543b3af2649ba497d17c3a23b089cc6f5ba352e0fd7fa106aa07a512'
+ 'b16bcfebae4d50eb145436c97a06daf706691bbef4e7f45cde1c6116d2869720'
+ '3a7065d9b8273f0c0e5530d85510a13c9b8241f9961a0d3a836786c8e3e151b4')
options=("!strip")
prepare() {
- # Some of the build steps below require this patch
msg2 "Fixing python references for python2"
- cd "${srcdir}/${_dirname}"
- find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/env\s\+python\s*$|#!/usr/bin/env python2|'
- find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/python\s*$|#!/usr/bin/env python2|'
-
- msg2 "Building CutTools"
- cd "${srcdir}/${_dirname}/vendor/CutTools"
- # Parallel building not supported by CutTools
- make -j1
- make clean
-
- # msg2 "Building DiscreteSampler"
- msg2 "Can't build DiscreteSampler (if you need this, I welcome a patch)"
- # cd ${srcdir}/${_dirname}/vendor/DiscreteSampler
- # make
- # make clean
-
- msg2 "Building IREGI"
- cd "${srcdir}/${_dirname}/vendor/IREGI/src"
- make
- make clean
-
- msg2 "Building SMWidth"
- cd "${srcdir}/${_dirname}/vendor/SMWidth"
- make
- make clean
-
- msg2 "Building StdHEP"
- cd "${srcdir}/${_dirname}/vendor/StdHEP"
- make
- make clean
-
- msg2 "Building Collier"
- cd "${srcdir}/${_dirname}/vendor"
- tar xf collier.tar.gz
- rm collier.tar.gz
- cd COLLIER-1.0/build
- cmake ..
- make
- rm -rf *
+ patch -p 1 < python2.patch
- msg2 "Building Ninja"
- cd "${srcdir}/${_dirname}/vendor/"
- tar xf ninja.tar.gz
- rm ninja.tar.gz
- cd ninja-1.1.0
- ./configure
- # Parallel building can cause issues sporadically
- make -j1
- make clean
-
- msg2 "Building OneLoop"
- cd "${srcdir}/${_dirname}/vendor/"
- tar xf oneloop.tar.gz
- rm oneloop.tar.gz
- cd OneLOop-3.6
- ./create.py
- ./clean.sh
+ msg2 "Updating configuration file"
+ patch -p 1 < mg5_configuration.patch
msg2 "Extracting documentation"
cd "${srcdir}/${_dirname}"
tar xf doc.tgz
rm doc.tgz
- # This needs to be run again as there are new python files
- msg2 "Fixing python references for python2"
- cd "${srcdir}/${_dirname}"
- find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/env\s\+python\s*$|#!/usr/bin/env python2|'
- find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/python\s*$|#!/usr/bin/env python2|'
-
- msg2 "Compiling python source files (there might be errors)"
- python2 -O -m compileall -qf "${srcdir}/${_dirname}" || true
-
-
msg2 "Removing VCS directories"
cd "${srcdir}/${_dirname}"
find . -name "CVS" \
@@ -103,10 +51,12 @@ prepare() {
-o -name ".bzr" -o -name ".bzrignore" \
-o -name ".git" -o -name ".gitignore" \
-o -name ".hg" -o -name ".hgignore" | xargs rm -rf
-
}
-package() {
+build() {
+ msg2 "Compiling python source files"
+ python2 -O -m compileall -qf "${srcdir}/${_dirname}" 2>&1 1>/dev/null || true
+
msg2 "Initialize MG5 first run"
# MadGraph needs to generate `Template/LO/Source/make_opts` which is done
# automatically at startup. This needs to be done during setup (or with
@@ -114,29 +64,28 @@ package() {
tmpfile=$(mktemp)
echo "exit" > $tmpfile
"${srcdir}/${_dirname}/bin/mg5_aMC" $tmpfile 1>/dev/null
+ rm $tmpfile
+}
- msg2 "Patching root_path"
- # This should be converted to a proper patch file in the future
- find "${srcdir}/${_dirname}/bin" -type f -print0 | xargs -0 sed -i 's|^\(\s*\)root_path\s*=.*$|\1root_path = "/usr/share/madgraph"|'
-
+package() {
msg2 "Installing files"
- # Copy everything of /usr/share/madgraph since the program isn't nicely
+ # Copy everything of /opt/madgraph since the program isn't nicely
# separated into bin, include, etc.
- mkdir -p "${pkgdir}/usr/share/${pkgname}"
- cp -a "${srcdir}/${_dirname}/." "${pkgdir}/usr/share/${pkgname}"
+ mkdir -p "${pkgdir}/opt/${pkgname}"
+ cp -a "${srcdir}/${_dirname}/." "${pkgdir}/opt/${pkgname}"
install -Dm655 "${srcdir}/${_dirname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Create symbolic links in /usr/bin to mg5 and mg5_aMC
mkdir -p "${pkgdir}/usr/bin"
- ln -s "/usr/share/${pkgname}/bin/mg5" "${pkgdir}/usr/bin/"
- ln -s "/usr/share/${pkgname}/bin/mg5_aMC" "${pkgdir}/usr/bin/"
+ ln -s "/opt/${pkgname}/bin/mg5" "${pkgdir}/usr/bin/"
+ ln -s "/opt/${pkgname}/bin/mg5_aMC" "${pkgdir}/usr/bin/"
# For some reason, a lot of files have executable flags. Change them back
# to non-executable (except for actual executables)
- find "${pkgdir}/usr/share/${pkgname}" -type f -print0 | xargs -0 chmod 644
- find "${pkgdir}/usr/share/${pkgname}" -type f -path "*/bin/*" -print0 | xargs -0 chmod 755
- chmod 755 "${pkgdir}/usr/share/${pkgname}/MadSpin/madspin"
+ find "${pkgdir}/opt/${pkgname}" -type f -print0 | xargs -0 chmod 644
+ find "${pkgdir}/opt/${pkgname}" -type f -path "*/bin/*" -print0 | xargs -0 chmod 755
+ chmod 755 "${pkgdir}/opt/${pkgname}/MadSpin/madspin"
echo ""
echo "If you use MadGraph, please cite:"
diff --git a/mg5_configuration.patch b/mg5_configuration.patch
new file mode 100644
index 000000000000..7457ba8b99dc
--- /dev/null
+++ b/mg5_configuration.patch
@@ -0,0 +1,82 @@
+--- b/MG5_aMC_v2_5_2/input/mg5_configuration.txt
++++ a/MG5_aMC_v2_5_2/input/mg5_configuration.txt
+@@ -45,11 +45,11 @@
+
+ #! Prefered WebBrower
+ #! If None: try to find one available on the system
+-# web_browser = None
++web_browser = xdg-open
+
+ #! Prefered PS viewer
+ #! If None: try to find one available on the system
+-# eps_viewer = None
++eps_viewer = xdg-open
+
+ #! Time allowed to answer question (if no answer takes default value)
+ #! 0: No time limit
+@@ -59,7 +59,7 @@
+ #! Defines the path to the pythia8 installation directory (i.e. the
+ #! on containing the lib, bin and include directories) .
+ #! If using a relative path, that starts from the mg5 directory
+-# pythia8_path = ./HEPTools/pythia8
++pythia8_path = /usr
+
+ #! MG5aMC_PY8_interface path
+ #! Defines the path of the C++ driver file that is used by MG5_aMC to
+@@ -75,14 +75,14 @@
+ #! WARNING: if Herwig7 has been installed with the bootstrap script,
+ #! then please set thepeg_path and hepmc_path to the same value as
+ #! hwpp_path
+-# hwpp_path =
+-# thepeg_path =
+-# hepmc_path =
++hwpp_path = /usr
++thepeg_path = /usr
++hepmc_path = /usr
+
+ #! Control when MG5 checks if he is up-to-date.
+ #! Enter the number of day between two check (0 means never)
+ #! A question is always asked before any update
+-# auto_update = 7
++auto_update = 0
+
+ ################################################################################
+ # INFO FOR MADEVENT / aMC@NLO
+@@ -140,15 +140,15 @@
+
+ #! Delphes Package
+ #! relative path start from main directory
+-# delphes_path = ./Delphes
++delphes_path = /usr
+
+ #! MadAnalysis4 fortran-based package [for basic analysis]
+ #! relative path start from main directory
+-# madanalysis_path = ./MadAnalysis
++madanalysis_path = /usr
+
+ #! MadAnalysis5 python-based Package [For advanced analysis]
+ #! relative path start from main directory
+-# madanalysis5_path = ./HEPTools/madanalysis5/madanalysis5
++madanalysis5_path = /usr
+
+ #! ExRootAnalysis Package
+ #! relative path start from main directory
+@@ -157,15 +157,15 @@
+ #! TOPDRAWER PATH
+ #! Path to the directory containing td executables
+ #! relative path start from main directory
+-# td_path = ./td
++td_path = td
+
+ #! lhapdf-config
+ #! If None: try to find one available on the system
+-# lhapdf = lhapdf-config
++lhapdf = lhapdf-config
+
+ #! fastjet-config
+ #! If None: try to find one available on the system
+-# fastjet = fastjet-config
++fastjet = fastjet-config
+
+ #! MCatNLO-utilities
+ #! relative path starting from main directory
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 000000000000..929195188452
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,530 @@
+diff --git a/MG5_aMC_v2_5_2/MadSpin/decay.py b/MG5_aMC_v2_5_2/MadSpin/decay.py
+index 4416b16..b87415a 100755
+--- a/MG5_aMC_v2_5_2/MadSpin/decay.py
++++ b/MG5_aMC_v2_5_2/MadSpin/decay.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ from __future__ import division
+
+diff --git a/MG5_aMC_v2_5_2/MadSpin/madspin b/MG5_aMC_v2_5_2/MadSpin/madspin
+index 7e36857..b6becb4 100755
+--- a/MG5_aMC_v2_5_2/MadSpin/madspin
++++ b/MG5_aMC_v2_5_2/MadSpin/madspin
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/LO/bin/generate_events b/MG5_aMC_v2_5_2/Template/LO/bin/generate_events
+index d01b4a7..925393e 100755
+--- a/MG5_aMC_v2_5_2/Template/LO/bin/generate_events
++++ b/MG5_aMC_v2_5_2/Template/LO/bin/generate_events
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/Template/LO/bin/internal/Gridpack/gridrun b/MG5_aMC_v2_5_2/Template/LO/bin/internal/Gridpack/gridrun
+index ff6b8c3..3ee293b 100755
+--- a/MG5_aMC_v2_5_2/Template/LO/bin/internal/Gridpack/gridrun
++++ b/MG5_aMC_v2_5_2/Template/LO/bin/internal/Gridpack/gridrun
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/LO/bin/internal/addmasses_optional.py b/MG5_aMC_v2_5_2/Template/LO/bin/internal/addmasses_optional.py
+index 10e6f64..a2f3a16 100755
+--- a/MG5_aMC_v2_5_2/Template/LO/bin/internal/addmasses_optional.py
++++ b/MG5_aMC_v2_5_2/Template/LO/bin/internal/addmasses_optional.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python2
+ #
+ # doubleswitch.py
+ # Author: Stephen Mrenna
+diff --git a/MG5_aMC_v2_5_2/Template/LO/bin/madevent b/MG5_aMC_v2_5_2/Template/LO/bin/madevent
+index 14985c3..1296796 100755
+--- a/MG5_aMC_v2_5_2/Template/LO/bin/madevent
++++ b/MG5_aMC_v2_5_2/Template/LO/bin/madevent
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/Info.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/Info.py
+index 92b0e81..99f497f 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/Info.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/Info.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ def giveInfo(class_):
+ if type(class_)!=str:
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/clean.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/clean.py
+index 64a4e35..59d1899 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/clean.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/clean.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/expand_MadWeight.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/expand_MadWeight.py
+index abe4909..35ab543 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/expand_MadWeight.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/expand_MadWeight.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ # Module
+ import string
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/madweight.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/madweight.py
+index 953800d..4dcd048 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/madweight.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/madweight.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ # idea have 2 script
+ # madweight.py -> direct submission
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/put_banner.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/put_banner.py
+index a6a06b8..b0f1ef8 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/put_banner.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/put_banner.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MG/ME/MW ##
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/splitbanner.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/splitbanner.py
+index a425a1a..f0e4c4e 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/splitbanner.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/splitbanner.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/Python/tests.py b/MG5_aMC_v2_5_2/Template/MadWeight/Python/tests.py
+index f5c4731..1154bc6 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/Python/tests.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/Python/tests.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ####################################################################################################
+ ####################################################################################################
+ ## ##
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/bin/madweight.py b/MG5_aMC_v2_5_2/Template/MadWeight/bin/madweight.py
+index c8ac32a..c7247bb 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/bin/madweight.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/bin/madweight.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2011 The MadGraph Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/bin/mw_options b/MG5_aMC_v2_5_2/Template/MadWeight/bin/mw_options
+index 4a28be1..b98d018 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/bin/mw_options
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/bin/mw_options
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/check_model.py b/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/check_model.py
+index 8e80f6a..a8a2d26 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/check_model.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/check_model.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ #test
+
+diff --git a/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/mod_file.py b/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/mod_file.py
+index d95cf20..444933a 100755
+--- a/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/mod_file.py
++++ b/MG5_aMC_v2_5_2/Template/MadWeight/mod_file/mod_file.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ #Extension
+ import string
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/Utilities/NLO_Born3.py b/MG5_aMC_v2_5_2/Template/NLO/Utilities/NLO_Born3.py
+index dbb8173..c5edaf1 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/Utilities/NLO_Born3.py
++++ b/MG5_aMC_v2_5_2/Template/NLO/Utilities/NLO_Born3.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ inp = open('./MADatNLO.top', 'r')
+ out = open('./MADatNLO_combined.top', 'w')
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/resum_reweighter.py b/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/resum_reweighter.py
+index f7ba469..fb604a6 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/resum_reweighter.py
++++ b/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/resum_reweighter.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/virt_reweighter.py b/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/virt_reweighter.py
+index 87a75fa..a5eaa77 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/virt_reweighter.py
++++ b/MG5_aMC_v2_5_2/Template/NLO/Utilities/VetoPrefactors/virt_reweighter.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/bin/aMCatNLO b/MG5_aMC_v2_5_2/Template/NLO/bin/aMCatNLO
+index e1a347f..88fd730 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/bin/aMCatNLO
++++ b/MG5_aMC_v2_5_2/Template/NLO/bin/aMCatNLO
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/bin/calculate_xsect b/MG5_aMC_v2_5_2/Template/NLO/bin/calculate_xsect
+index 5000f2a..2616864 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/bin/calculate_xsect
++++ b/MG5_aMC_v2_5_2/Template/NLO/bin/calculate_xsect
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/bin/generate_events b/MG5_aMC_v2_5_2/Template/NLO/bin/generate_events
+index 7302c07..57f68b8 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/bin/generate_events
++++ b/MG5_aMC_v2_5_2/Template/NLO/bin/generate_events
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/bin/internal/split_jobs.py b/MG5_aMC_v2_5_2/Template/NLO/bin/internal/split_jobs.py
+index 0b50e56..7af39a1 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/bin/internal/split_jobs.py
++++ b/MG5_aMC_v2_5_2/Template/NLO/bin/internal/split_jobs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # MZ, 2012-06-14
+ import os
+ import sys
+diff --git a/MG5_aMC_v2_5_2/Template/NLO/bin/shower b/MG5_aMC_v2_5_2/Template/NLO/bin/shower
+index 5bde455..065565b 100755
+--- a/MG5_aMC_v2_5_2/Template/NLO/bin/shower
++++ b/MG5_aMC_v2_5_2/Template/NLO/bin/shower
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/aloha/bin/aloha b/MG5_aMC_v2_5_2/aloha/bin/aloha
+index 2fe8b10..e3b177a 100755
+--- a/MG5_aMC_v2_5_2/aloha/bin/aloha
++++ b/MG5_aMC_v2_5_2/aloha/bin/aloha
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+
+ import sys
+diff --git a/MG5_aMC_v2_5_2/bin/mg5 b/MG5_aMC_v2_5_2/bin/mg5
+index f31c620..f3891c9 100755
+--- a/MG5_aMC_v2_5_2/bin/mg5
++++ b/MG5_aMC_v2_5_2/bin/mg5
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/bin/mg5_aMC b/MG5_aMC_v2_5_2/bin/mg5_aMC
+index ca52873..2919edd 100755
+--- a/MG5_aMC_v2_5_2/bin/mg5_aMC
++++ b/MG5_aMC_v2_5_2/bin/mg5_aMC
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ ################################################################################
+ #
+diff --git a/MG5_aMC_v2_5_2/madgraph/iolibs/gen_infohtml.py b/MG5_aMC_v2_5_2/madgraph/iolibs/gen_infohtml.py
+index 52acde6..2bdd639 100755
+--- a/MG5_aMC_v2_5_2/madgraph/iolibs/gen_infohtml.py
++++ b/MG5_aMC_v2_5_2/madgraph/iolibs/gen_infohtml.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/madgraph/iolibs/template_files/loop_optimized/check_sa.py.inc b/MG5_aMC_v2_5_2/madgraph/iolibs/template_files/loop_optimized/check_sa.py.inc
+index 3cfd62a..c94e924 100644
+--- a/MG5_aMC_v2_5_2/madgraph/iolibs/template_files/loop_optimized/check_sa.py.inc
++++ b/MG5_aMC_v2_5_2/madgraph/iolibs/template_files/loop_optimized/check_sa.py.inc
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+
+ # This is an example of how to run MadLoop from Python using the f2py compilation of the wrapper file 'f2py_wrapper.f'.
+
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/Cards.py b/MG5_aMC_v2_5_2/madgraph/madweight/Cards.py
+index 1c949db..70605e4 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/Cards.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/Cards.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/MW_driver.py b/MG5_aMC_v2_5_2/madgraph/madweight/MW_driver.py
+index 0796670..664347d 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/MW_driver.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/MW_driver.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ # Copyright (c) 2012 The MadGraph Development team and Contributors
+ #
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/MW_info.py b/MG5_aMC_v2_5_2/madgraph/madweight/MW_info.py
+index acaa43d..20592e6 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/MW_info.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/MW_info.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/blob_solution.py b/MG5_aMC_v2_5_2/madgraph/madweight/blob_solution.py
+index 571b420..660d778 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/blob_solution.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/blob_solution.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ try:
+ import madgraph.madweight.particle_class as particle_class
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/change_tf.py b/MG5_aMC_v2_5_2/madgraph/madweight/change_tf.py
+index 4717715..f1b6e7c 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/change_tf.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/change_tf.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ #Extension
+
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/create_param.py b/MG5_aMC_v2_5_2/madgraph/madweight/create_param.py
+index f8fbb43..b80a490 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/create_param.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/create_param.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/create_run.py b/MG5_aMC_v2_5_2/madgraph/madweight/create_run.py
+index 2fa5a6d..49b76ef 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/create_run.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/create_run.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ #Extension
+ import string,os,sys,re,popen2,time,stat,filecmp
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/diagram_class.py b/MG5_aMC_v2_5_2/madgraph/madweight/diagram_class.py
+index 1e35e71..96a45b1 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/diagram_class.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/diagram_class.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import sys
+ import logging
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/mod_file.py b/MG5_aMC_v2_5_2/madgraph/madweight/mod_file.py
+index 5b3242f..4fb0a0c 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/mod_file.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/mod_file.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ####################################################################################################
+ ####################################################################################################
+ ## ##
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/substructure_class.py b/MG5_aMC_v2_5_2/madgraph/madweight/substructure_class.py
+index 370ee1f..3affadf 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/substructure_class.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/substructure_class.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+
+ try:
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/verif_event.py b/MG5_aMC_v2_5_2/madgraph/madweight/verif_event.py
+index 0882a96..224d17a 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/verif_event.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/verif_event.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##########################################################################
+ ## ##
+ ## MadWeight ##
+diff --git a/MG5_aMC_v2_5_2/madgraph/madweight/write_MadWeight.py b/MG5_aMC_v2_5_2/madgraph/madweight/write_MadWeight.py
+index 9596b17..10f2feb 100755
+--- a/MG5_aMC_v2_5_2/madgraph/madweight/write_MadWeight.py
++++ b/MG5_aMC_v2_5_2/madgraph/madweight/write_MadWeight.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ##### -*- coding: cp1252 -*-
+
+ #Extension
+diff --git a/MG5_aMC_v2_5_2/madgraph/various/combine_plots.py b/MG5_aMC_v2_5_2/madgraph/various/combine_plots.py
+index 34311e4..0e0ad7d 100755
+--- a/MG5_aMC_v2_5_2/madgraph/various/combine_plots.py
++++ b/MG5_aMC_v2_5_2/madgraph/various/combine_plots.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2013 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/madgraph/various/histograms.py b/MG5_aMC_v2_5_2/madgraph/various/histograms.py
+index ff61dd1..3e5748b 100755
+--- a/MG5_aMC_v2_5_2/madgraph/various/histograms.py
++++ b/MG5_aMC_v2_5_2/madgraph/various/histograms.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2010 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/madgraph/various/plot_djrs.py b/MG5_aMC_v2_5_2/madgraph/various/plot_djrs.py
+index c0fb743..30fcfbc 100644
+--- a/MG5_aMC_v2_5_2/madgraph/various/plot_djrs.py
++++ b/MG5_aMC_v2_5_2/madgraph/various/plot_djrs.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2010 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/madgraph/various/progressbar.py b/MG5_aMC_v2_5_2/madgraph/various/progressbar.py
+index 2f1bc4d..eaeae7d 100755
+--- a/MG5_aMC_v2_5_2/madgraph/various/progressbar.py
++++ b/MG5_aMC_v2_5_2/madgraph/various/progressbar.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python2
+ # -*- coding: iso-8859-1 -*-
+ #
+ # progressbar - Text progressbar library for python.
+diff --git a/MG5_aMC_v2_5_2/tests/parallel_tests/loop_sample_script.py b/MG5_aMC_v2_5_2/tests/parallel_tests/loop_sample_script.py
+index 1ee58f4..4fc64b5 100755
+--- a/MG5_aMC_v2_5_2/tests/parallel_tests/loop_sample_script.py
++++ b/MG5_aMC_v2_5_2/tests/parallel_tests/loop_sample_script.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/tests/parallel_tests/sample_script.py b/MG5_aMC_v2_5_2/tests/parallel_tests/sample_script.py
+index 2be23d9..ff11bf9 100755
+--- a/MG5_aMC_v2_5_2/tests/parallel_tests/sample_script.py
++++ b/MG5_aMC_v2_5_2/tests/parallel_tests/sample_script.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/tests/test_manager.py b/MG5_aMC_v2_5_2/tests/test_manager.py
+index 7b46b85..dc62fc1 100755
+--- a/MG5_aMC_v2_5_2/tests/test_manager.py
++++ b/MG5_aMC_v2_5_2/tests/test_manager.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ################################################################################
+ #
+ # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
+diff --git a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/create.py b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/create.py
+index d14ce98..fb4fab2 100755
+--- a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/create.py
++++ b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/create.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import re,string,os,sys,subprocess
+ locdir,thisFile = os.path.split(os.path.abspath(sys.argv[0]))
+ srcdir = os.path.join(locdir,'src')
+diff --git a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/example_cpp/create.py b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/example_cpp/create.py
+index fca7438..820cce8 100755
+--- a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/example_cpp/create.py
++++ b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/example_cpp/create.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import re,string,os,sys,subprocess
+ locdir,thisFile = os.path.split(os.path.abspath(sys.argv[0]))
+ srcdir = os.path.join(locdir,'src')
+diff --git a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_olo.py b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_olo.py
+index 438f55a..c3fbcbb 100755
+--- a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_olo.py
++++ b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_olo.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import re,sys
+ import avh_pc_olo
+
+diff --git a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_pc_exe.py b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_pc_exe.py
+index 150e4c0..f372e43 100755
+--- a/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_pc_exe.py
++++ b/MG5_aMC_v2_5_2/vendor/IREGI/src/oneloop/src/avh_pc_exe.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import sys
+ import avh_pc