Skip to content

Commit efe5902

Browse files
committed
Add instructions to README
1 parent 9e6a014 commit efe5902

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-15
lines changed

Python-3/nto-armv7.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ LDFLAGS="-Wl,-zrelro" \
2121
CFLAGS="-D_QNX_SOURCE -DFD_SETSIZE=1024 -fstack-protector-all -g -mthumb" \
2222
CXXFLAGS="-D_QNX_SOURCE -DFD_SETSIZE=1024 -fstack-protector-all -g -mthumb" \
2323
MACHDEP="qnx6" \
24-
./configure --host=${TARGET} --prefix=/usr \
24+
./configure --host=${TARGET} --prefix=/accounts/1000/shared/documents/clitools \
2525
--enable-ipv6 --enable-shared --with-libs=-liconv
26-
if [ $? != 0 ]; then
26+
if [ $? != 0 ]; then
2727
exit 1
2828
fi
2929

3030
export CROSS_COMPILE_TARGET="yes"
3131
export CROSS_COMPILE_LIBDIRS="${QNX_TARGET}/armle-v7/usr/lib"
3232
export CROSS_COMPILE_INCDIRS="${QNX_TARGET}/usr/include"
3333
make HOSTPYTHON="./hostpython" HOSTPGEN="./hostpgen" install DESTDIR=${DEPLOY}
34-
if [ $? != 0 ]; then
34+
if [ $? != 0 ]; then
3535
exit 1
3636
fi
3737

README.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,43 @@
1-
This repository holds the BlackBerry 10 port of Python-3.2.2.
2-
3-
Our intent with this repository is:
4-
1. Fulfill any license requirements by publishing any of our source code changes
5-
2. To enable the larger community to build their own binaries which will run on BlackBerry 10 / PlayBook devices
6-
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 :)
7-
8-
Build notes
9-
1. Install BlackBerry 10 NDK tools and make sure environment variables are set up
10-
2. Seems we need a case-sensitive build environment (partition accordingly on OSX, or create a DMG to build in)
11-
3. May need to install Mercurial (Hg)
12-
4. May need an existing host-native python installation
1+
## BlackBerry 10 Python port
2+
3+
### Current status
4+
5+
* Python 3.2.2 from BlackBerry building and working fine in the [Berrymuch](https://github.com/berryamin/berrymuch) prefix
6+
7+
### Roadmap
8+
9+
* Adapt the patchset for Python 3.4
10+
* Bundle into Berrymuch
11+
12+
### Development
13+
14+
#### Cross-compilation for ARM
15+
16+
* 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))
17+
* Install the [BlackBerry Native SDK](https://developer.blackberry.com/native/download/)
18+
* Install a few other packages:
19+
```
20+
sudo apt install mercurial python
21+
```
22+
* Clone this repository and run:
23+
```
24+
source ~/path/to/bbndk/bbndk_env.sh
25+
cd Python-3
26+
./host.build
27+
./nto-armv7.build
28+
```
29+
30+
#### Running on Berrymuch
31+
32+
* Package it up:
33+
```
34+
cd nto-armv7/accounts/1000/shared/documents/clitools
35+
zip -yr python-3.2.zip .
36+
```
37+
* Transfer the package to your Berrymuch device and install with `pbpkgadd`
38+
* Add to your `~/.profile`:
39+
```
40+
export PYTHONPATH="/accounts/1000/shared/documents/clitools/lib/python3.2:/accounts/1000/shared/documents/clitools/lib/python3.2/lib-dynload"
41+
```
42+
* Enjoy
43+

0 commit comments

Comments
 (0)