kivy / kivy-sdk-packager Goto Github PK
View Code? Open in Web Editor NEWScripts for Kivy SDK generation on Windows, OS X and Linux
License: MIT License
Scripts for Kivy SDK generation on Windows, OS X and Linux
License: MIT License
The Kivy and the scripts don't deal correctly for filenames with spaces.
In scripts, all variables have to become enclosed with double quotes:
e.g rm -rf "$DMG_TEMP" "$STAGING_DIR"
And $1 has to become "$1" everywhere including variables declaration which have already double quotes (e.g. APP_NAME="$(basename "$1" .app)"
Nevertheless, if the name of the filename.app contains spaces then Kivy fails to run:
/Applications/Filename with spaces.app/Contents/Resources/script: line 9: /Applications/Filename: No such file or directory
/Applications/Filename with spaces.app/Contents/Resources/script: line 26: /Applications/Filename: No such file or directory
/Applications/Filename with spaces.app/Contents/Resources/script: line 26: exec: /Applications/Filename : cannot execute: No such file or directory
The spaces (and other special character) in the filename is a useful feature for Mac OS because this name shows up in the "Applications".
I tried to build a package for mac os 10.13 by instruction with buildozer but I have got such error and I don't know how to solve it:
(kivi) โ bul buildozer osx debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for osx
# Check if kivy-sdk-packager exists
# kivy-sdk-packager found at /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/osx/platform
# check if Kivy.app exists in local dir
# Kivy.app found at /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/osx/platform/kivy-sdk-packager-master/osx
# Install platform
# Check application requirements
# Remove directory and subdirectory /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/applibs
# Create directory /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer
TERM_PROGRAM=vscode
SHELL=/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/ms/j60xpvtx357gzfx0dvws9kcw0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Hk2O5N08e5/Render
CONDA_SHLVL=3
TERM_PROGRAM_VERSION=1.53.2
CONDA_PROMPT_MODIFIER=(kivi)
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
ORIGINAL_XDG_CURRENT_DESKTOP=undefined
ZSH=/Users/ilyakochankov/.oh-my-zsh
USER=ilyakochankov
CONDA_EXE=/opt/anaconda3/bin/conda
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.18JR0V2ruL/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
VIRTUAL_ENV=/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/venv
PAGER=less
LSCOLORS=Gxfxcxdxbxegedabagacad
_CE_CONDA=
CONDA_PREFIX_1=/opt/anaconda3
PATH=/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/venv/bin:/opt/anaconda3/envs/kivi/bin:/opt/anaconda3/condabin:/usr/local/opt/sqlite/bin:/usr/local/Cellar/libpq/12.4/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/opt/sqlite/bin:/usr/local/Cellar/libpq/12.4/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/ilyakochankov/Library/Python/3.7/bin
GSETTINGS_SCHEMA_DIR=/opt/anaconda3/envs/kivi/share/glib-2.0/schemas
CONDA_PREFIX_2=/opt/anaconda3/envs/usual_python
CONDA_PREFIX=/opt/anaconda3/envs/kivi
PWD=/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer
LANG=en_US.UTF-8
XPC_FLAGS=0x0
PS1=(venv)
XPC_SERVICE_NAME=0
_CE_M=
PACKAGES_PATH=/Users/ilyakochankov/.buildozer/osx/packages
HOME=/Users/ilyakochankov
SHLVL=3
VSCODE_GIT_ASKPASS_MAIN=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js
LOGNAME=ilyakochankov
LESS=-R
CONDA_PYTHON_EXE=/opt/anaconda3/bin/python
VSCODE_GIT_IPC_HANDLE=/var/folders/ms/j60xpvtx357gzfx0dvws9kcw0000gn/T/vscode-git-ea0bfaec2c.sock
CONDA_DEFAULT_ENV=kivi
GIT_ASKPASS=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh
VSCODE_GIT_ASKPASS_NODE=/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)
DISPLAY=/private/tmp/com.apple.launchd.O1nYf83sEr/org.macosforge.xquartz:0
COLORTERM=truecolor
_=/usr/bin/env
# Install requirement python3 in virtualenv
# Run 'pip install --target=/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/applibs python3'
# Cwd /Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer
ERROR: Could not find a version that satisfies the requirement python3 (from versions: none)
ERROR: No matching distribution found for python3
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the '/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/venv/bin/python3 -m pip install --upgrade pip' command.
# Command failed: pip install --target=/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/applibs python3
# ENVIRONMENT:
# PACKAGES_PATH = '/Users/ilyakochankov/.buildozer/osx/packages'
# VIRTUAL_ENV = '/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/venv'
# PATH = '/Users/ilyakochankov/Yandex.Disk.localized/University/3_cource/mobile_dev/kivi_demo/bul/.buildozer/venv/bin:/opt/anaconda3/envs/kivi/bin:/opt/anaconda3/condabin:/usr/local/opt/sqlite/bin:/usr/local/Cellar/libpq/12.4/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/opt/sqlite/bin:/usr/local/Cellar/libpq/12.4/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/ilyakochankov/Library/Python/3.7/bin'
# CC = '/bin/false'
# CXX = '/bin/false'
#
# 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
From @miohtama on January 2, 2017 6:15
Fresh Kivy3 1.9.1. install.
Attempt to run pip
command directly fails.
/Applications/Kivy3.app/Contents/Resources/venv/bin/pip
Traceback (most recent call last):
File "/Applications/Kivy3.app/Contents/Resources/venv/bin/pip", line 3, in <module>
import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this
IOError: [Errno 2] No such file or directory: '/Applications/Kivy3.app/Contents/Resources/venv/bin/activate_this.py'
Not sure if this is intentional or the virtual environment shipped with the installation is broken.
Copied from original issue: kivy/kivy#4868
Port of kivy/kivy#3590.
In the OSX installation disk image, the MakeSymlinks script refers to Kivy.App rather than Kivy.app. For case insensitive file systems, that might work fine. But installation for case sensitive file systems doesn't work until you change the 'a'.
The directions on https://kivy.org/doc/stable/guide/packaging-osx.html#:
$ kivy -m pip install
don't work, I think because MakeSymlinks probably doesn't work (Kivy.app vs Kivy2.app perhaps).
What does work is (I did this on copy of installed app w/ 2 dropped from name):
$ cd //Kivy.App/Contents/Resources/venv/lib/python2.7/site-packages
$ pip install urllib3 -t .
$ pip install botocore -t .
$ pip install boto3 -t .
Now drag/drop script works.
In the file Resources/script
these environment variables, amongst others, are created:
export DYLD_FALLBACK_LIBRARY_PATH="${SCRIPT_PATH}/lib"
export LD_PRELOAD_PATH="${SCRIPT_PATH}/lib"
export GST_REGISTRY="${SCRIPT_PATH}/gst.registry"
export KIVY_HOME="${SCRIPT_PATH}/.kivy"
Whereas the entries lib
, gst.registry
, and .kivy
do not exist in Resources
which is the ${SCRIPT_PATH}
in Kivy-1.9.0-osx.dmg.
After packaging an app that has a dependant package in which there is a dylib file the dylib file is corrupted and a lot smaller then the original.
Hunch: Whitespace is being cleaned and remove from the dylib binary
Workaround: copy the effected file from source to the appropriate place in the .app folder.
https://github.com/kivy/kivy-sdk-packager/blob/master/win/data/kivyenv.sh#L57 should probably have $KIVY_DIR
.
/e/dev/envs/py34_x86/kivy (master)
$ git pull
E:\dev\envs\py34_x86\MinGW\msysgit/libexec/git-core\git-pull: line 321: exec: git-merge: not found
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
after checking the github action, py 3.11 64x gstreamer file is larger than 150mb and blocked by pypi. please revise dependencies and reduce file size and update asap please ๐๐ป
While on Kivy-daily and updated today, when I do: sudo apt-get install kivy-examples
I get the error:
sudo apt-get install kivy-examples
[sudo] password for xxx:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
kivy-examples : Depends: python-kivy (= 1.9.1-devdaily0+201508211501-3006-testing66ubuntu14.04.1) but 1.9.1-devdaily0+201510162146-3105-testing75ubuntu14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
System: Ubuntu 14.04, Python 2.7
The default home dir set via KIVY_HOME is not writable. Apps fail to launch with permission denied error "Permission denied: '/Applications/KaTrain.app/Contents/Resources/.kivy'". Any advice?
Demo apps from gallery w/o dependencies all work w/ various build methods.
No documented build method works (as documented) for an osx app w/ dependencies:
urllib3, botocore, boto3.
The same osx app's python script w/ the above dependencies does work via drag/drop onto Kivy.app provided that the dependencies have been pre-pip-ed using
pip install <dependency> -t <path to kivy.app venv>
Hi,
I have the following setup: A supervisor app launches the 'real' GUI using subprocess.check_ouput('gui_script'). In case the app crashes the supervisor will show a crash report which can be submitted. The problem now is that the 'real' app has garden.matplotlib as dependency which doesn't work ('KeyError: 'kivy.garden.matplotlib''). Also copying the libs directory to the 'real' apps dir didn't work. Do you have an idea how I could get this to work on OSX using package_app.py?
Johannes
The PPA kivy-daily
doesn't include some providers in its dependencies (and of course, the stable PPA isn't up-to-date anyhow).
Clipboard:
gtk3
)dbusklipper
)sdl2
)Spelling:
enchant
)There are probably some others that should be included in one way or another. kivy/__init__.py
has a list of all supported providers, although some are platform-specific.
Port of kivy/kivy#3404.
There's a missing file in wheels since 0.1.6 (including), which breaks compilation. For Travis and Appveyor was used only the one from pypi, which has the file in it.
cythoning kivy\lib/gstplayer/_gstplayer.pyx to kivy\lib/gstplayer\_gstplayer.c
building 'kivy.lib.gstplayer._gstplayer' extension
creating build\temp.win-amd64-3.5\Release\kivy\lib\gstplayer
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -I/c/gstreamer/1.0/x86_64/include/gstreamer-1.0 -I/c/gstreamer/1.0/x86_64/lib/gstreamer-1.0/include -I/c/gstreamer/1.0/x86_64/include/glib-2.0 -I/c/gstreamer/1.0/x86_64/lib/glib-2.0/include -IC:\Python35-x64\include -IC:\Python35-x64\include -IC:\Python35-x64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tckivy\lib/gstplayer\_gstplayer.c /Fobuild\temp.win-amd64-3.5\Release\kivy\lib/gstplayer\_gstplayer.obj
_gstplayer.c
C:\Python35-x64\include\gst/gstelement.h(55): fatal error C1083: Cannot open include file: 'gst/gstconfig.h': No such file or directory
python : C:\Python35-x64\lib\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
At line:156 char:3
+ python setup.py build_ext --inplace
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Python35-x64... is deprecated.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
"Cython.Distutils.old_build_ext does not properly handle dependencies "
C:\Python35-x64\lib\site-packages\setuptools\dist.py:331: UserWarning: Normalizing '1.9.2-dev0' to '1.9.2.dev0'
normalized_version,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2
Failed with exit code 1
I wanted to package my application and ran create-osx-bundle.sh. The script seemed to have run to completion. However, when I proceeded to the next steps outlined in the osx/readme.md, any attempt to run a python command fails with the Error:
ImportError: No module named site
This only happens when the virtual environment is activated (kivy-sdk-packager/osx/Parcoursplaner.app/Contents/Resources/venv/bin). With the venv deactivated python still functions normally. The same issue occurs when i try to run buildozer
The script threw a couple errors for multiple .DS_Store files, though i suppose that's not causing my issue:
+ osxrelocator -r . /usr/local/lib/ @executable_path/Contents/lib/ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: error: './Contents/Frameworks/Python.framework/Versions/3.7/.DS_Store': The end of the file was unexpectedly encountered
I piped the logs into a .txt file. I attached these logs aswell as the statements that were written into the terminal as files to this issue.
log_shell.txt
log.txt
OS: MacOS 11.2.1
Shell script flags: ./create-osx-bundle.sh -n Parcoursplaner -v "0.0.1a" -a "Linus" -g 0
From @miohtama on January 2, 2017 6:19
Kivy3 OSX cannot upgrade pip version shipped with it. It fails for some command line argument parsing reasons, probably due to how the underlying pip
command is wrapper.
kivy -m pip install -U pip
2017-01-02 00:18:22.683 kivy[3752:2767258] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'.
2017-01-02 00:18:22.695 kivy[3752:2767258] App did finish launching
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting install
Could not find a version that satisfies the requirement install (from versions: )
No matching distribution found for install
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Copied from original issue: kivy/kivy#4870
Source code can be found: https://github.com/kcrossen/CloudWatch_Remote_Monitor
The purpose is to monitor AWS resources safely through a "keyhole" access. Off-the-shelf methods are too powerful to be safe.
// Using the buildozer method as instructed
package_app.py (as delivered) from line 232:
if __name__ == '__main__':
arguments = docopt(__doc__, version='package app {}'.format(__version__))
print(arguments)
main(arguments)
In script fails:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['python', 'package_app.py', '/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/app', '--appname=CWRemote', '--bundlename=CW_Remote', '--bundleid=com.techview', '--bundleversion=0.1', '--displayname=CW_Remote', '--author=KCrossen']' returned non-zero exit status 1
In debugger fails (exception):
Copy Kivy.app/source.app if it exists
source app {} doesn't exist
package_app.py (as modified) from line 232:
if __name__ == '__main__':
arguments = docopt(__doc__, version='package app {}'.format(__version__))
print(arguments)
script_path = os.path.dirname(os.path.realpath(__file__))
os.chdir(script_path)
main(arguments)
In debugger fails:
Traceback (most recent call last):
File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 237, in <module>
main(arguments)
File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 224, in main
compile_app(appname)
File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 159, in compile_app
shell=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['CWRemote.app/Contents/Resources/script -OO -m compileall CWRemote.app/Contents/Resources/myapp']' returned non-zero exit status 1
Hello.
I have installed Kivy with the following self extracting file : http://kivy.org/downloads/1.9.0/Kivy-1.9.0-py2.7-win32-x86.exe
Then I have copied kivy-27.bat in SendTo folder.
Then I tried to start Kivy-1.9.0-py2.7-win32-x86\kivy27\examples\demo\showcase\main.py just like the demo using send to, and it returned the error 'python.exe' not recognized as a command.
Did I miss something?
I also have another python (with kivy) installed because it was the package. Do you know if there is any easy & safe soluce to install kivy in my main python folder, on windows 7?
Thank you! ๐
https://kivy.org/doc/stable/guide/packaging-osx.html
This:
osx> ./package-app.sh /path/to/your/<app_folder_name>/
there is no "package-app.sh", should read:
osx> python ./package_app.py /path/to/your/<app_folder_name>/ ...
where ... is all the params from:
osx> python ./package_app.py --help
Also this:
"osx> cp -a /Applications/Kivy.app ./Kivy.App"
after a Python 2 install should read:
"osx> cp -a /Applications/Kivy2.app ./Kivy.App"
The app, as built, still doesn't work though.
the GNU find has no option of -E
Hello,
I am trying to bundle Kivy.app for later use in my application bundle:
cd kivy-sdk-packager/osx
sh ./create-osx-bundle.sh 1.11.1 3.7.7
This command fails after a while with the following error:
+ echo '-- Relocate virtualenv'
-- Relocate virtualenv
+ pushd Kivy.app/Contents/Resources/venv
~/projects/packaging/kivy-sdk-packager/osx/Kivy.app/Contents/Resources/venv ~/projects/packaging/kivy-sdk-packager/osx
+ virtualenv --relocatable .
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--reset-app-data] [--discovery {builtin}] [-p py] [--creator {builtin,cpython3-posix,venv}] [--seeder {app-data,pip}] [--no-seed]
[--activators comma_sep_list] [--clear] [--system-site-packages] [--symlinks | --copies] [--no-download | --download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip]
[--no-setuptools] [--no-wheel] [--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --relocatable
It seems like "virtualenv" deprecated this command line option (pypa/virtualenv#1549). If there would be a way to downgrade virtualenv to the last working version it would be fine I guess. Please advise how to fix.
SDL2 2.0.4 should be used for packaging our next release 1.9.1.
When you download Kivy from the following page for Windows (tested with Python 3.4): http://kivy.org/#download
and the host Windows system already has Python (3.4) installed with Environment Variables:
Path: C:\Python34;C:\Python34\Scripts;
PYTHONPATH: C:\Python34;C:\Python34\Lib;C:\Python34\DLLs;C:\Python34\Lib\lib-tk;C:\Python34\Lib\site-packages;C:\Python34\Lib\site-packages\opencv
the kivy.bat uses the system's Python instead of the Python inside the portable package.
It would be nice that both Python's can co-exist without the need to remove Python from the Systems's Environment Variables.
Hi,
so as per libsdl-org/SDL#7563 the MACOSX_DEPLOYMENT_TARGET needs to be updated with the new macOS versions. Is there any meantime hot fix? I tried to update it in "create-osx-bundle.sh" but sadly it wasn't enough. Where else should I updated it?
Just downloaded kivy-sdk-packager
to test it out. Docs say it requires platypus
, so brew install platypus
.
When run, create-osx-bundle.sh
complains about platypus not found
. Dug into the script and saw it being hardcoded to /usr/local/bin/platypus
, but homebrew installs to /opt/homebrew/bin/platypus
.
Ok, no problem, change the script and rerun.
Now it complains about /usr/local/share/platypus/ScriptExec
not found, 'coz Homebrew (latest version) doesn't install there anymore.
Perhaps it's time to bring this script up-to-date with homebrew's platypus.
I tried to use package-app.sh
to generate .app but I'm not sure about the output directory structure. Running:
$ package-app.sh /path/to/my/project
The result project.app
contains my code in /Contents/Resources/yourapp/project
but Kivy expects main.py
in /Contents/Resources/yourapp/
so it won't run.
I think the problem is line 31 in package-app.sh where:
cp -a $1 ${APPPATH}/Contents/Resources/yourapp
Should be:
cp -a $1/* ${APPPATH}/Contents/Resources/yourapp
Hello,
After running command "./create-osx-bundle.sh" without any parameters on latest macosx it resolved with this error. Why?
Found Cython at /private/var/folders/f0/3xl2g3jd51xgjwhz8d47hrn40000gn/T/pip-build-env-1wp8srhd/overlay/lib/python3.11/site-packages/Cython/__init__.py
Detected supported Cython version 0.29.33
User distribution detected, avoid portable command.
Using this graphics system: OpenGL ES 2
GStreamer framework found
Found sdl2 frameworks: /Users/robertjonathansimon/prace/ee/kivy-sdk-packager.git/osx/build/kivy-dependencies/dist/Frameworks/SDL2.framework
Found sdl2 frameworks: /Users/robertjonathansimon/prace/ee/kivy-sdk-packager.git/osx/build/kivy-dependencies/dist/Frameworks/SDL2_ttf.framework
Found sdl2 frameworks: /Users/robertjonathansimon/prace/ee/kivy-sdk-packager.git/osx/build/kivy-dependencies/dist/Frameworks/SDL2_image.framework
Found sdl2 frameworks: /Users/robertjonathansimon/prace/ee/kivy-sdk-packager.git/osx/build/kivy-dependencies/dist/Frameworks/SDL2_mixer.framework
Activate SDL2 compilation
Pango: pangoft2 found via pkg-config
{'libraries': ['pangoft2-1.0', 'pango-1.0', 'gobject-2.0', 'glib-2.0', 'intl', 'harfbuzz', 'fontconfig', 'freetype'], 'include_dirs': ['/private/var/folders/f0/3xl2g3jd51xgjwhz8d47hrn40000gn/T/pip-install-ls2huvl6/kivy_8396c7fe5da84d56ac7a4116de601e95/kivy/include', '/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0', '/opt/homebrew/Cellar/harfbuzz/7.1.0/include/harfbuzz', '/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0', '/opt/homebrew/Cellar/glib/2.76.1/include', '/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi', '/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo', '/opt/homebrew/Cellar/pixman/0.42.2/include/pixman-1', '/opt/homebrew/Cellar/libxcb/1.15_1/include', '/opt/homebrew/Cellar/libxrender/0.9.11/include', '/opt/homebrew/Cellar/libxext/1.3.5/include', '/opt/homebrew/Cellar/libx11/1.8.4/include', '/opt/homebrew/Cellar/libxcb/1.15_1/include', '/opt/homebrew/Cellar/libxau/1.0.11/include', '/opt/homebrew/Cellar/libxdmcp/1.1.4/include', '/opt/homebrew/Cellar/glib/2.76.1/include', '/opt/homebrew/Cellar/harfbuzz/7.1.0/include/harfbuzz', '/opt/homebrew/Cellar/glib/2.76.1/include/glib-2.0', '/opt/homebrew/Cellar/glib/2.76.1/lib/glib-2.0/include', '/opt/homebrew/opt/gettext/include', '/opt/homebrew/Cellar/pcre2/10.42/include', '/opt/homebrew/Cellar/graphite2/1.3.14/include', '/opt/homebrew/Cellar/fontconfig/2.14.2/include', '/opt/homebrew/opt/freetype/include/freetype2', '/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16', '/opt/homebrew/Cellar/xorgproto/2022.2/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/ffi'], 'library_dirs': ['/opt/homebrew/Cellar/pango/1.50.14/lib', '/opt/homebrew/Cellar/glib/2.76.1/lib', '/opt/homebrew/opt/gettext/lib', '/opt/homebrew/Cellar/harfbuzz/7.1.0/lib', '/opt/homebrew/Cellar/fontconfig/2.14.2/lib', '/opt/homebrew/opt/freetype/lib'], 'extra_link_args': ['-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks'], 'extra_compile_args': ['-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks'], 'depends': ['lib/pango/pangoft2.pxi', 'lib/pango/pangoft2.h']}
ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
ERROR: Dependency for boxshadow.pyx not resolved: config.pxi
Building extensions in parallel using 4 cores
Updated build directory to: build/lib.macosx-10.13-universal2-cpython-311
Build configuration is:
* use_rpi = 0
* use_egl = 0
* use_opengl_es2 = 1
* use_opengl_mock = 0
* use_sdl2 = 1
* use_pangoft2 = 1
* use_ios = 0
* use_android = 0
* use_mesagl = 0
* use_x11 = 0
* use_wayland = 0
* use_gstreamer = 1
* use_avfoundation = 1
* use_osx_frameworks = 1
* debug_gl = 0
* kivy_sdl_gl_alpha_size = 8
* debug = False
Updated build/lib.macosx-10.13-universal2-cpython-311/kivy/include/config.h
Updated /private/var/folders/f0/3xl2g3jd51xgjwhz8d47hrn40000gn/T/pip-install-ls2huvl6/kivy_8396c7fe5da84d56ac7a4116de601e95/kivy/include/config.h
Updated build/lib.macosx-10.13-universal2-cpython-311/kivy/include/config.pxi
Updated /private/var/folders/f0/3xl2g3jd51xgjwhz8d47hrn40000gn/T/pip-install-ls2huvl6/kivy_8396c7fe5da84d56ac7a4116de601e95/kivy/include/config.pxi
Updated build/lib.macosx-10.13-universal2-cpython-311/kivy/setupconfig.py
Updated /private/var/folders/f0/3xl2g3jd51xgjwhz8d47hrn40000gn/T/pip-install-ls2huvl6/kivy_8396c7fe5da84d56ac7a4116de601e95/kivy/setupconfig.py
Detected compiler is unix
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for kivy
Failed to build kivy
ERROR: Could not build wheels for kivy, which is required to install pyproject.toml-based projects
[notice] A new release of pip available: 22.3.1 -> 23.1.1
[notice] To update, run: pip install --upgrade pip
kivy-sdk-packager/linux/debian/daily/control
Lines 194 to 197 in db9015b
I don't quite understand why, but if you don't specify the full versions, it breaks package dependency resolution.
Please revert to:
libsdl2-2.0-0,
libsdl2-image-2.0-0 | python-gi | python3-pil,
libsdl2-mixer-2.0-0 | libgstreamer-1.0,
libsdl2-ttf-2.0-0 | python3-pil,
And maybe libgstreamer-1.0-0
, too.
Hey @thopiekar, it seems the revert you did removed all the recent changes to the win folder and probably mac as well. Can you unrevert the revert and then only revert specific commits?
Hello, I have huge problem with run kivy on windows. I have uninstalled all my previous python version but still nothing. I also have tried run with "open with" and "send to" and directly from kivy_bash.bat
Everytime I get error "no module named kivy".
I am trying to run example "hello world" button.
Don't work with 3.4 neither 2.7 version.
The packaged macOS app should contain binaries for both Apple Silicon and Intel (Universal2).
I'm already working on that to handle the Kivy.app
build (See kivy/kivy#7678)
Hi,
so I'm trying to package my app with a garden dep (matplotlib). How do I do that?
I installed matplotlib with --app in the app dir but is that enough? Doing 'kivy main.py' works without problems.
I can successfully run package_app.py, but launching the .app does not work.
I then randomly launched 'myapp.app/Contents/MacOS/Kivy' which apparently prints some debugging info and here the following error appears:
...
ValueError: 'path/to/myapp.app/Contents/Resources/yourapp/libs/garden/garden.matplotlib/__init__.py/__init__.pyc' is not a package
So I'm assuming something's wrong with my garden dependencies. Any ideas?
From @miohtama on January 2, 2017 6:18
pip
shipped with kivy3 fails to work as a normal pip command. Passing -r
option fails to find a requirements file in the current directory.
kivy -m pip install -r requirements-osx.txt
2017-01-02 00:16:27.219 kivy[3712:2765927] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'.
2017-01-02 00:16:27.232 kivy[3712:2765927] App did finish launching
Could not open requirements file: [Errno 2] No such file or directory: 'requirements-osx.txt'
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ls requirements-osx.txt
-rw-r--r-- 1 moo staff 70 Jan 2 00:16 requirements-osx.txt
Copied from original issue: kivy/kivy#4869
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.