[liblouis-liblouisxml] Re: Installing Python Bindings on Windows

  • From: "Jake Kyle" <jake@xxxxxxxxxxxxxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Tue, 9 May 2017 09:51:34 +0100

Hi Christian

Thank you for your response.
OK so now using MinGW I can run the configure script and that seems to work fine.

Then I run make and I get this output:

Making all in louis
make[1]: Entering directory `/c/liblouis-3.1.0/python/louis'
source ../../liblouis/liblouis.la ; \
       sed "s/###LIBLOUIS_SONAME###/$dlname/" \
               < ./__init__.py.in \
               > __init__.py
/bin/sh: ../../liblouis/liblouis.la: No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/c/liblouis-3.1.0/python/louis'
make: *** [all-recursive] Error 1

"__init__.py.in" is still in louis directory but no "__init__.py". And if I run setup.py install I get:

Traceback (most recent call last):
 File "setup.py", line 41, in <module>
   version=louis.version().split(',')[0].split('-',1)[-1],
AttributeError: module 'louis' has no attribute 'version'

Thank you for any help and excuse my ignorance in these matters!

Jake



-----Original Message----- From: Christian Egli
Sent: Monday, May 8, 2017 10:39 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Installing Python Bindings on Windows

On 05/04/2017 03:08 PM, Jake Kyle wrote:

Hello,

I have been trying to install the Python bindings on my Windows machine
but have had no success. Please can somebody give me some directions?
The instructions in the python/README file are not working for me as
they stand.

What is not working?

I read in this post from 2009 that the first step for Windows is to use
autotools in order to obtain the __init__.py file which is needed by
setup.py:
https://www.freelists.org/post/liblouis-liblouisxml/Problems-with-Python-bindings-on-Win32,1

I presume that autotools uses the __init__.py.in (note the extra “in”
extension) file, that comes with the downloaded liblouis package located
in the python/louis directory, to generate this?

Yes it does. `Make` will insert the correct so name in the `setup.py`
file. It uses sed for that. There was a discussion on the motivation for
this by James Teh on the mailing list way back.

I have tried this by installing MinGW on my machine in order to use
autotools but have had no success generating the __init__.py file.

What is the exact problem?

If you use the tar ball from
https://github.com/liblouis/liblouis/releases you should only need a
bash afaik to run the configure script.

--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland


-----
Tag der offenen Tuer "Eine Reise durch die Schweiz"
Die SBS laedt Sie herzlich ein: 24. Juni 2017 von 9 bis 16 Uhr.
Mehr Informationen erhalten Sie unter www.sbs.ch/offenetuer
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: