Custom Recipe

640 просмотров
Перейти к первому непрочитанному сообщению

Pkore

не прочитано,
17 янв. 2017 г., 21:27:3517.01.2017
– Kivy users support
I need to incorporate the 'python-rtmidi' library in my android project and have been trying to write a recipe for it. I haven't had success with doing that so I was wondering if someone could give me some pointers. Keep in mind I'm a total recipe n00b so I basically need a step by step guide. I've seen the docs on the python-for-android website and I'm still lost. Anyone up to the challenge of helping out a n00b? 

Thanks in advance! 

Pkore

не прочитано,
17 янв. 2017 г., 21:32:0317.01.2017
– Kivy users support
I forgot, here are the contents of my recipe.sh file:

class RtMidiRecipe(Recipe):

    version = '1.0.0'
    md5sum = '4f3dc9a9d857734a488bcbefd9cd64ed'

    depends = ['cython']  # These are just examples

recipe = RtMidiRecipe()

Be gentile:) 

Alexander Taylor

не прочитано,
18 янв. 2017 г., 13:31:0818.01.2017
– Kivy users support
This is a python recipe for the new toolchain, so call it __init__.py rather than recipe.sh.

If it uses cython, Use CythonRecipe as the base class, rather than Recipe.

Other than that, what is the build problem?
Сообщение удалено

Pkore

не прочитано,
18 янв. 2017 г., 15:46:5418.01.2017
– Kivy users support
Here's the full stack trace:

# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian `dpkg' package management program version 1.17.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
# Install platform
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/kivy/Desktop/Edit/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph click cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer ffpyplayer_tito flask freetype gevent greenlet harfbuzz hostpython igraph itsdangerous jinja2 jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto markupsafe midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws werkzeug wokkel zeroconf zope
# Remove directory and subdirectory /home/kivy/Desktop/Edit/.buildozer/applibs
# Create directory /home/kivy/Desktop/Edit/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /home/kivy/Desktop/Edit/.buildozer
LC_PAPER=fr_FR.UTF-8
XDG_VTNR=7
LC_ADDRESS=fr_FR.UTF-8
XDG_SESSION_ID=c1
SSH_AGENT_PID=1148
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/kivy
SELINUX_INIT=YES
SAL_USE_VCLPLUGIN=gtk
LC_MONETARY=fr_FR.UTF-8
SESSION=Lubuntu
SHELL=/bin/bash
XDG_MENU_PREFIX=lxde-
TERM=xterm
SSH_AGENT_LAUNCHER=upstart
LC_NUMERIC=fr_FR.UTF-8
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1043
USER=kivy
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=fr_FR.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/tmp/ssh-6tny1EePChsP/agent.1143
DEFAULTS_PATH=/usr/share/gconf/Lubuntu.default.path
VIRTUAL_ENV=/home/kivy/Desktop/VolcEdit/.buildozer/venv
XDG_CONFIG_DIRS=/etc/xdg/lubuntu:/etc/xdg/xdg-Lubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/home/kivy/Desktop/VolcEdit/.buildozer/venv/bin:/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION=Lubuntu
ANDROIDAPI=19
LC_IDENTIFICATION=fr_FR.UTF-8
JOB=dbus
PWD=/home/kivy/Desktop/Edit/.buildozer
XMODIFIERS=@im=ibus
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/Lubuntu.mandatory.path
LC_MEASUREMENT=fr_FR.UTF-8
ANDROIDNDK=/home/kivy/.buildozer/android/platform/android-ndk-r9c
IM_CONFIG_PHASE=1
PS1=(venv) 
GDMSESSION=Lubuntu
_LXSESSION_PID=1202
PACKAGES_PATH=/home/kivy/.buildozer/android/packages
SESSIONTYPE=lxsession
HOME=/home/kivy
SHLVL=2
XDG_SEAT=seat0
XDG_CONFIG_HOME=/home/kivy/.config
LANGUAGE=en_US
UPSTART_INSTANCE=
UPSTART_EVENTS=started xsession
ANDROIDSDK=/home/kivy/.buildozer/android/platform/android-sdk-20
LOGNAME=kivy
XDG_DATA_DIRS=/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/share/Lubuntu:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-14Nfxu3ebW
QT4_IM_MODULE=xim
LESSOPEN=| /usr/bin/lesspipe %s
ANDROIDNDKVER=r9c
UPSTART_JOB=lxsession
INSTANCE=
TEXTDOMAIN=im-config
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=LXDE
GTK_IM_MODULE=xim
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=fr_FR.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
LC_NAME=fr_FR.UTF-8
XAUTHORITY=/home/kivy/.Xauthority
_=/usr/bin/env
# Install distribute
# Cwd /home/kivy/Desktop/Edit/.buildozer
/bin/sh: 1: curl: not found
# Install requirement python-rtmidi in virtualenv
# Run 'pip install --target=/home/kivy/Desktop/Edit/.buildozer/applibs python-rtmidi'
# Cwd /home/kivy/Desktop/Edit/.buildozer
Downloading/unpacking python-rtmidi
  Running setup.py (path:/tmp/pip_build_kivy/python-rtmidi/setup.py) egg_info for package python-rtmidi
    
    warning: no previously-included files found matching '*.rst.in'
    warning: no previously-included files found matching 'deploy.sh'
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: python-rtmidi
  Running setup.py install for python-rtmidi
    building 'rtmidi._rtmidi' extension
    /bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/usr/include/python2.7 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-2.7/src/_rtmidi.o
    error: command '/bin/false' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_kivy/python-rtmidi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uwz9jN-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmp9NXDlx:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/rtmidi

