Robot Framework, wxPython & OSX

NOTE: For the english version. See below.

Olen pinttynyt Mäkkimies. Myynyt sieluni jo vuosia sitten, voisi joku sanoa.

Halusin Robot Frameworkin ja asensin ohjeen mukaan. Mutta RIDE toimii helposti vain wxPythonin versiolla 2.8.12.1. Turhauduin, sillä virallinen wxPythonin paketti ei OSX:llä edes asennu. Sanoo, että paketti on vahingoittunut. ARGH!

Kävi ilmi, että OSX:n pakettimanageri on muuttunut eikä tue enää vanhoja filejä. Onneksi pgk -filen voi paketoida uudestaan. Oheisella videolla pääsin purkamaan tuntojani ja lupasin laittaa blogiin ohjeen homman hoitamiseksi komentoriviltä, joten here we go.

In case you’d prefer english: Robot Framework paired up with RIDE is easy to install on OSX by following the original installation instructions. There is just one problem that has not been documented. wxPython 2.8.12.1 is a component that is a must to run RIDE. New versions won’t do.

Latest OSX does not support old .pkg packages to install the necessary wxPython and the file needs to be repackaged to succeed. You can either download a file I have re-packaged or do it yourself by following these instructions.

DOWNLOAD HERE

This is how you repack a .pkg file on command line with OSX:

#Find your way into a directory of your choosing and follow these steps.
$ mkdir repack_wxpython
$ cd repack_wxpython

#Now you place the original .pkg -file of your choosing into the repack_wxpython directory on your computer.
$ mkdir pkg_root
$ cd pkg_root
$ pax -f ../wxPython2.8-osx-unicode-universal-py2.7.pkg/Contents/Resources/wxPython2.8-osx-unicode-universal-py2.7.pax.gz -z -r
$ cd ..
$ mkdir scripts
$ cp wxPython2.8-osx-unicode-universal-py2.7.pkg/Contents/Resources/preflight scripts/preinstall
$ cp wxPython2.8-osx-unicode-universal-py2.7.pkg/Contents/Resources/postflight scripts/postinstall
$ rm -r wxPython2.8-osx-unicode-universal-py2.7.pkg
$ pkgbuild --root ./pkg_root --scripts ./scripts --identifier com.wxwidgets.wxpython wxPython2.8-osx-unicode-universal-py2.7.pkg

#And this is what you should see as an output from the terminal.
pkgbuild: Inferring bundle components from contents of ./pkg_root
pkgbuild: Adding top-level preinstall script
pkgbuild: Adding top-level postinstall script
pkgbuild: Wrote package to wxPython2.8-osx-unicode-universal-py2.7.pkg