Skip to content

Commit

Permalink
Add instructions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
vaskas committed Dec 18, 2019
1 parent 9e6a014 commit efe5902
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Python-3/nto-armv7.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ 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

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

Expand Down
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
## 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

0 comments on commit efe5902

Please sign in to comment.