Git Product home page Git Product logo

briefcase's Introduction

logo

Briefcase

Python Versions PyPI Version Maturity BSD License Build Status Discord server

Briefcase is a tool for converting a Python project into a standalone native application. You can package projects for:

  • Mac
  • Windows
  • Linux
  • iPhone/iPad
  • Android
  • Web

Support for AppleTV, watchOS, and wearOS deployments is planned.

Getting started

To install Briefcase, run:

$ python -m pip install briefcase

If you would like a full introduction to using Briefcase, try the BeeWare tutorial. This tutorial walks you through the process of creating and packaging a new application with Briefcase.

Documentation

Documentation for Briefcase can be found on Read The Docs.

Community

Briefcase is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with Briefcase, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

briefcase's People

Contributors

agyey avatar ahter avatar andrewleech avatar basepi avatar belthesar avatar brutusthebee avatar cguardia avatar curiouslearner avatar danyeaw avatar dependabot[bot] avatar eliasdorneles avatar elijahahianyo avatar elliegraves avatar freakboy3742 avatar glasnt avatar iamzili avatar kevin-brown avatar marcmolla avatar markuspiotrowski avatar mcscope avatar mhsmith avatar nadi726 avatar paulproteus avatar prestonmclean avatar proneon267 avatar rmartin16 avatar saroad2 avatar therealphildini avatar tlambert03 avatar yngvem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

briefcase's Issues

iOS error - ValueError: Library 'c' not found

When following the tutorials, I am able to complete tutorial 1, but tutorial 2 will not run on a physical iOS device - only on the simulator.

When I attempt to run it on an actual iOS device, the app will display the splash screen but then quit straight after.

The error message from the console is:

2017-05-26 14:00:53.583 Tutorial 0[11917:5779110] PYTHONPATH is: PYTHONPATH=/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app:/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages
2017-05-26 14:00:53.584 Tutorial 0[11917:5779110] Initializing Python runtime
2017-05-26 14:00:54.830 Tutorial 0[11917:5779110] Running /var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app/tutorial_0/__main__.py
Traceback (most recent call last):
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app/tutorial_0/__main__.py", line 1, in <module>
    from tutorial_0.app import main
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app/tutorial_0/app.py", line 1, in <module>
    import toga
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/toga/__init__.py", line 114, in <module>
    set_platform()
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/toga/__init__.py", line 86, in set_platform
    local_vars['platform'] = importlib.import_module(module_name)
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Python.framework/Resources/lib/python35.zip/importlib/__init__.py", line 126, in import_module
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/toga_iOS/__init__.py", line 2, in <module>
    from .app import *
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/toga_iOS/app.py", line 1, in <module>
    from rubicon.objc import objc_method
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/rubicon/objc/__init__.py", line 3, in <module>
    from .objc import (
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/rubicon/objc/objc.py", line 27, in <module>
    c = cdll.LoadLibrary(_find_or_error('c'))
  File "/var/containers/Bundle/Application/C6D15E50-4F2F-41B3-9CEE-CF09CF1D4637/Tutorial 0.app/Library/Application Support/org.pibakery.tutorial_0/app_packages/rubicon/objc/objc.py", line 23, in _find_or_error
    raise ValueError("Library {!r} not found".format(name))
ValueError: Library 'c' not found
2017-05-26 14:00:58.937 Tutorial 0[11917:5779110] Application quit abnormally!
2017-05-26 14:00:59.029 Tutorial 0[11917:5779110] Leaving

I'm using Xcode 7.3.1.

Any advice?

LSOpenURLsWithRole() failed with error -10810 (on mac sierra)

I just did a fresh install of sierra, and have installed pyenv with homebrew and tested that it's working. I have a local 3.5.0 version of python in a virtualenv (read that 3.6 isn't working). I go through the tutorial and everything works until i try to compile...

running macos

  • Writing application template...
    Template Python-macOS-template succesfully updated.
    Project template: /Users/bigmac/.cookiecutters/Python-macOS-template
  • Determining best support package...
  • Installing support package...
    Support package: https://pybee-briefcase-support.s3-us-west-2.amazonaws.com/Python-Apple-support/3.5/macOS/Python-3.5-macOS-support.b4.tar.gz
  • Installing requirements...
    No requirements.
  • Installing plaform requirements...
    Collecting toga-cocoa
    Using cached toga_cocoa-0.2.15-py3-none-any.whl
    Collecting rubicon-objc>=0.2.8 (from toga-cocoa)
    Using cached rubicon_objc-0.2.8-py3-none-any.whl
    Collecting toga-core>=0.2.15 (from toga-cocoa)
    Using cached toga_core-0.2.15-py3-none-any.whl
    Collecting colosseum>=0.1.6 (from toga-core>=0.2.15->toga-cocoa)
    Using cached colosseum-0.1.6-py3-none-any.whl
    Installing collected packages: rubicon-objc, colosseum, toga-core, toga-cocoa
    Successfully installed colosseum-0.1.6 rubicon-objc-0.2.8 toga-cocoa-0.2.15 toga-core-0.2.15
  • Installing project code...
    Processing /Users/bigmac/Documents/python/python_3_projects/tutorial/helloworld
    Installing collected packages: helloworld
    Running setup.py install for helloworld ... done
    Successfully installed helloworld-0.0.1
  • No icons defined - using default...
  • No splash screen defined...

Installation complete.
Starting Hello WOrld.app
LSOpenURLsWithRole() failed with error -10810 for the file /Users/bigmac/Documents/python/python_3_projects/tutorial/helloworld/macOS/Hello WOrld.app.

I tried the toga-demo and it worked fin on the same virtual env, if that helps. Also, after I get this running reliably, i'd like to contribute to the docs and the website. cheers!

Hashlib lacks 'ripemd160' even though included libSSL provides it

Any chance you guys can build python with the cpython .so stuff included so that hashlib picks up the 'ripemd160' hashing algorithm?

I need this algorithm to be available from the Python provided by HashLib.. but it isn't.

I'm porting Electron Cash to iOS.. which is why I ask.

Otherwise great work guys!

Briefcase should more gracefully handle app lifecycle

Right now, updating the code in an app doesn't update the code in the generated template. There's two parts to fixing this.

One is make running setup.py for Briefcase idempotent (related to #25).

Two is adding some sort of "watcher" that will update only the parts needed when the app changes.

Need "cryptograph" lib (python) but it has C parts (.so)

Hi guys,

I'm porting Electron Cash (the bitcoin cash SPV wallet) to iOS and I'm using your wonderful Briefcase project to do it.

Electron Cash depends on libOpenSSL, which thankfully you guys compiled for Simulator & device and have included (yay!).

It also needs the python 'cryptography' module, but this module includes native C-parts compiled as .so's.

I can't figure out how to get this module into an iOS simulator & device. Ideally I would just compile it into fat binary .so's for iOS & Simulator and be done with it -- but the setup.py business and pip are cryptic to me (I'm an iOS dev, not much of a python dev).

Can you guys help me? How do I get started? In general how do I compile python modules that contain native bits to work on iOS & Simulator?

ANY HELP IS APPRECIATED! Thanks in advance!

EDIT: It turns out I need 'ripemd160' from hashlib and OpenSSL. Will open another ticket for this.

error: invalid command 'osx'

I installed briefcase using pip install briefcase, but then I couldn't run briefcase as I get:

(ENV)$ briefcase
-bash: briefcase: command not found

Now when I try and build the toga webkit browser test app I get the following error:

(ENV) $ python setup.py osx
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'osx'

This is probably because the briefcase commands have not been added to my virtual environment? OS X 10.11.4; Python 3.5.1

Add a developer mode

Briefcase installs the platform requirements defined in the setup.py file.

For someone using briefcase-template, for example, this means that it will pip install into the $PLATFORM/app_packages directory the packages defined in the setup.py.

It would be nice to have a "platform developer mode", which would use a local version of those packages (specially useful for someone working on Toga).

One idea to implement this would be to provide a way of configuring alternative local versions for the requirements there, e.g.:

python setup.py TARGET --overrides package-overrides.json

And then, package-overrides.json could have something like:

{
    "toga": "/home/elias/src/toga/src/core/",
    "toga-android": "/home/elias/src/toga/src/android/"
}

This information would then be used by the install_platform_requirements function to feed pip the package names with the overrides applied.

Error while creating the Template (Android @ Linux - Ubuntu)

I'm a really newbie at this, so excuse me if I write something stupid :p

Moving on, the only error that appears is this:

Complete output from command python setup.py egg_info:
running egg_info
error: Invalid distribution name or version syntax: toga--0.1

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-klmvtchk-build/

I looked in briefcase files, trying to figure it out where he requires the toga--0.1 but can't find it, to help fixing this.

In the end it claims Installation complete ready to build the apk.
So, I ran the ant debug , 15 seconds later expels the *.apk with 135kb

I installed it on Android, no Bugs, except when I open it.
I says every time Hello World on a black screen, even if I don't used those words in any way (name, vars, config) so must be a default file that compiles...

Where to start to fixing this ?

Some suggestions:
I setup a new instance of Linux in VirtualBox for this, so I start fresh
The pip install toga was ok, but on pip install briefcase crashed with the Exception git not installed ,
and I easily installed git.
But the author intends that this tools should be used by children/newbies in this PyCon presentation, so I think we should create a file(for eack pybee package) like os_requirements.py or os_setup.py or even os_must_have_this_to_run_this_tool.json, and check if the OS requirements are installed (as soon we figure it out what we need in individual platform), for each platform (maybe it seems excessive, but is nice for those that are giving the first steps, and they don't go away to use another tool instead)

for this git thing we can proceed with:

has_git = subprocess.check_output(['git', '--version'])
except FileNotFoundError:
if os.uname()[0] == 'Linux' and 'Ubuntu' in os.uname()[3]:
print ('you need to install git with "sudo apt-get install git"') right ?

or maybe if the git is just to download the file and install it with pip, by simply change to pip install --upgrade git+https://release (it will always download the latest)

but I'm not sure if works with this command,
https://github.com/pybee/briefcase/blob/master/briefcase/app.py#L99
because I don't understand if is looking for toga or something like toga-android but for main packages works...

We could do this for git, JAVA_HOME, javac and so on, because even for me it's not easy to configure OS_dependencies.

Waiting for instructions, maybe I can help with this, with tousands of bugs :p

Tutorial 0 not working

I've tried to follow Tutorial 0 with the following commands:

Getting Started (but with a conda environment):

conda create -n toga python=3.4
source activate toga
pip install briefcase 

Tutorial:

pip install cookiecutter briefcase
cookiecutter https://github.com/pybee/briefcase-template
cd tutorial_0

Note, here I do not ""Add this"" to tutorial_0/app.py but rather replace. I think if it is just added, there would be two main() functions, which might be a problem.

Then, when try to run it with python setup.py ios, I get the following error:

$ python setup.py ios
running ios
 * Writing application template...
Template Python-iOS-template succesfully updated.
Project template: /Users/mankoff/.cookiecutters/Python-iOS-template
Traceback (most recent call last):
  File "setup.py", line 72, in <module>
    'toga-django',
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/site-packages/briefcase/app.py", line 316, in run
    self.generate_app_template()
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/site-packages/briefcase/app.py", line 192, in generate_app_template
    'secret_key': self.secret_key,
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/site-packages/cookiecutter/main.py", line 63, in cookiecutter
    no_input=no_input,
  File "/Users/mankoff/local/anaconda/envs/toga/lib/python3.4/site-packages/cookiecutter/repository.py", line 101, in determine_repo_dir
    '\n'.join(repository_candidates)
cookiecutter.exceptions.RepositoryNotFound: A valid repository for "/Users/mankoff/.cookiecutters/Python-iOS-template" could not be found in the following locations:
/Users/mankoff/.cookiecutters/Python-iOS-template
/Users/mankoff/.cookiecutters/Python-iOS-template
$

At the time of writing this issue, nothing is on Google (or Bing!) when I search for those error messages, so I thought people here might be able to help debug this.

Allow specifying an entry point

Currently, briefcase looks for app.py which starts the application. It would be nice if an entry point could be specified instead. See pynsist's entry_point for inspiration.

import ssl error

When executing:
import ssl
I get:

Traceback (most recent call last):
File "/Users/james/projects/pycon_projects/hello_briefcase/hello_briefcase/macOS/hello_briefcase.app/Contents/Resources/python/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Users/james/projects/pycon_projects/hello_briefcase/hello_briefcase/macOS/hello_briefcase.app/Contents/Resources/python/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/james/projects/pycon_projects/hello_briefcase/hello_briefcase/macOS/hello_briefcase.app/Contents/Resources/app/hello_briefcase/main.py", line 1, in
from hello_briefcase.app import main
File "/Users/james/projects/pycon_projects/hello_briefcase/hello_briefcase/macOS/hello_briefcase.app/Contents/Resources/app/hello_briefcase/app.py", line 10, in
import ssl
File "/Users/james/projects/pycon_projects/hello_briefcase/hello_briefcase/macOS/hello_briefcase.app/Contents/Resources/python/lib/python3.5/ssl.py", line 99, in
import _ssl # if we can't import it, let the error propagate
ImportError: No module named '_ssl'

Crashing when trying to import a class from non existing module

Trying to compile the following code (which uses a class in a package that doesn't exist), in a file import_class.py:

from doesntexist import SomeClass


s = SomeClass()
s.start()

If I compile the previous code with VOC and try to run it not having the doesntexist module in the classpath, I get the following error:

Exception in thread "main" java.lang.ClassCastException: org.python.java.Module cannot be cast to org.python.Callable
	at python.import_class.__init__.module$import(import_class.py:4)
	at python.import_class.__init__.main(import_class.py)

I'd expect to get an ImportError, like:

$ python import_class.py 
Traceback (most recent call last):
  File "import_class.py", line 1, in <module>
    from doesntexist import SomeClass
ImportError: No module named 'doesntexist'

Hello World fails at “xcrun: error: unable to find utility "xcodebuild"”

Following the Briefcase tutorial 0 for iOS, I get a failure when attempting to “put it in a briefcase”.

$ python3 -m setup ios -s
running ios

[…]
Installation complete.
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/benfinney/Projects/python/Briefcase/tutorial/helloworld/setup.py", line 79, in <module>
    'toga-django',
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/benfinney/.virtualenvs/briefcase-tutorial/lib/python3.5/site-packages/briefcase/app.py", line 345, in run
    self.build_app()
  File "/Users/benfinney/.virtualenvs/briefcase-tutorial/lib/python3.5/site-packages/briefcase/ios.py", line 139, in build_app
    if not self.has_required_xcode_version():
  File "/Users/benfinney/.virtualenvs/briefcase-tutorial/lib/python3.5/site-packages/briefcase/ios.py", line 130, in has_required_xcode_version
    for v in output.split('\n')[0].split(' ')[1].split('.')[:2]
IndexError: list index out of range

$ xcrun --version
xcrun version 32.

$ xcrun --show-sdk-path

The tutorial doesn't give any indication that I need to so anything special to get Xcode commands working; it goes straight from writing my Python code, to running the above Distutils command.

Add option to fallback for using different Python version

Currently, we only use the template and support package for the user's running Python version.
It would be nice to allow users to override this, making it easier for people using the most recent Python versions (and maybe even the release candidates) to try things out.

It would be great to be able to do python setup.py ios --use-python-version=3.6 =)

Add support for Apple tvOS

Now that the Python iOS support libraries support tvOS, Briefcase should also support that platform.

This will involve adding a new command to Briefcase to support tvOS. The implementation of this command will be almost identical to iOS, with names and images changed.

A template cookiecutter project already exists.

open marketplace for pybee apps based on briefcase

@freakboy3742 I noticed that you are exploring ways to fund pybee (beeware) development. So why not open a marketplace? This is where developers can easily deploy their apps on multiple devices and consumers can easily get them on their platform. This can of course be integrated with existing app stores by providing a "runtime" which all apps can be built on top (e.g. like adobe air).

linux support

How should Linux support work?

One way would be to have some sort of build system that always carefully only links against libc 5, does everything statically, etc, and builds everything into a big binary.

Another would be to instead have multiple backends for .rpm, .deb, etc. I imagine that this would be different from bdist_rpm, bdist_deb et. al. by doing some automatic determination of what the package dependencies ought to be by looking for shared library dependencies. Despite the fact that this would not be nearly as self-contained, it might be more practically useful to begin with.

Error when running setup.py for various platforms

Thanks so much to the developers of this project, I am absolutely loving working with this, just had a little hiccup. 😳

Using macOS Sierra, when I run python3 setup.py ios -s, or a setup for any other platform, I get the error as follows:

(venv) MacBookPro:beeccc liam$ python3 setup.py ios -s
running ios
 * Writing application template...
Project template: https://github.com/pybee/Python-iOS-template.git
Traceback (most recent call last):
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/vcs.py", line 129, in clone
    stderr=subprocess.STDOUT,
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'checkout', '3.6']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 79, in <module>
    'toga-django',
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/briefcase/app.py", line 336, in run
    self.generate_app_template()
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/briefcase/app.py", line 195, in generate_app_template
    'secret_key': self.secret_key,
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/main.py", line 63, in cookiecutter
    no_input=no_input,
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/repository.py", line 84, in determine_repo_dir
    no_input=no_input,
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/vcs.py", line 132, in clone
    if 'not found' in clone_error.output.lower():
TypeError: a bytes-like object is required, not 'str'

I suspect this is because git is failing to clone the cookiecutter for the selected platform. If this is the case, should it perhaps fail more gracefully?

When I try again running the setup.py for ios again I get this:

(venv) MacBookPro:beeccc liam$ python3 setup.py ios -s
running ios
 * Writing application template...
Template Python-iOS-template succesfully updated.
Project template: /Users/liam/.cookiecutters/Python-iOS-template
Traceback (most recent call last):
  File "setup.py", line 79, in <module>
    'toga-django',
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/briefcase/app.py", line 336, in run
    self.generate_app_template()
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/briefcase/app.py", line 195, in generate_app_template
    'secret_key': self.secret_key,
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/main.py", line 63, in cookiecutter
    no_input=no_input,
  File "/Users/liam/apps/beeccc/venv/lib/python3.6/site-packages/cookiecutter/repository.py", line 101, in determine_repo_dir
    '\n'.join(repository_candidates)
cookiecutter.exceptions.RepositoryNotFound: A valid repository for "/Users/liam/.cookiecutters/Python-iOS-template" could not be found in the following locations:

Should a check be conducted to ensure the cookiecutter template for the selected platform is correct and/or up to date?

Tutorial bug with Project-Linux-template

I used the cookiecutter template and then did a pip install briefcase and tried:

$ python setup.py linux -s

But received this error:

$ python setup.py linux -s
running linux
 * Writing application template...
Template Python-Linux-template succesfully updated.
Project template: /home/trey/.cookiecutters/Python-Linux-template
Traceback (most recent call last):
  File "setup.py", line 72, in <module>
    'toga-android',
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/trey/.virtualenvs/guesser/lib/python3.6/site-packages/briefcase/app.py", line 336, in run
    self.generate_app_template()
  File "/home/trey/.virtualenvs/guesser/lib/python3.6/site-packages/briefcase/app.py", line 195, in generate_app_template
    'secret_key': self.secret_key,
  File "/home/trey/.virtualenvs/guesser/lib/python3.6/site-packages/cookiecutter/main.py", line 63, in cookiecutter
    no_input=no_input,
  File "/home/trey/.virtualenvs/guesser/lib/python3.6/site-packages/cookiecutter/repository.py", line 101, in determine_repo_dir
    '\n'.join(repository_candidates)
cookiecutter.exceptions.RepositoryNotFound: A valid repository for "/home/trey/.cookiecutters/Python-Linux-template" could not be found in the following locations:
/home/trey/.cookiecutters/Python-Linux-template
/home/trey/.cookiecutters/Python-Linux-template

Is there another cookiecutter template I need to install from somewhere?

"must supply either home or prefix/exec-prefix -- not both")

When running the simple helloworld tutorial on OSX, i get the error when running the command

python setup.py ios -s

The app gets installed on the virtual iphone but the app just crashes when opened, does not display the "hello world text"

Also get the following error at the same time:

Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/9g/d1z5c7lx74z35rd_yshmtv_h0000gq/T/pip-rt3s9ur7-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/9g/d1z5c7lx74z35rd_yshmtv_h0000gq/T/pip-3xyqi48k-record/install-record.txt --single-version-externally-managed --compile --home=/var/folders/9g/d1z5c7lx74z35rd_yshmtv_h0000gq/T/tmp8sx0itp9" failed with error code 1 in /private/var/folders/9g/d1z5c7lx74z35rd_yshmtv_h0000gq/T/pip-rt3s9ur7-build/

[Specification] Windows project template

Abstract

Develop a Visual Studio 2017 solution file that will enable a user to download a zip file of content (including a solution file), open the solution, hit run, and have the code Just Work (tm).

Full description

Python.net contains an example project that shows how to embed a Python interpreter into a C# project. However, this project doesn't work "out of the box" - it requires a bunch of configuration before it will work. It is part of a larger project, so you need to modify the solution file to set the starting project; then, when you do run it, you get errors because Python27.dll can't be found - which is problematic if you're trying to use Python 3.5.

I want to be able to give someone a zip file that contains the solution file and source code, have them open the file, run it, and get a useful executable.

The deliverable is the zip file, containing a Visual Studio 2017 solution file, the C# source code from the Python.net console demo, and any other support files necessary. I imagine this will include:

A copy of Python. The zip file should contain the official embedded python zip file in a known location relative to the solution file. However, you cannot depend on a system installation of Python (or anything else other than Visual Studio).
An installation of Python.net. Ideally, this will be in a directory other than the site-packages provided by the embedded Python install
When compiled, the executable should have a custom icon; any icon will do for sample purposes, but it should also be available in the zip file.

The ideal layout for the final zip file would be:

  • Windows
    • MyProject.sln
    • MyProject.cs
    • MyProject
      • Resources
        • myproject.ico
      • Python
        • (contents of embedded Python zip file)
      • app_packages
        • (installed version of python.net)
      • app
        • MyProject
          • __init__.py
          • app.py

The solution file should output "MyProject.exe" in the MyProject directory.

Bonus points

For bonus points:

  1. The default source from the console demo of Python.net will require a command line argument; modify the sample code to invoke app.py with the contents of app and app_packages in the PYTHONPATH for the purposes of execution.

  2. The output app should be a gui app, not a console app. When MyProject.exe is executed, a black console window should not be displayed.

  3. Add a target to the solution file that produces an MSI installer with contents of the "MyProject" directory, including the executable, embedded python, app_packages and app.

TOGA-GTK Porting Widgets: A few Questions

Hello!

I am working on getting the widgets that haven't been implemented on Gtk, yet have been implemented on the Cocoa backend.

Toga-gtk
https://github.com/pybee-attic/toga-gtk/tree/master/toga_gtk/widgets

Toga-Cocoa
https://github.com/pybee-attic/toga-cocoa/tree/master/toga_cocoa/widgets

**My question is, the script icon.py is found in both of the backends, yet the script image.py is not included in the toga-gtk backend. Is there a reason for this? Are we using the icon as an image also?

If not, may I create this file and widget also? (maybe change the name if it is for all image uses)
OR
Are we using the "icons" as images also?**

-Thanks for teaching me & thank you for your time!
-Ryan Carl

Avoid re-downloading the cookiecutter template if it's already downloaded

Currently, briefcase always re-downloads the cookiecutter template.

Since re-generating an application bundle (for example, running python setup.py ios or python setup.py android) is meant to be a very common thing to do, it would be nice if it tolerate network issues.

My suggestion is that we check if there is a template already downloaded, and if it does, instead of re-cloning it, we'd try updating it (running git pull) and just emit a warning in case updating fails.

Add check for pre-existing application directory

If you have an existing macOS directory, and you run python setup.py macos, you get a messy error message about a directory already existing. The same is true for other platform directories.

It would be better to replace this with a check - "do you want to replace this project y/n", and if y, delete the existing directory before regenerating.

Django: Executing migrations for the users

It may be useful to execute the migrations for the user once the setup has been successful. There might be some inconveniences so I will like to discuss the pros and cons of this option.

issue in creating xcode project when requirements include audiostream (depends on a CythonRecipe)

When using briefcase to create an xcode project from python code which uses audiostream - the build goes through fine but when the xcode project is run the following error is encountered

("No module named 'audiostream.core'",)

This occurs at the line

        from audiostream import get_input

Suspected reason: The audiostream directory has core.c, core.pyx which would need CythonRecipe as indicated at the kivy-ios page

Note: as audiostream is not recognized by default when added to app_requires in setup.py despite being installable via pip (not sure why), I worked around it by

  • downloading the audiostream project
  • modifying the setup.py script since it had print statements in python 2.7 format instead of python 3.4
  • creating a zip file
  • adding the complete path to this zip file to the app_requires section

Other details

  • python 3.4,
  • compiling for iOS
  • the setup.py and app to reproduce the issue are as attached.

app.py.txt
setup.py.txt

Tutorial 0 - Error: Unable to locate HelloWorld main module file

Hej,

I am experimenting with Briefcase. I cannot get the Tutorial 0 (https://briefcase.readthedocs.io/en/latest/tutorials/tutorial-0.html#) to work on my machine. Likely it is something obvious, but I do not know what to look for.

After following the steps of the tutorial, XCode prints the following error into the console instead of the Hello, World! message:

2017-04-22 01:17:57.647 Hello World[74577:3342107] PythonHome is: /Users/thisisme/Library/Developer/CoreSimulator/Devices/BD73FC4D-D82B-4296-A6F6-B8A75806BFC4/data/Containers/Bundle/Application/9BBFB0DA-AF7E-4CB8-B48B-E382F34B7616/Hello World.app/Library/Python.framework/Resources
2017-04-22 01:17:57.649 Hello World[74577:3342107] PYTHONPATH is: PYTHONPATH=/Users/thisisme/Library/Developer/CoreSimulator/Devices/BD73FC4D-D82B-4296-A6F6-B8A75806BFC4/data/Containers/Bundle/Application/9BBFB0DA-AF7E-4CB8-B48B-E382F34B7616/Hello World.app/Library/Application Support/org.example.HelloWorld/app:/Users/thisisme/Library/Developer/CoreSimulator/Devices/BD73FC4D-D82B-4296-A6F6-B8A75806BFC4/data/Containers/Bundle/Application/9BBFB0DA-AF7E-4CB8-B48B-E382F34B7616/Hello World.app/Library/Application Support/org.example.HelloWorld/app_packages
2017-04-22 01:17:57.650 Hello World[74577:3342107] Initializing Python runtime
2017-04-22 01:17:57.787 Hello World[74577:3342107] Unable to locate HelloWorld main module file

I am OS X 10.11.6, XCode Version 8.2.1., virtualenvwrapper to manage my virtualenvs, and I am in an virtualenv with a Python in version 3.5.2.

I followed the steps tutorial:

mkdir tutorial
cd tutorial/
mkdir iostutorial
cd iostutorial/
mkdir HelloWorld
touch HelloWorld/__init__.py
echo 'print("Hello, World!")' > HelloWorld/app.py
touch setup.py
nano setup.py

Into the setup.py, I copied the code snippet given in the tutorial.
After the steps above, my project looks as in the following:

 └── tutorial
     └── iostutorial
         ├── HelloWorld
         │   ├── __init__.py
         │   └── app.py
         └── setup.py

Subsequently, I build the project, open it with XCode, and run it there (via the play button)

python setup.py ios
open iOS/Hello\ World.xcodeproj/

After the Simulator started up I get the error message from the top.

What am I doing wrong? What do I have to fix?

Case sensitive filesystem issues w/ BZip2 and XZ

After using briefcase to generate an iOS project from toga, I try to build in in XCode. I get the following errors:

ld: framework not found BZip2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This appears to be a case sensitivity issue. In ./iOS/BZip2.framework, I see the following:

Headers -> Versions/Current/Headers
Versions
bzip2 -> Versions/Current/bzip2

But it should be BZip2. I can make the error go away with ln -s bzip2 BZip2.

The same error and fix are needed for XZ. Then the project compiles.

Error when using --support-pkg pointing to local tarball

I'm trying to run briefcase (android target) using --support-pkg to provide a locally built support package, with the command:

python setup.py android --support-pkg ../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz 

I'm getting the following error:

 * Installing support package...
Support package: ../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz
error: Invalid URL '../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz': No schema supplied. Perhaps you meant http://../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz?

I tried providing absolute paths, but the result is the same.

Add new packageing target macOS-Xcode project

At the moment you can easily create a macOS app with python setup.py macos and it works nice.
As a addition to that it would be super nice to have the ability to build to a macOS/cocoa/Xcode project with a command like python setup.py macos-xcode.

I know we can go directly from python to a executable app but I think there are benefits/possibilities for including macos/xcode as a possible packaging target.

Benefits:

  • We could use the build in Xcode UITesing framework XCTest to perform unit as well as UITests.
  • Uploading apps to the macOS app store?(not sure if there is a other way)?

Target field in MSI-installed Windows shortcut

With Briefcase 0.1.9 I was able to create a windows installer (MSI) for the temperature conversion app example, but after installing from the MSI, I needed to change the shortcut's Target field from
"C:\Program Files (x86)\Freedom\python\pythonw.exe" app\start.py
to
"C:\Program Files (x86)\Freedom\python\pythonw.exe" "C:\Program Files (x86)\Freedom\app\start.py"
for the program to run. (Windows 7 and Windows Server 2008)

Add basic automated tests

Currently, we are testing changes in briefcase manually, it would be nice to have a testing suite.

Building executable with tkinter and numpy

Hi all,

I'm trying to build an executable for Windows using python 3.6.2, tkinter as GUI framework and with scientific packages such as numpy, scipy and pandas.

This is my setup.py generated by cookiecutter and then modified by me:

import io
import re
from setuptools import setup, find_packages
import sys

with io.open('./Blender/__init__.py', encoding='utf8') as version_file:
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
    if version_match:
        version = version_match.group(1)
    else:
        raise RuntimeError("Unable to find version string.")


with io.open('README.rst', encoding='utf8') as readme:
    long_description = readme.read()

	
found_packages = find_packages(
	exclude=[
		'docs', 'tests',
		'windows', 'macOS', 'linux',
		'iOS', 'android',
		'django'
	])
	
print(found_packages)

found_packages.extend(['numpy', 'scipy', 'pandas'])

setup(
    name='Blender',
    version=version,
    description='An app that does lots of stuff',
    long_description=long_description,
    author='Jane Developer',
    author_email='[email protected]',
    license='GNU General Public License v3 or later (GPLv3+)',
    packages=found_packages,
    classifiers=[
        'Development Status :: 1 - Planning',
        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
    ],
    install_requires=[
    ],
    options={
        'app': {
            'formal_name': 'Blender',
            'bundle': 'com.example'
        },

        # Desktop/laptop deployments
        'windows': {
            'app_requires': [
            ]
        },
    }
)

But when I run python setup.py windows -s I get the following error:

...
Processing c:\users\test\documents\blender
    Complete output from command python setup.py egg_info:
    ['Blender']
    running egg_info
    creating pip-egg-info\Blender.egg-info
    writing pip-egg-info\Blender.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\Blender.egg-info\dependency_links.txt
    writing top-level names to pip-egg-info\Blender.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\Blender.egg-info\SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    error: package directory 'numpy' does not exist

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\test\AppData\Local\Temp\pip-08c6dtgx-build\
...

I have a feeling that the build process does not have visibility of the site-packages path where the packages are installed. Is this due to the install location of python? How can I specify in the setup.py file where the packages live?

python/bin/python not found. Should be python/bin/python3

When running Tutorial 0 with target macos and Python 3.4 (i.e. python setup.py macos --support-pkg=/path/to/Python-3.4-macOS-support.b2.tar.gz), the app cannot be run, and gives the following error:

$ open macOS/Tutorial\ 0.app
LSOpenURLsWithRole() failed with error -10810 for the file /path/to/tutorial_0/macOS/Tutorial 0.app.

The problem seems to be that it is looking for python/bin/python when that binary does not exist, but python/bin/python3 does exist. There are two fixes:

  1. Change the last line of macOS/Tutorial 0.app/Contents/MacOS/Tutorial 0 to python/bin/python3 -m tutorial_0, OR

  2. ln -s python3 python in tutorial_0/macOS/Tutorial 0.app/Contents/Resources/python/bin

Android App: problem occurred starting process 'command 'voc''

Could be something that I am doing.... I am not very good at this yet....
but when i am trying to build the android app it gives me this in the android studio "output".

Executing tasks: [:generateDebugSources, :generateDebugAndroidTestSources, :mockableAndroidJar, :prepareDebugUnitTestDependencies]

Configuration on demand is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2vatwc3kktfozgkt2xw3ajzcb.run(/home/ry/.MyShit/Native/BeeWare1/tutorial_0/android/build.gradle:11)
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/ry/.MyShit/SDK/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:preReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2511Library
:prepareComAndroidSupportAppcompatV72511Library
:prepareComAndroidSupportSupportCompat2511Library
:prepareComAndroidSupportSupportCoreUi2511Library
:prepareComAndroidSupportSupportCoreUtils2511Library
:prepareComAndroidSupportSupportFragment2511Library
:prepareComAndroidSupportSupportMediaCompat2511Library
:prepareComAndroidSupportSupportV42511Library
:prepareComAndroidSupportSupportVectorDrawable2511Library
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:preDebugAndroidTestBuild UP-TO-DATE
:prepareDebugAndroidTestDependencies
:compileDebugAndroidTestAidl UP-TO-DATE
:processDebugAndroidTestManifest UP-TO-DATE
:compileDebugAndroidTestRenderscript UP-TO-DATE
:generateDebugAndroidTestBuildConfig UP-TO-DATE
:generateDebugAndroidTestResValues UP-TO-DATE
:generateDebugAndroidTestResources UP-TO-DATE
:mergeDebugAndroidTestResources UP-TO-DATE
:processDebugAndroidTestResources UP-TO-DATE
:generateDebugAndroidTestSources UP-TO-DATE
:mockableAndroidJar UP-TO-DATE
:preDebugUnitTestBuild UP-TO-DATE
:prepareDebugUnitTestDependencies

BUILD SUCCESSFUL

Total time: 18.995 secs
Executing tasks: [:assembleDebug]

Configuration on demand is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2vatwc3kktfozgkt2xw3ajzcb.run(/home/ry/.MyShit/Native/BeeWare1/tutorial_0/android/build.gradle:11)
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/ry/.MyShit/SDK/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:preReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2511Library
:prepareComAndroidSupportAppcompatV72511Library
:prepareComAndroidSupportSupportCompat2511Library
:prepareComAndroidSupportSupportCoreUi2511Library
:prepareComAndroidSupportSupportCoreUtils2511Library
:prepareComAndroidSupportSupportFragment2511Library
:prepareComAndroidSupportSupportMediaCompat2511Library
:prepareComAndroidSupportSupportV42511Library
:prepareComAndroidSupportSupportVectorDrawable2511Library
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:javaPreCompileDebug
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk NO-SOURCE
:compileDebugSources UP-TO-DATE
:buildPythonDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildPythonDebug'.

A problem occurred starting process 'command 'voc''

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 19.482 secs

Add support for Apple watchOS

Now that the Python iOS support libraries support watchOS, Briefcase should also support that platform.

This will involve:

  • Producing a cookiecutter template project (analogous to Python-iOS-template)
  • Adding a new command to Briefcase to support tvOS. The implementation of this command will be almost identical to iOS, with names and images changed.

Packaged Apps: handle multiple entrypoints

Multiple apps in the one codebase are possible to define using setuptools entrypoints.
On Windows and Linux this produces multiple shortcuts / executables in the installed distribution.
On other platforms where apps are fully packaged (macOS, iOS, tvOS, Android) this is not possible.

It would be better to be able to produce multiple packaged apps for each defined entrypoint.

This means duplication of the codebase / python executable bot for most applications this should be a negligible overhead.

Previously discussed in #75 (comment)

ImportError: No module named 'gi._gi' while runnint setup.py on linux mint

I'm trying to walk through the tutorial. Here's the bash history:
2001 mkdir tutorial
2002 cd tutorial/
2003 python3.5 -m venv venv
2004 . venv/bin/activate
2005 pip install briefcase
2006 apt-get install python3-gi gir1.2-webkit2-3.0
2007 sudo apt-get install python3-gi gir1.2-webkit2-3.0
2008 pip install --upgrade pip
2009 cookiecutter https://github.com/pybee/briefcase-template
2010 cd helloworld/
2011 vir helloworld/app.py
2012 python setup.py linux -s

All commands were successful until the final one. setup produced a cascade of errors, the first one being:

Installation complete.
Starting Hello World
Creating symlink (/home/jima/coding/tutorial/helloworld/linux/app_packages/gi & /home/jima/coding/tutorial/helloworld/linux/app_packages/pygtkcompat) to system GTK+ libraries...
Creating symlink (/home/jima/coding/tutorial/helloworld/linux/app_packages/gi & /home/jima/coding/tutorial/helloworld/linux/app_packages/pygtkcompat) to system GTK+ libraries...
Traceback (most recent call last):
File "/home/jima/coding/tutorial/helloworld/linux/app_packages/toga_gtk/app.py", line 7, in
import gi
File "/home/jima/coding/tutorial/helloworld/linux/app_packages/gi/init.py", line 36, in
from ._gi import _gobject
ImportError: No module named 'gi._gi'

It indicates that other exceptions occurred during the handling of that one, but I suspect those are not relevant.

I initially attempted this with Py3.4 which failed. I saw in a different issue that I would likely be better off with 3.5. I built and installed 3.5 and that's what's running in the VM. I also had used mkproject instead of creating the venv manually as shown in the example. I backed that out and started a new project doing it the manual way (as shown above).

Looking at the /helloworld/linux/app_packages/gi/init.py file, there is an import there
from ._gi import _gobject
There is not a _gi directory in the gi dir. There are two files which might be related:
_gi_cairo.cpython-34m-i386-linux-gnu.so
_gi.cpython-34m-i386-linux-gnu.so

I'm suspecting that there's some flotsam left over from either the 3.4 attempt or the mkproject attempt that is causing me problems, but I'm not seeing how those would produce the linux directory (in a new, clean subdir) without the required module.

NOTE: just to be complete. I went back and redid the steps after I manually removed the ~/.cookiecutters/ briefcase-template and Python-Linux-template directories. Same result.

Thanks for any help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.