From e6a1ab9cf306ca34d43b9e196f2573edb0a6c416 Mon Sep 17 00:00:00 2001 From: Carwyn Pelley Date: Thu, 23 May 2013 14:41:19 +0100 Subject: BUG: f2py script shebang may refer to wrong python The f2py executable has a shebang which uses the default python, rather than the python it was compiled for. This causes issues for deployment of numpy (+f2py) across systems which have different environments. This fix uses sys.executable to determine the resulting hardcoded python to use. --- numpy/f2py/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/f2py') diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py index 1fae54531..96a047ec7 100644 --- a/numpy/f2py/setup.py +++ b/numpy/f2py/setup.py @@ -53,7 +53,7 @@ def configuration(parent_package='',top_path=None): log.info('Creating %s', target) f = open(target,'w') f.write('''\ -#!/usr/bin/env %s +#!%s # See http://cens.ioc.ee/projects/f2py2e/ import os, sys for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]: @@ -77,7 +77,7 @@ else: sys.stderr.write("Unknown mode: " + repr(mode) + "\\n") sys.exit(1) main() -'''%(os.path.basename(sys.executable))) +'''%(sys.executable)) f.close() return target -- cgit v1.2.1