I've spent a couple of days getting going with BT's Web21C SDK. I started on Windows trying to get Python going, switching to Ubuntu a couple of times in the middle. In the end I gave up, and switched to PHP on Ubuntu. The latter hardly took any time to get working. I had planned to document how I got the python working from my notes, but seeing as I didn't I've just kept my notes here in case it helps someone else. I couldn't believe the hoops I had to go through, modifying source code for python modules, installing lots and lots of software.
Using python:
download python tools
python setup.py
See EasyInstall
Watch where it says it's install it to then add to path:
set path=%path%;c:\program files\python\scripts
easy_install zsi
to run actual programmodify sample, remove previous sys.path.insert and put this before import service
sys.path.insert(0, '../build/lib/btsdk')
says it needs other stuff:
Download (non-light) SSL from http://www.slproweb.com/products/Win32OpenSSL.html
and MSVC runtime from
http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
and then run certs-utility.bat
Gave up on WIndows ssl ( openssl ordinal 3288 error message), used Ubuntu.
Then did last step in Python, but need to install M2Crypto,
for which you need .net framework sdk 1.1
and swig (swig.org)
add swig dir to path
copy open ssl includes to python include
error: Setup script exited with error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler
, but it isn't installed.
AARGH!
see http://peak.telecommunity.com/DevCenter/PackageNotes
create distutils.cfg file
command gcc failed
(diverted to linux but that failed because couldn't find pyconfig.h when trying to get ZSI installed - which works on windows)
Off to http://sourceware.org/cygwin/
guess that I just need the "developer" package, though could probably do with less as that took ages to install.
added c:\cygwin\bin to the path
replace regexp in distutils\version.py line 100 with this
version_re = re.compile(r'(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?',
re.VERBOSE)
copy openssl\lib\*.lib to python\scripts
gave up
found this:
(this may be helpful http://www.gooli.org/blog/building-m2crypto-on-windows/)
command given didn't work, but used this
python setup.py build_ext -I\localcopyofincludeDirectoryBecauseBuildingOnANetworkDriveAndYouCan'tSpecifyADifferent drive letter --openssl=c:\progra~1\openssl
python setup.py install (bdist_wininst thought it wasn't running on win32)
copy m2crypto-0.18.2\build\lib.cygwin-1.5.25-i686-2.5\m2crypto to site-packages under python
write program instead of running last line of setup batch file:
import pkg_resources
pkg_resources.require("zsi")
from btsdk import utility
utility.save_key_password()
cygwin complains about crypto dll even though it's there
add c:\cygwin\bin to path
complains about incompatible cygwin1.dll
1 comment:
Thanks for your contribution to the WeAreMedia Wiki
Post a Comment