Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308261 - app-accessibility/orca: Verify and potentially improve Python-related code
Summary: app-accessibility/orca: Verify and potentially improve Python-related code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Highest normal (vote)
Assignee: Gnome Accessibility (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on: 309041 309045
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-07 16:52 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2010-10-17 18:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
orca-2.28.3.ebuild.patch (orca-2.28.3.ebuild.patch,1.70 KB, patch)
2010-03-11 19:42 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
orca.ebuild.diff (orca.ebuild.diff,1.51 KB, text/plain)
2010-10-11 22:32 UTC, Pacho Ramos
Details
orca.py (orca.py,78.72 KB, text/plain)
2010-10-16 15:40 UTC, Pacho Ramos
Details
/usr/bin/orca (orca,6.86 KB, text/plain)
2010-10-17 16:56 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-07 16:52:58 UTC
- If this package could support installation for multiple versions of Python,
  then please try to adjust the ebuilds to support it.
- Ensure that the ebuilds do not use deprecated functions or variables.
- Please check if Python 3 is supported by this package.
- If this package does not support Python 3:
  - Specify dependency on Python 2.
    You can use PYTHON_DEPEND helper variable, which should be set before
    inheriting of python eclass.
  - If this package cannot support installation for multiple versions of
    Python, then set active version of Python using
    python_set_active_version().
  - Ensure that shebangs in installed scripts specify correct version of
    Python. If shebangs are too generic (e.g. '#!/usr/bin/python'), then you
    can use python_convert_shebangs() to convert shebangs.
    (Wrapper scripts generated by python_generate_wrapper_scripts() do not
    require any changes.)

Please see documentation [1] for more details.
[1] http://www.gentoo.org/proj/en/Python/developersguide.xml
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-11 19:42:32 UTC
Created attachment 223197 [details, diff]
orca-2.28.3.ebuild.patch

I'm attaching not tested patch, which probably works correctly.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-11 19:43:54 UTC
Dependencies of app-accessibility/orca need to be fixed first.
Comment 3 Pacho Ramos gentoo-dev 2010-10-11 22:32:36 UTC
Created attachment 250281 [details]
orca.ebuild.diff

Hello Arfrever

I am trying to fix these python bugs while bumping Gnome 2.32 but I have seen I am unable to make orca work on a system with python3.1 as main python interpreter.

Even running "python_convert_shebangs -r 2 ." in src_prepare doesn't fix the problem (like it does with accerciser), and I still get the following error at runtime:

$ orca 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/orca/orca.py", line 1950
    print msg
            ^
SyntaxError: invalid syntax

If you know how to handle this, please tell me what to do.

Thanks a lot :-)
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-15 21:25:37 UTC
Maybe "orca" script is generated later, so check if calling python_convert_shebangs() in src_install() helps. If it doesn't help, then please attach "orca" script.
Comment 5 Pacho Ramos gentoo-dev 2010-10-16 15:40:34 UTC
Created attachment 250871 [details]
orca.py

orca.py is already present on "fresh" upstream sources, I attach it
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-16 15:53:44 UTC
I meant "orca", not "orca.py".
Comment 7 Pacho Ramos gentoo-dev 2010-10-17 16:46:02 UTC
(In reply to comment #4)
> Maybe "orca" script is generated later, so check if calling
> python_convert_shebangs() in src_install() helps. If it doesn't help, then
> please attach "orca" script.
> 

That neither works :-(
Comment 8 Pacho Ramos gentoo-dev 2010-10-17 16:56:42 UTC
Created attachment 251039 [details]
/usr/bin/orca
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-17 17:06:53 UTC
(In reply to comment #8)

runOrca() function needs to be fixed.
sed -e "s:/usr/bin/python:$(PYTHON -a):" ...
Comment 10 Pacho Ramos gentoo-dev 2010-10-17 17:18:33 UTC
(In reply to comment #9)
> (In reply to comment #8)
> 
> runOrca() function needs to be fixed.
> sed -e "s:/usr/bin/python:$(PYTHON -a):" ...
> 

It's is being generated from orca.in that has the following:

runOrca()
{
    exec_prefix=@prefix@
    PYTHONPATH=${PYTHONPATH}:@pyexecdir@
    export PYTHONPATH
    saveXmodmap
    @PYTHON@ -c "import orca.orca; orca.orca.main()" "$ARGS"
    restoreXmodmap
}

Maybe it should look different to properly detect python version? :-/
Comment 11 Pacho Ramos gentoo-dev 2010-10-17 18:23:32 UTC
Fixed in 2.32, thanks a lot Arfrever