xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 5 years ago

Closed 5 years ago

Last modified 3 months ago

#1044 closed task (fixed)

python-lzo 2.09 for win32

Reported by: Antoine Martin Owned by: Smo
Priority: minor Milestone: 0.16
Component: platforms Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

I've already updated my build system, please update yours and fix / verify the build instructions:

  • build lzo-2.09 using mingw
  • copy lzo-2.09\src\.libs\liblzo2.a to the root directory lzo-2.09 so it can be found more easily
  • unpack python-lzo and patch it (I placed the source in E:\lzo):
    --- setup.py
    +++ setup.py
    @@ -20,13 +20,14 @@
         # Windows users have to configure the LZO_DIR path parameter to match
         # their LZO source installation.  The path set here is just an example
         # and thus unlikely to match your installation.
    -    LZO_DIR = r"c:\src\lzo-1.08"
    +    LZO_DIR = r"E:\lzo-2.09"
         if not os.path.exists(LZO_DIR):
             raise Exception("please set LZO_DIR to where the lzo source lives")
         include_dirs.append(os.path.join(LZO_DIR, "include"))
    -    extra_objects.append(os.path.join(LZO_DIR, "lzo.lib"))
    +    include_dirs.append(os.path.join(LZO_DIR, "include", "lzo"))
    +    extra_objects.append(os.path.join(LZO_DIR, "liblzo2.a"))
         libraries = ["lzo2"]
  • run C:\Python27\Python.exe setup.py install

Attachments (1)

lzo.patch (742 bytes) - added by totaamwin32 3 years ago.
for building lzo 1.12 with mingw paths

Download all attachments as: .zip

Change History (13)

comment:1 Changed 5 years ago by Smo

Owner: changed from Smo to Antoine Martin

These instructions worked fine for me for building and installing but i'm having this issue importing this module in python

Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi
Type "help", "copyright", "credits" or "license" for more information.
>>> import lzo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.

Any ideas?

comment:2 Changed 5 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Smo

First, you should be doing this with python-lzo-1.09 not 1.08.

DLL load issued can usually be investigated with depends.exe

comment:3 Changed 5 years ago by Smo

Resolution: fixed
Status: newclosed

Used python-lzo-1.09 and now it imports no problem.

Instructions work.

comment:4 Changed 5 years ago by Antoine Martin

@smo: python-lzo 1.10 is out: https://pypi.python.org/pypi/python-lzo/
(straightforward rebuild, r11693 + r11700 fixup adds it to the osx moduleset)

comment:5 Changed 5 years ago by Antoine Martin

Note: the 1.10 package shows up as 1.09... see https://github.com/jd-boyd/python-lzo/issues/13

comment:6 Changed 5 years ago by Antoine Martin

comment:7 Changed 5 years ago by Antoine Martin

Applied to the jhbuild moduleset in r11754, submitted upstream: https://github.com/jd-boyd/python-lzo/issues/14.

win32 still needs doing by hand..

comment:8 Changed 3 years ago by Antoine Martin

Update to 1.12 in r19509 for macos, win32 still done by hand...

Changed 3 years ago by totaamwin32

Attachment: lzo.patch added

for building lzo 1.12 with mingw paths

comment:9 Changed 3 years ago by totaamwin32

With the patch above:

LZO_DIR=/mingw64 python3 ./setup.py build

comment:10 Changed 12 months ago by Antoine Martin

Created a pull request for mingw: add python-lzo.

comment:11 Changed 12 months ago by Antoine Martin

The pull request has been merged, now we can just install it via pacman: r26342.

comment:12 Changed 3 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1044

Note: See TracTickets for help on using tickets.