After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561452 - [pending] Factor out included "louis" C extension.
[pending] Factor out included "louis" C extension.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: braille
unspecified
Other Linux
: Normal normal
: 2.28.0
Assigned To: Willie Walker
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-19 00:47 UTC by Eitan Isaacson
Modified: 2009-11-09 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (24.00 KB, patch)
2009-01-12 12:02 UTC, Eitan Isaacson
reviewed Details | Review
Updated patch (23.93 KB, patch)
2009-05-26 00:34 UTC, Willie Walker
none Details | Review
Patch committed (25.14 KB, patch)
2009-06-16 15:37 UTC, Willie Walker
committed Details | Review

Description Eitan Isaacson 2008-11-19 00:47:02 UTC
We are currently in the process of putting the liblouis python bindings upstream with liblouis. They are ctype bindings, you could see them at:
http://code.google.com/p/liblouis/source/browse/#svn/branches/python

There are some tricky stuff that needs to be moved around, specifically the table discovery and listing functionality, this should be moved into Orca-proper.
Comment 1 Eitan Isaacson 2009-01-12 12:02:09 UTC
Created attachment 126264 [details] [review]
patch

This patch removes the included bindings, puts some of the added functionality we had into braille.py, this includes translatable strings.

It works with the "python" branch in the liblouis SVN repo.

I plan to get the python bindings merged into liblouis trunk very soon. If we could get a liblouis release out soon too, I think these changes should be considered.
Comment 2 Willie Walker 2009-01-13 21:51:30 UTC
(In reply to comment #1)
> I plan to get the python bindings merged into liblouis trunk very soon. If we
> could get a liblouis release out soon too, I think these changes should be
> considered.

Sounds good to me.  The thing we risk is that people using the old liblouis stuff will end up not having liblouis support with Orca, but I think it might be safe to tell them to upgrade once your new release is out.

Thanks!
Comment 3 Willie Walker 2009-03-22 15:34:35 UTC
In looking at this some more, it turns out the liblouis Python bindings depend upon the presence of the Python ctypes module.  The ctypes module has limited availability (e.g., it's not in Python 2.4 for example), so this might be a risky dependency.
Comment 4 Willie Walker 2009-03-30 00:07:07 UTC
(In reply to comment #3)
> In looking at this some more, it turns out the liblouis Python bindings depend
> upon the presence of the Python ctypes module.  The ctypes module has limited
> availability (e.g., it's not in Python 2.4 for example), so this might be a
> risky dependency.

As an FYI, I believe OpenSolaris 2009.06 will include ctypes for 2.4.  It's in
OpenSolaris starting with build 110.  The package is called SUNWpython24-ctypes.  So, I could potentially update the spec-files-extra spec-file for liblouis to include a dependency on SUNWpython24-ctypes (http://pkgbuild.sourceforge.net/spec-files-extra/).

In addition, since the liblouis Python module is called 'louis' and the Orca Python module for liblouis is also called 'louis', we might need to make sure the code moving forward can detect the difference if *both* are installed on the machine and then use the right one.
Comment 5 Willie Walker 2009-05-26 00:34:00 UTC
Created attachment 135356 [details] [review]
Updated patch

This is an updated patch for the current source base, which has migrated to the BrlTTY python bindings.  It's not providing the desired behavior for me on OpenSolaris, but it might be that I'm building liblouis 1.6.0 improperly.

The patch includes this debugging statement (to be removed before checking the ultimate patch in):

print "CONTRACTION: mode=%d in='%s' out='%s'" % (mode, line, contracted)

What I'm noticing is that very little comes back to us in terms of the contracted line when using the US English Grade 2 braille (I know enough to recognize that it ain't Grade 2).

Eitan - does liblouis come with any tests to see if it is working properly?
Comment 6 Willie Walker 2009-06-12 00:25:41 UTC
(In reply to comment #5)
> Eitan - does liblouis come with any tests to see if it is working properly?

Eitan - ping?  :-)
Comment 7 Eitan Isaacson 2009-06-16 03:24:10 UTC
What output do you get when you run "python python/louis/__init__.py" from the liblouis source tree?

Did you configure with --enable-ucs4?
Comment 8 Eitan Isaacson 2009-06-16 03:35:48 UTC
I just tried the updated patch, and it seems to work well. I guess the next stage is a opensolaris vm?

Let me know if --enable-ucs4 is helpful.
Comment 9 Willie Walker 2009-06-16 12:42:27 UTC
(In reply to comment #8)
> I just tried the updated patch, and it seems to work well. I guess the next
> stage is a opensolaris vm?
> 
> Let me know if --enable-ucs4 is helpful.

I'll give it a shot.  We've been building with --disable-ucs4 because of this comment: http://bugzilla.gnome.org/show_bug.cgi?id=354470#c23
Comment 10 Willie Walker 2009-06-16 12:55:09 UTC
Hot off the presses when built with --enable-ucs4:

wwalker@opensolaris:~/work/liblouis-1.6.2$ python python/louis/__init__.py
1.6.2
(u',hello _w6', [0, 0, 1, 2, 3, 4, 5, 6, 6, 11], [1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 9], 6)

What does it mean?  Is it the Da Vinci Code?
Comment 11 Willie Walker 2009-06-16 13:16:49 UTC
(In reply to comment #8)
> I just tried the updated patch, and it seems to work well. I guess the next
> stage is a opensolaris vm?
> 
> Let me know if --enable-ucs4 is helpful.

Seemed to do the trick.  Out of curiosity, what changed to make us need to switch from --disable-ucs4 to --enable-ucs4?  Was is something in liblouis or do you think OpenSolaris changed?
Comment 12 Willie Walker 2009-06-16 15:37:23 UTC
Created attachment 136737 [details] [review]
Patch committed

This patch has been committed to master.  I also updated the OpenSolaris SFEliblouis.spec file to build/install liblouis 1.6.2 and its "louis" python module: http://pkgbuild.sourceforge.net/spec-files-extra/
Comment 13 Eitan Isaacson 2009-06-16 17:20:04 UTC
(In reply to comment #11)
> 
> Seemed to do the trick.  Out of curiosity, what changed to make us need to
> switch from --disable-ucs4 to --enable-ucs4?  Was is something in liblouis or
> do you think OpenSolaris changed?
> 

It seems like OpenSolaris is now building Python with 4 byte wide unicode characters as opposed to 2, which is the default. Most Linux distros use 4 byte wide unicode in Python too.
Comment 14 Willie Walker 2009-06-17 19:27:18 UTC
Marking this as pending.  The big issue is this: liblouis called their module 'louis', which is to be expected. This conflicts with the 'louis' module provided by Orca.

The net result is that if someone installs liblouis' 'louis' module, it will break Orca versions 2.27.3 and earlier.  I believe this is because those versions of Orca will end up picking up the liblouis module instead of the Orca module.