I have a need to make use of Chromium's Compact Language Detector library within a Python script.
AFAIK, there are two projects that leverage this library, but I have been having troubles with getting either of them set up on a Windows 7 machine.
I had some similar problems with Mike McCandless Original Project (GoogleCode), but I then spotted Matt Sanford fork on the same Project (github). For the purpose of this question, I will focus on Matts project, as it seems to have been updated more often (but happy to get an answer that works for either project).
- Downloaded the project as a zip, and extracted to my local drive.
- Ran vcvarsall.bat from CMD
- Then ran the build.win.cmd batch file. This ran ok.
- Copied the resulting libcld.lib to ports/python/cld.lib
Tried running the setup.py but it returns with the following against line 12.
exceptions.TypeError: init() keywords must be strings
++EDIT++ Found this issue:
setup.py fails on Windows. The hackish solution to fix this is to make pkgconfig return the dict {'define_macros': [('WIN32',None)], 'libraries': packages}
Im a bit of a rookie, but not entirely sure on the steps to implement this hack. Can anyone give me some slightly more verbose steps?