diff --git a/Python-3/nto-armv7.build b/Python-3/nto-armv7.build index 03d9654..67d9fa7 100755 --- a/Python-3/nto-armv7.build +++ b/Python-3/nto-armv7.build @@ -21,9 +21,9 @@ LDFLAGS="-Wl,-zrelro" \ CFLAGS="-D_QNX_SOURCE -DFD_SETSIZE=1024 -fstack-protector-all -g -mthumb" \ CXXFLAGS="-D_QNX_SOURCE -DFD_SETSIZE=1024 -fstack-protector-all -g -mthumb" \ MACHDEP="qnx6" \ -./configure --host=${TARGET} --prefix=/usr \ +./configure --host=${TARGET} --prefix=/accounts/1000/shared/documents/clitools \ --enable-ipv6 --enable-shared --with-libs=-liconv -if [ $? != 0 ]; then +if [ $? != 0 ]; then exit 1 fi @@ -31,7 +31,7 @@ export CROSS_COMPILE_TARGET="yes" export CROSS_COMPILE_LIBDIRS="${QNX_TARGET}/armle-v7/usr/lib" export CROSS_COMPILE_INCDIRS="${QNX_TARGET}/usr/include" make HOSTPYTHON="./hostpython" HOSTPGEN="./hostpgen" install DESTDIR=${DEPLOY} -if [ $? != 0 ]; then +if [ $? != 0 ]; then exit 1 fi diff --git a/README.md b/README.md index d49a203..12a78d3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,43 @@ -This repository holds the BlackBerry 10 port of Python-3.2.2. - -Our intent with this repository is: - 1. Fulfill any license requirements by publishing any of our source code changes - 2. To enable the larger community to build their own binaries which will run on BlackBerry 10 / PlayBook devices - 3. To prepare and formalize our patch-set, in preparation for a push to the upstream Python.org repository. Community assistance with this effort will be greatly appreciated, as internal commitments have most RIM employees tied up right now :) - -Build notes - 1. Install BlackBerry 10 NDK tools and make sure environment variables are set up - 2. Seems we need a case-sensitive build environment (partition accordingly on OSX, or create a DMG to build in) - 3. May need to install Mercurial (Hg) - 4. May need an existing host-native python installation \ No newline at end of file +## BlackBerry 10 Python port + +### Current status + +* Python 3.2.2 from BlackBerry building and working fine in the [Berrymuch](https://github.com/berryamin/berrymuch) prefix + +### Roadmap + +* Adapt the patchset for Python 3.4 +* Bundle into Berrymuch + +### Development + +#### Cross-compilation for ARM + +* Get an OS supported by the BlackBerry Native SDK (we recommend [32-bit Ubuntu 16.04](http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-i386.iso)) +* Install the [BlackBerry Native SDK](https://developer.blackberry.com/native/download/) +* Install a few other packages: + ``` + sudo apt install mercurial python + ``` +* Clone this repository and run: + ``` + source ~/path/to/bbndk/bbndk_env.sh + cd Python-3 + ./host.build + ./nto-armv7.build + ``` + +#### Running on Berrymuch + +* Package it up: + ``` + cd nto-armv7/accounts/1000/shared/documents/clitools + zip -yr python-3.2.zip . + ``` +* Transfer the package to your Berrymuch device and install with `pbpkgadd` +* Add to your `~/.profile`: + ``` + export PYTHONPATH="/accounts/1000/shared/documents/clitools/lib/python3.2:/accounts/1000/shared/documents/clitools/lib/python3.2/lib-dynload" + ``` +* Enjoy +