f2py: change shebang to /usr/bin/python

change shebang from /usr/bin/env to /usr/bin/<binary>
This commit is contained in:
Tomas Tomecek 2013-07-23 13:32:01 +02:00
parent b3a21292dc
commit 50857cbc43
2 changed files with 25 additions and 1 deletions

22
f2py-shebang.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py
index 1fae545..96a047e 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

View File

@ -18,6 +18,7 @@ Group: Development/Languages
License: BSD and Python
URL: http://numeric.scipy.org/
Source0: http://downloads.sourceforge.net/numpy/%{name}-%{version}%{?relc}.tar.gz
Patch1: f2py-shebang.patch
BuildRequires: python2-devel lapack-devel python-setuptools gcc-gfortran atlas-devel python-nose
Requires: python-nose
@ -83,7 +84,7 @@ This package includes a version of f2py that works properly with NumPy.
%prep
%setup -q -n %{name}-%{version}%{?relc}
%patch1 -p1
# workaround for rhbz#849713
# http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html
rm numpy/distutils/command/__init__.py && touch numpy/distutils/command/__init__.py
@ -246,6 +247,7 @@ popd &> /dev/null
* Tue Jul 30 2013 Tomas Tomecek <ttomecek@redhat.com> - 1:1.7.1-3
- Fix rpmlint warnings
- Update License
- Apply patch: change shebang of f2py to use binary directly
* Sun Jun 2 2013 Orion Poplawski <orion@nwra.com> - 1:1.7.1-2
- Specfile cleanup (bug #969854)