├── master ├── jobs │ └── .empty ├── web │ ├── apps │ │ ├── __init__.py │ │ └── frontend │ │ │ ├── static │ │ │ ├── css │ │ │ │ ├── help.png │ │ │ │ ├── crosshair.gif │ │ │ │ ├── fonts │ │ │ │ │ └── dot.ttf │ │ │ │ ├── smoothness │ │ │ │ │ ├── images │ │ │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ │ │ └── jquery-ui-1.8.6.custom.css │ │ │ │ └── style.css │ │ │ ├── js │ │ │ │ ├── jquery.defaultvalue.js │ │ │ │ ├── genero.js │ │ │ │ └── jquery-ui-timepicker-addon.js │ │ │ └── index.html │ │ │ ├── templates │ │ │ └── frontend │ │ │ │ ├── status.html │ │ │ │ ├── _formhelpers.html │ │ │ │ ├── help.html │ │ │ │ ├── index.html │ │ │ │ ├── layout.html │ │ │ │ ├── job.html │ │ │ │ └── about.html │ │ │ └── __init__.py │ ├── __init__.py │ ├── config.py │ ├── job.py │ └── table.py ├── config.cfg.sample ├── requirements.txt ├── wsgi.py ├── pollqlog.py └── supervisord.conf ├── slave ├── cache │ └── .empty ├── jobs │ └── .empty ├── startbuilder.sh ├── config.cfg.sample ├── proxycache.py └── builder.py ├── tools ├── README.txt ├── setup.py └── p4a-build ├── .gitignore ├── README.rst └── LICENSE /master/jobs/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/cache/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/jobs/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/web/apps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/README.txt: -------------------------------------------------------------------------------- 1 | P4A Cloud build 2 | =============== 3 | 4 | WIP. 5 | 6 | Licence: LGPL3 7 | -------------------------------------------------------------------------------- /slave/startbuilder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python proxycache.py& 3 | http_proxy=localhost:8000 python builder.py 4 | -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/help.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/crosshair.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/crosshair.gif -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/fonts/dot.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/fonts/dot.ttf -------------------------------------------------------------------------------- /slave/config.cfg.sample: -------------------------------------------------------------------------------- 1 | [hotqueue] 2 | name=p4a 3 | host=localhost 4 | port=6379 5 | db=0 6 | password= 7 | 8 | [www] 9 | url=http://yourhost:5000 10 | -------------------------------------------------------------------------------- /master/config.cfg.sample: -------------------------------------------------------------------------------- 1 | [www] 2 | secret_key = 3 | baseurl = http://yourhost:5000/ 4 | 5 | [redis] 6 | host = localhost 7 | port = 6379 8 | password = 9 | 10 | -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /master/web/apps/frontend/static/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kivy/p4a-cloud/HEAD/master/web/apps/frontend/static/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /master/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==0.8 2 | Flask-WTF==0.5.2 3 | Jinja2==2.6 4 | WTForms==0.6.3 5 | Werkzeug==0.8.2 6 | dotcloud==0.4.3 7 | dotcloud.cli==0.4.3 8 | hotqueue==0.2.6 9 | redis==2.4.10 10 | wsgiref==0.1.2 11 | wtf==0.1 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .noseids 2 | *.so 3 | *.pyc 4 | *.pyo 5 | *~ 6 | *.swp 7 | *.DS_Store 8 | *.kpf 9 | master/pollqlog.log 10 | master/config.cfg 11 | slave/builder.log 12 | slave/cache/* 13 | slave/config.cfg 14 | slave/python-for-android 15 | tools 16 | -------------------------------------------------------------------------------- /tools/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup( 4 | name='p4a-build', 5 | version='1.0.2', 6 | author='Mathieu Virbel', 7 | author_email='mat@kivy.org', 8 | scripts=['p4a-build'], 9 | description='Build tool for P4A Build Cloud', 10 | install_requires=['requests'] 11 | ) 12 | -------------------------------------------------------------------------------- /master/wsgi.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | from os.path import dirname, join 4 | sys.path.insert(0, dirname(__file__)) 5 | activate_this = join(dirname(__file__), '.env', 'bin', 'activate_this.py') 6 | execfile(activate_this, dict(__file__=activate_this)) 7 | 8 | from web import app as application 9 | from web.apps.frontend import frontend 10 | application.register_blueprint(frontend) 11 | application.debug = True 12 | 13 | if __name__ == '__main__': 14 | application.run('0.0.0.0') 15 | 16 | -------------------------------------------------------------------------------- /master/web/apps/frontend/templates/frontend/status.html: -------------------------------------------------------------------------------- 1 | {% extends "frontend/layout.html" %} 2 | {% block content %} 3 | 4 |

Python for Android - Status

5 | 6 | 10 | 11 | Builders: 12 | 13 | 18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | P4A Build Cloud 2 | =============== 3 | 4 | This project is aimed to provide a build cloud architecture for submitting 5 | python application to convert to APK. 6 | 7 | .. warning:: 8 | 9 | Development version, use with care. 10 | 11 | How it's working 12 | ---------------- 13 | 14 | The project is composed of: 15 | 16 | - master: serve the webpage, got an API for job submission, and read builder 17 | logs 18 | - slave: a builder that read a job, do it, and post the result back to master 19 | - p4a-build: command line tool for submitting a job 20 | 21 | 22 | Master and slave are communicating with `hotqueue 23 | `_: a queue message based on `Redis 24 | `_. 25 | 26 | Master needs: flask, requests, sqlalchemy, wtforms, hotqueue 27 | Slave needs: hotqueue, requests 28 | p4a-build needs: requests 29 | 30 | -------------------------------------------------------------------------------- /master/web/apps/frontend/templates/frontend/_formhelpers.html: -------------------------------------------------------------------------------- 1 | {% macro form_field(field) %} 2 | {{ field.label }} 3 | {{ field(placeholder=field.description, **kwargs)|safe }} 4 | {% if field.errors %} 5 |
6 | {% for error in field.errors %} 7 | {{ error }} 8 | {% endfor %} 9 |
10 | {% endif %} 11 | {% endmacro %} 12 | 13 | {% macro form_begin(form) %} 14 | {% if form.csrf.errors %} 15 |
16 | {% for error in form.csrf.errors %} 17 | {{ error }} 18 | {% endfor %} 19 |
20 | {% endif %} 21 | {{ form.hidden_tag() }} 22 | {% endmacro %} 23 | 24 | {% macro form_field_hidden(name, value) %} 25 | 26 | {% endmacro %} 27 | 28 | {% macro form_end(form) %} 29 | {{ form.submit }} 30 | {% endmacro %} 31 | 32 | {% macro form_info(title, value) %} 33 | 34 | 35 | {% endmacro %} 36 | -------------------------------------------------------------------------------- /master/web/apps/frontend/static/js/jquery.defaultvalue.js: -------------------------------------------------------------------------------- 1 | (function(c){c.fn.extend({defaultValue:function(e){if("placeholder"in document.createElement("input"))return!1;return this.each(function(){if(c(this).data("defaultValued"))return!1;var a=c(this),h=a.attr("placeholder"),f={input:a};a.data("defaultValued",!0);var d=function(){var b;if(a.context.nodeName.toLowerCase()=="input")b=c("").attr({type:"text"});else if(a.context.nodeName.toLowerCase()=="textarea")b=c("