Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21239 - [python-numpy] PKGBUILD - error on ER

Attached to Project: Arch Linux
Opened by Robson Roberto Souza Peixoto (robsonpeixoto) - Wednesday, 13 October 2010, 20:33 GMT
Last edited by Ionut Biru (wonder) - Sunday, 17 October 2010, 22:53 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Angel Velasquez (angvp)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I got the package on http://archlinux.c3sl.ufpr.br/testing/os/x86_64/python-numpy-1.5.0-1-x86_64.pkg.tar.xz and extract. When I did a ''grep -rin 'usr/bin/env python' .'' I found it:

./lib/python2.7/site-packages/numpy/tools/py3tool.py:1:#!/usr/bin/env python23

This ER solve the problem.

find $pkgdir -name '*.py' -exec sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"\
{} \;

And with the ER used actually on PKGBUILD is impossible be used on python-2.6.5, as you can see:

sed: can't read /home/robinho/tmp/arch/pkg/usr/lib/python2.7/site-packages/numpy/*.py: No such file or directory
sed: can't read /home/robinho/tmp/arch/pkg/usr/lib/python2.7/site-packages/numpy/*/*.py: No such file or directory
sed: can't read /home/robinho/tmp/arch/pkg/usr/lib/python2.7/site-packages/numpy/*/*/*.py: No such file or directory
sed: can't read /home/robinho/tmp/arch/pkg/usr/lib/python2.7/site-packages/numpy/*/*/*/*.py: No such file or directory

I don't know why, but using this PKGBUILD http://pastie.org/private/fgdzkqkdn0tvragmq4zjg, on usr/bin there are 2 scripts: f2py2 and f2py. Because it, a did this ER:

find $pkgdir/usr/bin -exec sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"\
{} \;


Maybe putting the '[ ]*' to grantee the ER will check the spaces after the python and python2 is good!
But, is need be careful when are using 's@env python@env python2@', because it can change "env python3" to "env python23"

Thanks
This task depends upon

Closed by  Ionut Biru (wonder)
Sunday, 17 October 2010, 22:53 GMT
Reason for closing:  Fixed
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 13 October 2010, 22:14 GMT
  • Field changed: Summary ([PKGBUILD] python-numpy - error on ER → [python-numpy] PKGBUILD - error on ER)
I can not find PKGBUILD package :P
Comment by Robson Roberto Souza Peixoto (robsonpeixoto) - Thursday, 14 October 2010, 10:59 GMT Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 16 October 2010, 02:39 GMT
@Robert: no was just a "joke", when I renamed the task to the correct title ;)
Comment by Robson Roberto Souza Peixoto (robsonpeixoto) - Saturday, 16 October 2010, 16:13 GMT
Sorry. rsrsrsrsrsrsrsrs
Comment by Ionut Biru (wonder) - Sunday, 17 October 2010, 20:15 GMT
fixed in 1.5.0-2. now we have
usr/lib/python2.7/site-packages/numpy/tools/py3tool.py:#!/usr/bin/env python3

this is right in my opinion since is used to convert to python3
Comment by Robson Roberto Souza Peixoto (robsonpeixoto) - Sunday, 17 October 2010, 22:52 GMT
In 1.5.0-2 are working very well :D Thanks

Maybe is better rename the package from python-numpy to python2-numpy. The numpy started the support to python3 on 1.5 as you can see no file numpy-1.5.0/doc/release/1.5.0-notes.rst.
Python 3 compatibility [from the file]
----------------------

This is the first NumPy release which is compatible with Python 3. Support for
Python 3 and Python 2 is done from a single code base. Extensive notes on
changes can be found at
`<http://projects.scipy.org/numpy/browser/trunk/doc/Py3K.txt>`_.

Note that the Numpy testing framework relies on nose, which does not have a
Python 3 compatible release yet. A working Python 3 branch of nose can be found
at `<http://bitbucket.org/jpellerin/nose3/>`_ however.

Porting of SciPy to Python 3 is expected to be completed soon.
Comment by Ionut Biru (wonder) - Sunday, 17 October 2010, 22:53 GMT
not now.

Loading...