Skip to content

Instantly share code, notes, and snippets.

from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchARM
from os.path import exists, join
import sh
import glob
class FionaRecipe(CythonRecipe):
version = '1.7.11'
url = 'https://github.com/Toblerity/Fiona/archive/{version}.zip'
name = 'fiona'
from math import sin, cos
def circle_angles_to_points(start_angle, end_angle, radius, num_points, origin=[0, 0]):
points = []
for i in range(num_points):
angle = start_angle + i * (end_angle - start_angle) / (num_points - 1)
x = radius * cos(angle) + origin[0]
y = radius * sin(angle) + origin[1]
points.append((x, y))
return points
315 dessant
187 Peter Badida
132 Matthew Einhorn
127 matham
110 Zen-CODE
72 Akshay Arora
46 Meet Udeshi
43 Mathieu Virbel
40 Rafał Kaczor
31 fruitbat
This file has been truncated, but you can view the full file.
packages are []
running apk
[INFO]: Will compile for the following archs: armeabi
[INFO]: Getting Android API version from user argument
[INFO]: Available Android APIs are (14, 15, 19, 21, 25)
[INFO]: Requested API target 19 is available, continuing.
[INFO]: Getting NDK dir from from user argument
[INFO]: Got NDK version from from user argument
[INFO]: Using Crystax NDK 10.3.2
[INFO]: Found virtualenv at /usr/bin/virtualenv2
10-02 20:58:42.340 2163 3556 I ActivityManager: Start proc 16324:org.test.pyrfda:python/u0a218 for activity org.test.pyrfda/org.renpy.android.PythonActivity
10-02 20:58:42.392 16324 16324 V python : metadata fullscreen is0
10-02 20:58:42.419 16324 16337 E linker : warning: unable to get realpath for the library "/data/app/org.test.pyrfda-1/lib/arm/libpython2.7.so". Will use given name.
10-02 20:58:42.420 16324 16337 W linker : /data/app/org.test.pyrfda-1/lib/arm/libpython2.7.so: is missing DT_SONAME will use basename as a replacement: "libpython2.7.so"
10-02 20:58:42.428 16324 16337 E linker : warning: unable to get realpath for the library "/data/user/0/org.test.pyrfda/files/lib/python2.7/lib-dynload/_io.so". Will use given name.
10-02 20:58:42.428 16324 16337 W linker : /data/user/0/org.test.pyrfda/files/lib/python2.7/lib-dynload/_io.so: is missing DT_SONAME will use basename as a replacement: "_io.so"
10-02 20:58:42.429 16324 16337 E linker : warning: unable to get realpath for the library "/data/u
diff --git a/pythonforandroid/recipes/android/__init__.py b/pythonforandroid/recipes/android/__init__.py
index f8b37c5..e2dcefb 100644
--- a/pythonforandroid/recipes/android/__init__.py
+++ b/pythonforandroid/recipes/android/__init__.py
@@ -13,7 +13,7 @@ class AndroidRecipe(IncludedFilesBehaviour, CythonRecipe):
src_filename = 'src'
- depends = [('pygame', 'sdl2'), ('python2', 'python3')]
+ depends = [('pygame', 'sdl2', 'webviewjni'), ('python2', 'python3')]
from kivy.app import App
import numpy as np
def generate_mesh(p, radius=100):
angles = np.linspace(0, 2*np.pi, 100)
centre = np.array([0, 0.]) + radius
xs = (radius * np.sin(angles))
ys = (radius * np.cos(angles))
canvas.before:
Color:
rgba: 1, 0, 0, 1
Rectangle:
pos: self.pos
size: self.size
In [1]: class Test(object):
...: def raіse(self):
...: print('yay')
...:
In [2]: t = Test()
In [3]: t.raіse()
yay
Color:
rgb: 0.3, 0.3, 0.3 from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ListProperty
from kivy.base import runTouchApp