copying rtmidi/__init__.py -> build/lib.linux-x86_64-2.7/rtmidi

copying rtmidi/midiutil.py -> build/lib.linux-x86_64-2.7/rtmidi

copying rtmidi/release.py -> build/lib.linux-x86_64-2.7/rtmidi

copying rtmidi/midiconstants.py -> build/lib.linux-x86_64-2.7/rtmidi

running build_ext

building 'rtmidi._rtmidi' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/usr/include/python2.7 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-2.7/src/_rtmidi.o

error: command '/bin/false' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_kivy/python-rtmidi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uwz9jN-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmp9NXDlx failed with error code 1 in /tmp/pip_build_kivy/python-rtmidi
Storing debug log for failure in /tmp/tmp7j0FYR
# Command failed: pip install --target=/home/kivy/Desktop/Edit/.buildozer/applibs python-rtmidi
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2


Will python-rtmidi work on android or is it only desktop linux?

Pkore

не прочитано,
19 янв. 2017 г., 20:39:1319.01.2017
– Kivy users support
Can anyone help with this? I would really like to be able to write my own recipes. I'll share each one when I get them working.

Pkore

не прочитано,
23 янв. 2017 г., 16:45:5623.01.2017
– Kivy users support
Bump.

Aaron Bell

не прочитано,
23 янв. 2017 г., 20:06:5723.01.2017
– Kivy users support
I would answer, but I don't know! :|

Pkore

не прочитано,
24 янв. 2017 г., 14:30:2024.01.2017
– Kivy users support
Lol! Well, thanks for the reply none the less;)

Alexander Taylor

не прочитано,
24 янв. 2017 г., 17:32:0524.01.2017
– kivy-...@googlegroups.com
This log indicates that python-for-android is not using your recipe, and
is instead trying to install the module with pip (which doesn't work
because it has compiled components). What steps did you follow to try to
make the recipe be used?
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Kivy users support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/kivy-users/LDtlUjCaHYM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> kivy-users+...@googlegroups.com
> <mailto:kivy-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


signature.asc

Pkore

не прочитано,
24 янв. 2017 г., 19:19:0724.01.2017
– Kivy users support
Well, I created a folder named python-rtmidi in the '.buildozer/android/platform/python-for-android/recipes' folder in my app's directory. I then saved the above recipe code in that folder as '__init__.py' and listed 'python-rtmidi' as a requirement in my .spec file and started the build process. Am I doing that part wrong? Should the recipe go under a different directory on my machine? Like I said, I'm a n00b. 
  Just to reiterate, this is on the buildozer VM.

Pkore

не прочитано,
24 янв. 2017 г., 19:20:4224.01.2017
– Kivy users support
Also, what's the md5 about? Do I need it? I just left it cause it was part of the example;)

Pkore

не прочитано,
30 янв. 2017 г., 12:38:0430.01.2017
– Kivy users support
Don't mean to be a pest, but I'm still not getting anywhere with this.

Alexander Taylor

не прочитано,
31 янв. 2017 г., 16:42:0331.01.2017
– kivy-...@googlegroups.com
There is some documentation about creating recipes at
http://python-for-android.readthedocs.io/en/latest/recipes/ , and you
can use your recipe without modifying the python-for-android build
folder as described at
http://python-for-android.readthedocs.io/en/latest/quickstart/#recipe-management

Beyond that, please post the recipe contents and details about what
problem you currently get when trying to build it.

It might be easier to post this information as a pull request on github,
if you like.

On 30/01/17 17:38, Pkore wrote:
> Don't mean to be a pest, but I'm still not getting anywhere with this.
>
signature.asc
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений