Skip to content

Commit

Permalink
well that last push fixed the utf-8 decode issue, and now the Info.pl…
Browse files Browse the repository at this point in the history
…ist file isn't trucnated; it's valid XML:

  bash-3.2$ cat helloWorld.app/Contents/Info.plist
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http:https://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
	  <key>Bundle display name</key>
	  <string>Hello World</string>
	  <key>Bundle identifier</key>
	  <string>org.test</string>
	  <key>Bundle name</key>
	  <string>Hello World</string>
	  <key>Bundle version</key>
	  <string>0.1</string>
	  <key>CFBundleDevelopmentRegion</key>
	  <string>en</string>
	  <key>CFBundleDocumentTypes</key>
	  <array>
		  <dict>
			  <key>CFBundleTypeExtensions</key>
			  <array>
				  <string>*</string>
			  </array>
			  <key>CFBundleTypeRole</key>
			  <string>Viewer</string>
			  <key>LSItemContentTypes</key>
			  <array>
				  <string>public.item</string>
				  <string>public.folder</string>
			  </array>
		  </dict>
	  </array>
	  <key>CFBundleExecutable</key>
	  <string>Kivy</string>
	  <key>CFBundleIconFile</key>
	  <string>appIcon.icns</string>
	  <key>CFBundleIdentifier</key>
	  <string>org.kivy.osxlauncher</string>
	  <key>CFBundleInfoDictionaryVersion</key>
	  <string>6.0</string>
	  <key>CFBundleName</key>
	  <string>Kivy</string>
	  <key>CFBundlePackageType</key>
	  <string>APPL</string>
	  <key>CFBundleShortVersionString</key>
	  <string>1.11.1</string>
	  <key>CFBundleSignature</key>
	  <string>????</string>
	  <key>CFBundleVersion</key>
	  <string>1.11.1</string>
	  <key>LSMinimumSystemVersion</key>
	  <string>10.7.0</string>
	  <key>LSUIElement</key>
	  <true/>
	  <key>NSAppTransportSecurity</key>
	  <dict>
		  <key>NSAllowsArbitraryLoads</key>
		  <true/>
	  </dict>
	  <key>NSHumanReadableCopyright</key>
	  <string>© 2015 Kivy team</string>
	  <key>NSMainNibFile</key>
	  <string>MainMenu</string>
	  <key>NSPrincipalClass</key>
	  <string>NSApplication</string>
  </dict>
  </plist>
  bash-3.2$

But now helloWorld.app just doesn't open at all, it just does nothing; without any output.

This reminds me of what would happen when I'd remove just a little too much during the thinning process. Now that buildozer doesn't stumble on the xml issue, I see that it's automatically doing a bunch of thinning.

 * https://pipelines.actions.githubusercontent.com/F2zzeBHbT5rqUO9ZVMwB3U8BPkur9naeactTMfgHfMsfOMttkU/_apis/pipelines/1/runs/28/signedlogcontent/3?urlExpires=2020-06-22T08%3A03%3A09.7873403Z&urlSigningMethod=HMACV1&urlSignature=zmL9BGF8mDmQdbPGWXQ6iVcPzjP6iGmBDm1UpemApxA%3D

Perhaps this is too much thinning?

  2020-06-22T00:14:57.9122440Z + buildozer osx debug
  2020-06-22T00:14:59.1278010Z You are using pip version 19.0.3, however version 20.2b1 is available.
  2020-06-22T00:14:59.1279010Z You should consider upgrading via the 'pip install --upgrade pip' command.
  2020-06-22T00:15:08.3331810Z find: helloWorld.app/Contents/Resources/yourapp: No such file or directory
  2020-06-22T00:15:08.8101470Z + '[' 'x$1' == x ']'
  2020-06-22T00:15:08.8101730Z + APPPATH=./helloWorld.app
  2020-06-22T00:15:08.8102570Z + PYPATH=./helloWorld.app/Contents/Frameworks/python
  2020-06-22T00:15:08.8103920Z + rm -rf ./helloWorld.app/Contents/Resources/kivy/doc ./helloWorld.app/Contents/Resources/kivy/build ./helloWorld.app/Contents/Resources/kivy/examples
  2020-06-22T00:15:08.8786280Z + rm -rf ./helloWorld.app/Contents/Resources/kivy/kivy/tools ./helloWorld.app/Contents/Resources/kivy/kivy/tests
  2020-06-22T00:15:08.8992620Z + rm -rf ./helloWorld.app/Contents/Resources/venv/bin/cython ./helloWorld.app/Contents/Resources/venv/bin/cythonize ./helloWorld.app/Contents/Resources/venv/bin/cygdb ./helloWorld.app/Contents/Resources/venv/bin/osxrelocator ./helloWorld.app/Contents/Resources/venv/bin/pip ./helloWorld.app/Contents/Resources/venv/bin/pip3 ./helloWorld.app/Contents/Resources/venv/bin/pip3.7 ./helloWorld.app/Contents/Resources/venv/bin/pygmentize ./helloWorld.app/Contents/Resources/venv/bin/easy_install ./helloWorld.app/Contents/Resources/venv/bin/easy_install-3.7 ./helloWorld.app/Contents/Resources/venv/bin/rst2html.py ./helloWorld.app/Contents/Resources/venv/bin/rst2html4.py ./helloWorld.app/Contents/Resources/venv/bin/rst2html5.py ./helloWorld.app/Contents/Resources/venv/bin/rst2latex.py ./helloWorld.app/Contents/Resources/venv/bin/rst2man.py ./helloWorld.app/Contents/Resources/venv/bin/rst2odt.py ./helloWorld.app/Contents/Resources/venv/bin/rst2odt_prepstyles.py ./helloWorld.app/Contents/Resources/venv/bin/rst2pseudoxml.py ./helloWorld.app/Contents/Resources/venv/bin/rst2s5.py ./helloWorld.app/Contents/Resources/venv/bin/rst2xetex.py ./helloWorld.app/Contents/Resources/venv/bin/rst2xml.py ./helloWorld.app/Contents/Resources/venv/bin/rstpep2html.py
  2020-06-22T00:15:08.9046500Z + rm -rf ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/pip ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/pip-20.1.1.dist-info ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/Cython ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/Cython-0.28.2.dist-info ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/setuptools ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/setuptools-40.8.0.dist-info ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/osxrelocator ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/osxrelocator-1.0.1.dist-info ./helloWorld.app/Contents/Resources/venv/lib/python3.7/site-packages/cython.py './helloWorld.app/Contents/Resources/venv/lib/python3.*/site-packages/wheel/test*'
  2020-06-22T00:15:08.9929030Z + rm -rf './helloWorld.app/Contents/Resources/venv/lib/python3.*/site-packages/wheel/test'
  2020-06-22T00:15:08.9965050Z + rm -rf ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/turtledemo ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/test ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/curses ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/unittest ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/ensurepip ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/idlelib ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/pydoc_data './helloWorld.app/Contents/Frameworks/python/3.*/lib/python3.*/setuptools*'
  2020-06-22T00:15:09.1486140Z + rm -rf ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/site-packages/easy_install.py ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/site-packages/pip ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/python3.7/site-packages/pip-19.0.3.dist-info
  2020-06-22T00:15:09.1858840Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/lib/python3.*/site-packages/wheel/test'
  2020-06-22T00:15:09.1879980Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/lib/python3.*/sqlite3'
  2020-06-22T00:15:09.1907370Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/lib/python3.*/tkinter'
  2020-06-22T00:15:09.1944720Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/bin/pygmentize' ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/2to3 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/2to3-3.7 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip3 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip3.7 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python-config ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python3-config ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python3.7-config ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python3.7m-config ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/easy_install ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/easy_install-3.7 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/idle ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/idle3 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/idle3.7 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pydoc ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pydoc3 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pydoc3.7 './helloWorld.app/Contents/Frameworks/python/3.*/bin/python3.5m*' './helloWorld.app/Contents/Frameworks/python/3.*/bin/rst*' ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip3 ./helloWorld.app/Contents/Frameworks/python/3.7.3/bin/pip3.7
  2020-06-22T00:15:09.1978980Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/lib/lib*' ./helloWorld.app/Contents/Frameworks/python/3.7.3/lib/pkgconfig
  2020-06-22T00:15:09.2004250Z + rm -rf ./helloWorld.app/Contents/Frameworks/python/3.7.3/include
  2020-06-22T00:15:09.2130640Z + rm -rf './helloWorld.app/Contents/Frameworks/python/3.*/lib/pkgconfig'
  2020-06-22T00:15:09.2270710Z + set -e
  2020-06-22T00:15:09.2271300Z + '[' XhelloWorld.app == X ']'
  2020-06-22T00:15:09.2272180Z + set -x
  2020-06-22T00:15:09.2276860Z ++ basename helloWorld.app .app
  2020-06-22T00:15:09.2298200Z + APP_NAME=helloWorld
  2020-06-22T00:15:09.2299540Z + DMG_BACKGROUND_IMG=background.png
  2020-06-22T00:15:09.2299820Z + SYMLINKS_SCRIPT=MakeSymlinks
  2020-06-22T00:15:09.2300190Z + VOL_NAME=helloWorld
  2020-06-22T00:15:09.2300920Z + DMG_TEMP=helloWorld-temp.dmg
  2020-06-22T00:15:09.2301070Z + DMG=helloWorld.dmg
  2020-06-22T00:15:09.2301160Z + STAGING_DIR=_install
  2020-06-22T00:15:09.2301620Z + rm -rf _install helloWorld.dmg helloWorld-temp.dmg
  2020-06-22T00:15:09.2322610Z + echo '-- Copy application into install dir'
  2020-06-22T00:15:09.2322780Z + mkdir _install
  2020-06-22T00:15:09.2344810Z + cp -a helloWorld.app _install
  2020-06-22T00:15:10.9125760Z + ln -s /Applications _install/Applications
  2020-06-22T00:15:10.9148740Z + mkdir _install/.background
  2020-06-22T00:15:10.9168540Z + cp data/background.png _install/.background/
  2020-06-22T00:15:10.9191230Z + cp data/MakeSymlinks _install/MakeSymlinks
  2020-06-22T00:15:10.9213640Z + echo '-- Create volume'
  2020-06-22T00:15:10.9220050Z + du -sm _install
  2020-06-22T00:15:10.9220560Z + awk '{print $1}'
  2020-06-22T00:15:10.9456290Z ++ cat _size
  2020-06-22T00:15:10.9478300Z + expr 232 + 99
  2020-06-22T00:15:10.9522360Z ++ cat _size
  2020-06-22T00:15:10.9541470Z + hdiutil create -srcfolder _install -volname helloWorld -fs HFS+ -format UDRW -size 331M helloWorld-temp.dmg
  2020-06-22T00:15:37.1602800Z + rm _size
  2020-06-22T00:15:37.1627490Z + hdiutil unmount /Volumes/helloWorld
  2020-06-22T00:15:37.1788360Z hdiutil: unmount: "/Volumes/helloWorld" failed to unmount due to error 2.
  2020-06-22T00:15:37.1957190Z hdiutil: unmount failed - No such file or directory
  2020-06-22T00:15:37.1962370Z + true
  2020-06-22T00:15:37.1974310Z ++ hdiutil attach -readwrite -noverify helloWorld-temp.dmg
  2020-06-22T00:15:37.1980020Z ++ egrep '^/dev/'
  2020-06-22T00:15:37.1980180Z ++ sed 1q
  2020-06-22T00:15:37.1981210Z ++ awk '{print $1}'
  2020-06-22T00:15:37.4111150Z + DEVICE=/dev/disk2
  2020-06-22T00:15:37.4113820Z + sleep 2
  2020-06-22T00:15:39.5222500Z + echo '
  2020-06-22T00:15:39.5222730Z    tell application "Finder"
  2020-06-22T00:15:39.5222830Z      tell disk "helloWorld"
  2020-06-22T00:15:39.5222920Z            open
  2020-06-22T00:15:39.5223020Z            set current view of container window to icon view
  2020-06-22T00:15:39.5223120Z            set toolbar visible of container window to false
  2020-06-22T00:15:39.5223220Z            set statusbar visible of container window to false
  2020-06-22T00:15:39.5223310Z            delay 1
  2020-06-22T00:15:39.5223410Z 		   set the bounds of container window to {100, 100, 650, 501}
  2020-06-22T00:15:39.5223510Z            delay 1
  2020-06-22T00:15:39.5223670Z            set viewOptions to the icon view options of container window
  2020-06-22T00:15:39.5223790Z            set arrangement of viewOptions to not arranged
  2020-06-22T00:15:39.5223890Z            set icon size of viewOptions to 128
  2020-06-22T00:15:39.5224000Z            set background picture of viewOptions to file ".background:background.png"
  2020-06-22T00:15:39.5224110Z            set position of item "helloWorld.app" of container window to {160, 265}
  2020-06-22T00:15:39.5224220Z            set position of item "Applications" of container window to {384, 265}
  2020-06-22T00:15:39.5224320Z            close
  2020-06-22T00:15:39.5224410Z            open
  2020-06-22T00:15:39.5224600Z            update without registering applications
  2020-06-22T00:15:39.5224700Z            delay 2
  2020-06-22T00:15:39.5224930Z      end tell
  2020-06-22T00:15:39.5225020Z    end tell
  2020-06-22T00:15:39.5225100Z + osascript
  2020-06-22T00:15:39.5225760Z '
  2020-06-22T00:17:40.3758400Z 85:134: execution error: Finder got an error: AppleEvent timed out. (-1712)
  2020-06-22T00:17:40.3774210Z [0m[1;34m# Check configuration tokens[0m
  2020-06-22T00:17:40.3788320Z [0m[1;34m# Ensure build layout[0m
  2020-06-22T00:17:40.3789690Z [0m[1;34m# Check configuration tokens[0m
  2020-06-22T00:17:40.3792040Z [0m[1;34m# Preparing build[0m
  2020-06-22T00:17:40.3793050Z [0m[1;34m# Check requirements for osx[0m
  2020-06-22T00:17:40.3793500Z [0m[1;34m# Check if kivy-sdk-packager exists[0m
  2020-06-22T00:17:40.3794060Z [0m[1;34m# kivy-sdk-packager found at /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/buildozer/.buildozer/osx/platform[0m
  2020-06-22T00:17:40.3794530Z [0m[1;34m# check if Kivy.app exists in local dir[0m
  2020-06-22T00:17:40.3795100Z [0m[1;34m# Kivy.app found at /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/buildozer/.buildozer/osx/platform/kivy-sdk-packager-master/osx[0m
  2020-06-22T00:17:40.3795550Z [0m[1;34m# Install platform[0m
  2020-06-22T00:17:40.3796110Z [0m[1;34m# Check application requirements[0m
  2020-06-22T00:17:40.3796760Z [0m[1;30m# Remove directory and subdirectory /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/buildozer/.buildozer/applibs[0m
  2020-06-22T00:17:40.3797310Z [0m[1;30m# Create directory /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/buildozer/.buildozer/applibs[0m
  2020-06-22T00:17:40.3797760Z [0m[1;34m# Compile platform[0m
  2020-06-22T00:17:40.3798180Z [0m[1;34m# Build the application maltfield#1[0m
  2020-06-22T00:17:40.3798690Z [0m[1;30m# Copy application source from /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/src[0m
  2020-06-22T00:17:40.3799240Z [0m[1;30m# Create directory /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/buildozer/.buildozer/osx/app[0m
  2020-06-22T00:17:40.3799740Z [0m[1;30m# Copy /Users/runner/runners/2.263.0/work/cross-platform-python-gui/cross-platform-python-gui/src/main.py[0m
  2020-06-22T00:17:40.3800200Z [0m[1;34m# Package the application[0m
  2020-06-22T00:17:40.3800630Z [0m[1;34m# Building package[0m
  2020-06-22T00:17:40.3801050Z [0m[1;34m# Create helloWorld.app[0m
  2020-06-22T00:17:40.3801480Z [0m[1;34m# helloWorld.app created.[0m
  2020-06-22T00:17:40.3801900Z [0m[1;34m# Creating helloWorld.dmg[0m
  2020-06-22T00:17:40.3802050Z Traceback (most recent call last):
  2020-06-22T00:17:40.3802160Z   File "/Users/runner/Library/Python/3.7/bin/buildozer", line 8, in <module>
  2020-06-22T00:17:40.3802330Z     sys.exit(main())
  2020-06-22T00:17:40.3802870Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/scripts/client.py", line 13, in main
  2020-06-22T00:17:40.3803000Z     Buildozer().run_command(sys.argv[1:])
  2020-06-22T00:17:40.3803500Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/__init__.py", line 1004, in run_command
  2020-06-22T00:17:40.3803620Z     self.target.run_commands(args)
  2020-06-22T00:17:40.3804120Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/targets/osx.py", line 214, in run_commands
  2020-06-22T00:17:40.3804250Z     func(args)
  2020-06-22T00:17:40.3804960Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/targets/osx.py", line 230, in cmd_debug
  2020-06-22T00:17:40.3805090Z     self.buildozer.build()
  2020-06-22T00:17:40.3805590Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/__init__.py", line 205, in build
  2020-06-22T00:17:40.3805700Z     self.target.build_package()
  2020-06-22T00:17:40.3806190Z   File "/Users/runner/Library/Python/3.7/lib/python/site-packages/buildozer/targets/osx.py", line 140, in build_package
  2020-06-22T00:17:40.3806320Z     cwd=cwd)
  2020-06-22T00:17:40.3806440Z   File "/Applications/Xcode_11.5.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 395, in check_output
  2020-06-22T00:17:40.3806550Z     **kwargs).stdout
  2020-06-22T00:17:40.3806900Z   File "/Applications/Xcode_11.5.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 487, in run
  2020-06-22T00:17:40.3807060Z     output=stdout, stderr=stderr)
  2020-06-22T00:17:40.3807620Z subprocess.CalledProcessError: Command '('sh', '-x', 'create-osx-dmg.sh', 'helloWorld.app')' returned non-zero exit status 1.

How does it decide what to thin and not? Well, There is a 'requirements' line in the buildozer spec. I had issues before where the default (which was 'python3,kvy') was causing pip to fail because buildozer was enumerating this list apparently and causing it to try a `pip install python3` which doesn't make sense. I'm thining package_app.py is pulling from this list and removing python2 from the .app because it's not present. Let's add it back and see what happens.

If the next build fails at the `pip install python3` step, then I'll probably want to figure out how to add the '--strip=False' argument to test my theory instead, then use '--deps' and/or --whitelist or --blacklist in the package_app.py call somehow

    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # On branch master
    # Your branch is ahead of 'origin/master' by 1 commit.
    #   (use "git push" to publish your local commits)
    #
    # Changes to be committed:
    #	modified:   buildDmg.sh
    #
  • Loading branch information
maltfield committed Jun 22, 2020
1 parent ea5976b commit be7943f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/mac/buildDmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ package.domain = org.test
source.dir = ../src/
source.include_exts = py,png,jpg,kv,atlas
version = 0.1
requirements = kivy
requirements = python3,kivy
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
Expand Down Expand Up @@ -218,7 +218,7 @@ ln -s ../../../Frameworks/python/$PYTHON_VERSION/bin/python3 .
popd

# Go into kivy sdk directory and fix the script package_app.py to use the specified python version.
cp package_app.py pakage_app.py.orig
cp package_app.py package_app.py.orig
echo "===package_app.py======================================================="
cat package_app.py
echo "===package_app.py======================================================="
Expand Down

0 comments on commit be7943f

Please sign in to comment.