Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build release. File "/usr/lib/python3.6/shutil.py", line 96, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: #851

Closed
OlivierGagnon opened this issue Mar 10, 2019 · 4 comments
Labels

Comments

@OlivierGagnon
Copy link
Contributor

OlivierGagnon commented Mar 10, 2019

Versions

  • Python: 3.6
  • OS: Ubuntu 18.04
  • Buildozer: 0.40.dev0

Description

Unable to build release, files aren't copied and getting patch error.

buildozer.spec

Command:

buildozer android release

Spec file:

[app]
title = My App
package.name = helloworld
package.domain = ca.megalex
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
version = 0.1
requirements = python3,kivy
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.arch = armeabi-v7a
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0
[buildozer]
log_level = 2
warn_on_root = 1

Logs

[DEBUG]:   	27 actionable tasks: 26 executed, 1 up-to-date
[INFO]:    <- directory context /home/megalex/kivy-helloworld/.buildozer/android/platform/python-for-android
[INFO]:    # Copying APK to current directory
[INFO]:    # APK filename not found in build output. Guessing...
[INFO]:    # Found APK file: /home/megalex/kivy-helloworld/.buildozer/android/platform/build/dists/helloworld/build/outputs/apk/release/helloworld-release-unsigned.apk
[INFO]:    # Add version number to APK
[INFO]:    # APK renamed to helloworld-0.1-release-unsigned.apk
[DEBUG]:   -> running cp /home/megalex/kivy-helloworld/.buildozer/android/platform/build/dists/helloworld/build/outputs/apk/release/helloworld-release-unsigned.apk helloworld-0.1-release-unsigned.apk
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
Traceback (most recent call last):
  File "/home/megalex/.local/bin/buildozer", line 11, in <module>
    sys.exit(main())
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/__init__.py", line 1044, in run_command
    self.target.run_commands(args)
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/target.py", line 140, in cmd_release
    self.buildozer.build()
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/__init__.py", line 214, in build
    self.target.build_package()
  File "/home/megalex/.local/lib/python3.6/site-packages/buildozer/targets/android.py", line 1067, in build_package
    copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
  File "/usr/lib/python3.6/shutil.py", line 96, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: u'/home/megalex/kivy-helloworld/.buildozer/android/platform/build/dists/helloworld/build/outputs/apk/release-unsigned/helloworld-release-unsigned.apk'
@OlivierGagnon
Copy link
Contributor Author

Looks like it was previously reported in

#312

#649

#606

@OlivierGagnon
Copy link
Contributor Author

OlivierGagnon commented Mar 10, 2019

Ok I was able to solve this one... I had to specify these variables:

export P4A_RELEASE_KEYSTORE=xxx
export P4A_RELEASE_KEYSTORE_PASSWD=xxx
export P4A_RELEASE_KEYALIAS_PASSWD=xxx
export P4A_RELEASE_KEYALIAS=x

This page had the info: https://github.com/kivy/kivy/wiki/Creating-a-Release-APK

@AndreMiras
Copy link
Member

Thanks for the report and the follow-up 👍
Yes we should definitely handle this more gracefully. Let's leave this ticket open until we address it.

@AndreMiras
Copy link
Member

FYI we can now build an unsigned released since #835 so I think it's safe to close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants