diff options
author | Carwyn Pelley <cpelley.pub@gmail.com> | 2013-05-23 14:41:19 +0100 |
---|---|---|
committer | Carwyn Pelley <cpelley.pub@gmail.com> | 2013-05-23 16:56:00 +0100 |
commit | e6a1ab9cf306ca34d43b9e196f2573edb0a6c416 (patch) | |
tree | 4f1af50b2c054d40da2c4e1fad3ef9257390bb3d /numpy/f2py/setup.py | |
parent | daf4b40e3f2c53f5487d8721e28f5a9339d45573 (diff) | |
download | numpy-e6a1ab9cf306ca34d43b9e196f2573edb0a6c416.tar.gz |
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.
Diffstat (limited to 'numpy/f2py/setup.py')
-rw-r--r-- | numpy/f2py/setup.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |