Giter Site home page Giter Site logo

adjath / python-for-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kuri65536/python-for-android

0.0 1.0 0.0 73.13 MB

Automatically exported from code.google.com/p/python-for-android

License: Apache License 2.0

Java 2.79% Makefile 0.29% C 2.56% Shell 0.03% Python 69.78% HTML 23.73% CSS 0.01% OpenEdge ABL 0.49% C++ 0.26% Smarty 0.01% GAP 0.05% Batchfile 0.01%

python-for-android's Introduction

This repository is in alpha development. forked from Py4A on GoogleCode

Download

see Releases page, and select an installer: PythonForAndroid-debug.apk .

Status

  • Python2.7.14
  • Python3.6.4

Description

This is Python built to run on Android devices. It is made to be used together with SL4A (Scripting Layer For Android).

Nearly all the actual non-python specific documentation can be found at android-scripting

For Python specific issues and enhancements only, please use the issues tab.

Instruction for installation

Normal install

Requirements

  • python2: an Android Device 1.6 >=
  • python3: an Android Device 2.3.1 >=
  • internet access
  • SL4A was installed.

How to install

  1. Download SL4A Application, such as sl4a-r6.1.1-arm-debug.apk
  2. Download Py4A Application, such as PythonForAndroid-debug.apk
  3. Enable "Unknown Sources" in your device settings.
  4. Open 1. apk to install. (sl4a)
  5. Open 2. apk to install. (py4a)
  6. Open PythonForAndroid application
  7. Click Install to download and install python binaries.
  8. Launch sl4a, Select 'Menu' >> 'View' >> 'Interpreters' and Select 'Python 2.7.?'.
  9. Python will be launched, have fun!

Local install

  • if you device is not connected to internet, please try this way.

How to install

  1. Download sl4a apk
  2. Download py4a apk
  3. Download py4a zips, interpreter - python_r29.zip, modules - python_extras_r29.zip, sample scripts - python_scripts_r26.zip.
  4. Enable "Unknown Sources" in your device settings.
  5. Open 1. apk to install. (sl4a)
  6. Open 2. apk to install. (py4a)
  7. Open PythonForAndroid application
  8. push 3. zips to device's /sdcard/com.googlecode.pythonforandroid. (be sure /sdcard path to fit your device.)
  9. Click "Local install" to check zips and install python binaries.
  10. Click "Local install" to install these zips.
  11. Launch sl4a, Select 'Menu' >> 'View' >> 'Interpreters' and Select 'Python 2.7.?'.
  12. Python will be launched, have fun!

Please tell me issues

Current issue form is here::

* What device(s) are you experiencing the problem on?
  * ex: Nexus ???
* What OS version are you running on the device?
  * ex: Andriod ???
* What version of the product are you using?
  * SL4A r????
  * PythonForAndroid r??
* What steps will reproduce the problem?
  1. 
  2. 
  3. 
* Provide logcat for detail.
* What is the expected output%3F What do you see instead?
  * expected: launch ???
  * see: stop running
* Please provide any additional information below.

Links

Pages

External Links

Similar projects

Please do not ask any question about below!

Instruction for build

Instruction for r16 or ealier

Requirements for build

  • In order to build Py4A you first need to build python for Android platform, make sure you have all the dependencies needed for building python 2.7 for your distro in Ubuntu run: sudo apt-get build-dep python2.7

  • Android NDK >= r10e, maybe < r13 (r13 series does not contain GCC)

  • Android SDK >= 21.1.2

  • Gradle >= 2.0 (included in Android Studio >= 1.0.2)

  • Build packages for build python

    • for openssl: apt install xutils-dev
    • for 64bit linux: apt install lib32z1 lib32stdc++6
    • (?): apt install aapt

How to build

  • Check the dependencies of library (sample of Ubuntu)
$ sudo apt install libzlib-dev
  • Clone this project.
for Mercurial uesr (with hg-git plugin)
$ hg clone git://github.com/kuri65536/python-for-android

for git user
$ git clone git://github.com/kuri65536/python-for-android
  • Build the apk:
$ cd android/PythonForAndroid
$ echo sdk.dir=/path/to/android-sdk > local.properties
$ sh /path/to/android-stdudio/gradle/gradle-2.2.1/bin/gradle assembleDebug
Building ??% ...
$ ls build/outputs/apk/
PythonForAndroid-debug.apk
  • Build the py4a binaries.
$ cd python-build
$ NDK_PATH=/path/to/android-ndk-r10d make build
$ ls python*.zip
python_r29.zip python_extra_r29.zip ... and so on...
  • Confirm your binary version.
$ cd python-build
$ cat LATEST_VERSION
r29
$ cat LATEST_VERSION_EXTRA
r29
$ cat LATEST_VERSION_SCRIPTS
r28
  • Make a release in github and Upload the binaries to it. Please be careful to match the release name and confirmed binary versions.

Local install for confirm the build (direct extracting)

  • Requirements: root is required.
  • Requirements: python already install.
  • Requirements: unzip is needed for extract.

How to run:

  • after build, move current directory to python2: cd python-build
  • run scripts
$ sd=/sdcard adb=~/install/android-sdk-linux/platform-tools/adb \
  sh ../tools/localinstall.sh

python-for-android's People

Contributors

aaaaalbert avatar froz avatar gauravssnl avatar googlecodeexporter avatar kuri65536 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.