I've already updated my build system, please update yours and fix / verify the build instructions:
lzo-2.09\src\.libs\liblzo2.a
to the root directory lzo-2.09
so it can be found more easily
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")) else: libraries = ["lzo2"] include_dirs.append("/usr/include/lzo") ##library_dirs.append("/usr/local/lib")
C:\Python27\Python.exe setup.py install
These instructions worked fine for me for building and installing but i'm having this issue importing this module in python
C:\src\python-lzo-1.08>python Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi n32 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?
First, you should be doing this with python-lzo-1.09 not 1.08.
DLL load issued can usually be investigated with depends.exe
Used python-lzo-1.09 and now it imports no problem.
Instructions work.
@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)
Note: the 1.10 package shows up as 1.09... see https://github.com/jd-boyd/python-lzo/issues/13
The bug has been fixed: https://pypi.python.org/pypi/python-lzo/1.11
Applied to the jhbuild moduleset in r11754, submitted upstream: https://github.com/jd-boyd/python-lzo/issues/14.
win32 still needs doing by hand..
Update to 1.12 in r19509 for macos, win32 still done by hand...
for building lzo 1.12 with mingw paths
With the patch above:
LZO_DIR=/mingw64 python3 ./setup.py build
Created a pull request for mingw: add python-lzo.
The pull request has been merged, now we can just install it via pacman: r26342.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1044