beeware
Advanced tools
Sorry, the diff of this file is not supported yet
+291
| # -*- coding: utf-8 -*- | ||
| # | ||
| # BeeWare documentation build configuration file, created by | ||
| # sphinx-quickstart on Sat Jul 27 14:58:42 2013. | ||
| # | ||
| # This file is execfile()d with the current directory set to its containing dir. | ||
| # | ||
| # Note that not all possible configuration values are present in this | ||
| # autogenerated file. | ||
| # | ||
| # All configuration values have a default; values that are commented out | ||
| # serve to show the default. | ||
| # If extensions (or modules to document with autodoc) are in another directory, | ||
| # add these directories to sys.path here. If the directory is relative to the | ||
| # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
| import sys | ||
| import os | ||
| # -- General configuration ----------------------------------------------------- | ||
| # If your documentation needs a minimal Sphinx version, state it here. | ||
| #needs_sphinx = '1.0' | ||
| # Add any Sphinx extension module names here, as strings. They can be extensions | ||
| # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
| extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx_tabs.tabs'] | ||
| # Add any paths that contain templates here, relative to this directory. | ||
| templates_path = ['_templates'] | ||
| # The suffix of source filenames. | ||
| source_suffix = '.rst' | ||
| # The encoding of source files. | ||
| #source_encoding = 'utf-8-sig' | ||
| # The master toctree document. | ||
| master_doc = 'index' | ||
| # General information about the project. | ||
| project = u'BeeWare' | ||
| copyright = u'2013, Russell Keith-Magee' | ||
| # The version info for the project you're documenting, acts as replacement for | ||
| # |version| and |release|, also used in various other places throughout the | ||
| # built documents. | ||
| # | ||
| # The full version, including alpha/beta/rc tags. | ||
| import io, re | ||
| with io.open('../setup.cfg', encoding='utf8') as version_file: | ||
| version_match = re.search(r"^version = (.*)$", version_file.read(), re.M) | ||
| if version_match: | ||
| release = version_match.group(1) | ||
| else: | ||
| raise RuntimeError("Unable to find version string.") | ||
| # The short X.Y version. | ||
| version = '.'.join(release.split('.')[:2]) | ||
| autoclass_content = 'both' | ||
| # The language for content autogenerated by Sphinx. Refer to documentation | ||
| # for a list of supported languages. | ||
| #language = None | ||
| # There are two options for replacing |today|: either, you set today to some | ||
| # non-false value, then it is used: | ||
| #today = '' | ||
| # Else, today_fmt is used as the format for a strftime call. | ||
| #today_fmt = '%B %d, %Y' | ||
| # List of patterns, relative to source directory, that match files and | ||
| # directories to ignore when looking for source files. | ||
| exclude_patterns = ['_build'] | ||
| # The reST default role (used for this markup: `text`) to use for all documents. | ||
| #default_role = None | ||
| # If true, '()' will be appended to :func: etc. cross-reference text. | ||
| #add_function_parentheses = True | ||
| # If true, the current module name will be prepended to all description | ||
| # unit titles (such as .. function::). | ||
| #add_module_names = True | ||
| # If true, sectionauthor and moduleauthor directives will be shown in the | ||
| # output. They are ignored by default. | ||
| #show_authors = False | ||
| # The name of the Pygments (syntax highlighting) style to use. | ||
| pygments_style = 'sphinx' | ||
| # A list of ignored prefixes for module index sorting. | ||
| #modindex_common_prefix = [] | ||
| # -- Options for HTML output --------------------------------------------------- | ||
| # on_rtd: whether we are on readthedocs.org | ||
| on_rtd = os.environ.get('READTHEDOCS', None) == 'True' | ||
| if not on_rtd: # only import and set the theme if we're building docs locally | ||
| try: | ||
| import sphinx_rtd_theme | ||
| except ModuleNotFoundError: | ||
| html_theme = 'default' | ||
| else: | ||
| html_theme = 'sphinx_rtd_theme' | ||
| html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
| # Theme options are theme-specific and customize the look and feel of a theme | ||
| # further. For a list of options available for each theme, see the | ||
| # documentation. | ||
| #html_theme_options = {} | ||
| # Add any paths that contain custom themes here, relative to this directory. | ||
| #html_theme_path = [] | ||
| # The name for this set of Sphinx documents. If None, it defaults to | ||
| # "<project> v<release> documentation". | ||
| #html_title = None | ||
| # A shorter title for the navigation bar. Default is the same as html_title. | ||
| #html_short_title = None | ||
| # The name of an image file (relative to this directory) to place at the top | ||
| # of the sidebar. | ||
| html_logo = "images/beeware.png" | ||
| # The name of an image file (within the static path) to use as favicon of the | ||
| # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | ||
| # pixels large. | ||
| #html_favicon = None | ||
| # Add any paths that contain custom static files (such as style sheets) here, | ||
| # relative to this directory. They are copied after the builtin static files, | ||
| # so a file named "default.css" will overwrite the builtin "default.css". | ||
| html_static_path = ['_static'] | ||
| # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | ||
| # using the given strftime format. | ||
| #html_last_updated_fmt = '%b %d, %Y' | ||
| # If true, SmartyPants will be used to convert quotes and dashes to | ||
| # typographically correct entities. | ||
| #html_use_smartypants = True | ||
| # Custom sidebar templates, maps document names to template names. | ||
| #html_sidebars = {} | ||
| # Additional templates that should be rendered to pages, maps page names to | ||
| # template names. | ||
| #html_additional_pages = {} | ||
| # If false, no module index is generated. | ||
| #html_domain_indices = True | ||
| # If false, no index is generated. | ||
| #html_use_index = True | ||
| # If true, the index is split into individual pages for each letter. | ||
| #html_split_index = False | ||
| # If true, links to the reST sources are added to the pages. | ||
| #html_show_sourcelink = True | ||
| # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. | ||
| #html_show_sphinx = True | ||
| # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. | ||
| #html_show_copyright = True | ||
| # If true, an OpenSearch description file will be output, and all pages will | ||
| # contain a <link> tag referring to it. The value of this option must be the | ||
| # base URL from which the finished HTML is served. | ||
| #html_use_opensearch = '' | ||
| # This is the file name suffix for HTML files (e.g. ".xhtml"). | ||
| #html_file_suffix = None | ||
| # Output file base name for HTML help builder. | ||
| htmlhelp_basename = 'beewaredoc' | ||
| try: | ||
| import sphinx_rtd_theme | ||
| html_theme = "sphinx_rtd_theme" | ||
| html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
| except ImportError: | ||
| # The sphinx-rtd-theme package is not installed, so to the default | ||
| pass | ||
| # -- Options for LaTeX output -------------------------------------------------- | ||
| latex_elements = { | ||
| # The paper size ('letterpaper' or 'a4paper'). | ||
| #'papersize': 'letterpaper', | ||
| # The font size ('10pt', '11pt' or '12pt'). | ||
| #'pointsize': '10pt', | ||
| # Additional stuff for the LaTeX preamble. | ||
| #'preamble': '', | ||
| } | ||
| # Grouping the document tree into LaTeX files. List of tuples | ||
| # (source start file, target name, title, author, documentclass [howto/manual]). | ||
| latex_documents = [ | ||
| ('index', 'beeware.tex', u'BeeWare Documentation', | ||
| u'Russell Keith-Magee', 'manual'), | ||
| ] | ||
| # The name of an image file (relative to this directory) to place at the top of | ||
| # the title page. | ||
| #latex_logo = None | ||
| # For "manual" documents, if this is true, then toplevel headings are parts, | ||
| # not chapters. | ||
| #latex_use_parts = False | ||
| # If true, show page references after internal links. | ||
| #latex_show_pagerefs = False | ||
| # If true, show URL addresses after external links. | ||
| #latex_show_urls = False | ||
| # Documents to append as an appendix to all manuals. | ||
| #latex_appendices = [] | ||
| # If false, no module index is generated. | ||
| #latex_domain_indices = True | ||
| # -- Options for manual page output -------------------------------------------- | ||
| # One entry per manual page. List of tuples | ||
| # (source start file, name, description, authors, manual section). | ||
| man_pages = [ | ||
| ('index', 'beeware', u'BeeWare Documentation', | ||
| [u'Russell Keith-Magee'], 1) | ||
| ] | ||
| # If true, show URL addresses after external links. | ||
| #man_show_urls = False | ||
| # -- Options for Texinfo output ------------------------------------------------ | ||
| # Grouping the document tree into Texinfo files. List of tuples | ||
| # (source start file, target name, title, author, | ||
| # dir menu entry, description, category) | ||
| texinfo_documents = [ | ||
| ('index', 'beeware', u'BeeWare Documentation', | ||
| u'Russell Keith-Magee', 'BeeWare', 'A Python native, OS native GUI toolkit.', | ||
| 'Miscellaneous'), | ||
| ] | ||
| # Documents to append as an appendix to all manuals. | ||
| #texinfo_appendices = [] | ||
| # If false, no module index is generated. | ||
| #texinfo_domain_indices = True | ||
| # How to display URL addresses: 'footnote', 'no', or 'inline'. | ||
| #texinfo_show_urls = 'footnote' | ||
| # -- Options for spelling ------------------------------------------- | ||
| # Spelling check needs an additional module that is not installed by default. | ||
| # Add it only if spelling check is requested so docs can be generated without it. | ||
| if 'spelling' in sys.argv: | ||
| extensions.append("sphinxcontrib.spelling") | ||
| # Spelling language. | ||
| spelling_lang = 'en_US' | ||
| # Location of word list. | ||
| spelling_word_list_filename = 'spelling_wordlist' | ||
| spelling_ignore_pypi_package_names = True | ||
| # -- Options for Todos ------------------------------------------- | ||
| # If this is True, todo and todolist produce output, else they produce nothing. The default is False. | ||
| todo_include_todos = True | ||
| # If this is True, todo emits a warning for each TODO entries. The default is False. | ||
| # todo_emit_warnings = False | ||
| # If this is True, todolist produce output without file path and line, The default is False. | ||
| # todo_link_only = False |
Sorry, the diff of this file is not supported yet
| ======= | ||
| BeeWare | ||
| ======= | ||
| **Write Python. Run Anywhere.** | ||
| BeeWare is a suite of tools and libraries, each of which works together to help | ||
| you write cross platform native GUI Python applications. It includes: | ||
| * `Toga <toga.readthedocs.org>`__, a cross platform widget toolkit; | ||
| * `Briefcase <briefcase.readthedocs.org>`__, a tool for packaging Python | ||
| projects as distributables artefacts that can be shipped to end users; | ||
| * `Rubicon ObjC <rubicon-objc.readthedocs.org>`__, a library for working with | ||
| Objective C libraries on iOS and macOS from within Python code; | ||
| * `Rubicon Java <rubicon-java.readthedocs.org>`__, a library for working with | ||
| Java libraries from within Python code; | ||
| * Pre-complied builds of Python that can be used on platforms where official | ||
| Python installers aren't available. | ||
| You can use each of the tools in isolation, or you can use all of them as a | ||
| suite. | ||
| The full BeeWare suite also includes `software development tools | ||
| <https://beeware.org/project/projects/tools/>`__ and `applications | ||
| <https://beeware.org/project/projects/applications/>`__ that have been written | ||
| using BeeWare's own libraries. | ||
| The BeeWare suite is available on macOS, Windows, Linux (using GTK); on mobile | ||
| platforms such as Android and iOS; and for the Web. Support for other platforms | ||
| (such as set top boxes and watches) is on our long term roadmap. | ||
| .. admonition:: Platform support | ||
| The BeeWare suite is a work in progress. Some tools and libraries are more | ||
| mature than others, and some platforms have better support than others. In | ||
| particular, our support for Android is known to have significant problems, | ||
| and Web support should be considered experimental only. | ||
| Ready to try BeeWare for yourself? :doc:`Let's build a cross platform | ||
| application in Python! <tutorial/tutorial-0>` | ||
| .. toctree:: | ||
| :maxdepth: 2 | ||
| :hidden: | ||
| tutorial/tutorial-0 | ||
| tutorial/tutorial-1 | ||
| tutorial/tutorial-2 | ||
| tutorial/tutorial-3 | ||
| tutorial/tutorial-4/index | ||
| tutorial/tutorial-5 | ||
| tutorial/tutorial-6 |
+190
| @ECHO OFF | ||
| REM Command file for Sphinx documentation | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set BUILDDIR=_build | ||
| set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . | ||
| set I18NSPHINXOPTS=%SPHINXOPTS% . | ||
| if NOT "%PAPER%" == "" ( | ||
| set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% | ||
| set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% | ||
| ) | ||
| if "%1" == "" goto help | ||
| if "%1" == "help" ( | ||
| :help | ||
| echo.Please use `make ^<target^>` where ^<target^> is one of | ||
| echo. html to make standalone HTML files | ||
| echo. dirhtml to make HTML files named index.html in directories | ||
| echo. singlehtml to make a single large HTML file | ||
| echo. pickle to make pickle files | ||
| echo. json to make JSON files | ||
| echo. htmlhelp to make HTML files and a HTML help project | ||
| echo. qthelp to make HTML files and a qthelp project | ||
| echo. devhelp to make HTML files and a Devhelp project | ||
| echo. epub to make an epub | ||
| echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter | ||
| echo. text to make text files | ||
| echo. man to make manual pages | ||
| echo. texinfo to make Texinfo files | ||
| echo. gettext to make PO message catalogs | ||
| echo. changes to make an overview over all changed/added/deprecated items | ||
| echo. linkcheck to check all external links for integrity | ||
| echo. doctest to run all doctests embedded in the documentation if enabled | ||
| goto end | ||
| ) | ||
| if "%1" == "clean" ( | ||
| for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i | ||
| del /q /s %BUILDDIR%\* | ||
| goto end | ||
| ) | ||
| if "%1" == "html" ( | ||
| %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The HTML pages are in %BUILDDIR%/html. | ||
| goto end | ||
| ) | ||
| if "%1" == "dirhtml" ( | ||
| %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. | ||
| goto end | ||
| ) | ||
| if "%1" == "singlehtml" ( | ||
| %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. | ||
| goto end | ||
| ) | ||
| if "%1" == "pickle" ( | ||
| %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished; now you can process the pickle files. | ||
| goto end | ||
| ) | ||
| if "%1" == "json" ( | ||
| %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished; now you can process the JSON files. | ||
| goto end | ||
| ) | ||
| if "%1" == "htmlhelp" ( | ||
| %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished; now you can run HTML Help Workshop with the ^ | ||
| .hhp project file in %BUILDDIR%/htmlhelp. | ||
| goto end | ||
| ) | ||
| if "%1" == "qthelp" ( | ||
| %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished; now you can run "qcollectiongenerator" with the ^ | ||
| .qhcp project file in %BUILDDIR%/qthelp, like this: | ||
| echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Trebuchet.qhcp | ||
| echo.To view the help file: | ||
| echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Trebuchet.ghc | ||
| goto end | ||
| ) | ||
| if "%1" == "devhelp" ( | ||
| %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. | ||
| goto end | ||
| ) | ||
| if "%1" == "epub" ( | ||
| %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The epub file is in %BUILDDIR%/epub. | ||
| goto end | ||
| ) | ||
| if "%1" == "latex" ( | ||
| %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. | ||
| goto end | ||
| ) | ||
| if "%1" == "text" ( | ||
| %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The text files are in %BUILDDIR%/text. | ||
| goto end | ||
| ) | ||
| if "%1" == "man" ( | ||
| %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The manual pages are in %BUILDDIR%/man. | ||
| goto end | ||
| ) | ||
| if "%1" == "texinfo" ( | ||
| %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. | ||
| goto end | ||
| ) | ||
| if "%1" == "gettext" ( | ||
| %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Build finished. The message catalogs are in %BUILDDIR%/locale. | ||
| goto end | ||
| ) | ||
| if "%1" == "changes" ( | ||
| %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.The overview file is in %BUILDDIR%/changes. | ||
| goto end | ||
| ) | ||
| if "%1" == "linkcheck" ( | ||
| %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Link check complete; look for any errors in the above output ^ | ||
| or in %BUILDDIR%/linkcheck/output.txt. | ||
| goto end | ||
| ) | ||
| if "%1" == "doctest" ( | ||
| %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest | ||
| if errorlevel 1 exit /b 1 | ||
| echo. | ||
| echo.Testing of doctests in the sources finished, look at the ^ | ||
| results in %BUILDDIR%/doctest/output.txt. | ||
| goto end | ||
| ) | ||
| :end |
+181
| # Makefile for Sphinx documentation | ||
| # | ||
| # You can set these variables from the command line. | ||
| SPHINXOPTS = | ||
| SPHINXBUILD = sphinx-build | ||
| PAPER = | ||
| BUILDDIR = _build | ||
| SOURCEDIR = . | ||
| # Internal variables. | ||
| PAPEROPT_a4 = -D latex_paper_size=a4 | ||
| PAPEROPT_letter = -D latex_paper_size=letter | ||
| ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
| VENV = ../env/bin/activate | ||
| PORT = 8001 | ||
| # the i18n builder cannot share the environment and doctrees with the others | ||
| I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
| .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext | ||
| help: | ||
| @echo "Please use \`make <target>' where <target> is one of" | ||
| @echo " instal to create a virtualenv called 'env' in the docs directory" | ||
| @echo " html to make standalone HTML files" | ||
| @echo " dirhtml to make HTML files named index.html in directories" | ||
| @echo " singlehtml to make a single large HTML file" | ||
| @echo " pickle to make pickle files" | ||
| @echo " json to make JSON files" | ||
| @echo " htmlhelp to make HTML files and a HTML help project" | ||
| @echo " qthelp to make HTML files and a qthelp project" | ||
| @echo " devhelp to make HTML files and a Devhelp project" | ||
| @echo " epub to make an epub" | ||
| @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" | ||
| @echo " latexpdf to make LaTeX files and run them through pdflatex" | ||
| @echo " text to make text files" | ||
| @echo " man to make manual pages" | ||
| @echo " texinfo to make Texinfo files" | ||
| @echo " info to make Texinfo files and run them through makeinfo" | ||
| @echo " gettext to make PO message catalogs" | ||
| @echo " changes to make an overview of all changed/added/deprecated items" | ||
| @echo " linkcheck to check all external links for integrity" | ||
| @echo " doctest to run all doctests embedded in the documentation (if enabled)" | ||
| @echo " run to start a local autoreloading webserver on port 8001" | ||
| clean: | ||
| -rm -rf $(BUILDDIR)/* | ||
| html: | ||
| $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
| dirhtml: | ||
| $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
| singlehtml: | ||
| $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
| @echo | ||
| @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
| pickle: | ||
| $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle | ||
| @echo | ||
| @echo "Build finished; now you can process the pickle files." | ||
| json: | ||
| $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json | ||
| @echo | ||
| @echo "Build finished; now you can process the JSON files." | ||
| htmlhelp: | ||
| $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
| @echo | ||
| @echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
| ".hhp project file in $(BUILDDIR)/htmlhelp." | ||
| qthelp: | ||
| $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | ||
| @echo | ||
| @echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||
| ".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
| @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/toga.qhcp" | ||
| @echo "To view the help file:" | ||
| @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/toga.qhc" | ||
| devhelp: | ||
| $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | ||
| @echo | ||
| @echo "Build finished." | ||
| @echo "To view the help file:" | ||
| @echo "# mkdir -p $$HOME/.local/share/devhelp/toga" | ||
| @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/toga" | ||
| @echo "# devhelp" | ||
| epub: | ||
| $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
| @echo | ||
| @echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
| latex: | ||
| $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
| @echo | ||
| @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | ||
| @echo "Run \`make' in that directory to run these through (pdf)latex" \ | ||
| "(use \`make latexpdf' here to do that automatically)." | ||
| latexpdf: | ||
| $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
| @echo "Running LaTeX files through pdflatex..." | ||
| $(MAKE) -C $(BUILDDIR)/latex all-pdf | ||
| @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." | ||
| text: | ||
| $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text | ||
| @echo | ||
| @echo "Build finished. The text files are in $(BUILDDIR)/text." | ||
| man: | ||
| $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | ||
| @echo | ||
| @echo "Build finished. The manual pages are in $(BUILDDIR)/man." | ||
| texinfo: | ||
| $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo | ||
| @echo | ||
| @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." | ||
| @echo "Run \`make' in that directory to run these through makeinfo" \ | ||
| "(use \`make info' here to do that automatically)." | ||
| info: | ||
| $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo | ||
| @echo "Running Texinfo files through makeinfo..." | ||
| make -C $(BUILDDIR)/texinfo info | ||
| @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." | ||
| gettext: | ||
| $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale | ||
| @echo | ||
| @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." | ||
| changes: | ||
| $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes | ||
| @echo | ||
| @echo "The overview file is in $(BUILDDIR)/changes." | ||
| linkcheck: | ||
| $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | ||
| @echo | ||
| @echo "Link check complete; look for any errors in the above output " \ | ||
| "or in $(BUILDDIR)/linkcheck/output.txt." | ||
| doctest: | ||
| $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest | ||
| @echo "Testing of doctests in the sources finished, look at the " \ | ||
| "results in $(BUILDDIR)/doctest/output.txt." | ||
| spelling: | ||
| . $(VENV); $(SPHINXBUILD) -b spelling . _build/spelling | ||
| @echo | ||
| @echo "Check finished. Wrong words can be found in " \ | ||
| "build/spelling/output.txt." | ||
| install: | ||
| @echo "... setting up virtualenv" | ||
| virtualenv env | ||
| . $(VENV); pip install -r requirements_docs.txt | ||
| @echo "\n" \ | ||
| "-------------------------------------------------------------------------------------------------- \n" \ | ||
| "* watch, build and serve the documentation: make run \n" \ | ||
| "* check spelling: make spelling \n" \ | ||
| "\n" \ | ||
| "enchant must be installed in order for pyenchant (and therefore spelling checks) to work. See \n" \ | ||
| "http://docs.django-cms.org/en/latest/contributing/documentation.html#install-the-spelling-software \n" \ | ||
| "-------------------------------------------------------------------------------------------------- \n" \ | ||
| run: | ||
| . $(VENV); sphinx-autobuild $(ALLSPHINXOPTS) build/html --host 0.0.0.0 --port $(PORT) |
| sphinx_tabs | ||
| sphinx | ||
| sphinxcontrib-spelling | ||
| pyenchant | ||
| sphinx-autobuild | ||
| sphinx_rtd_theme | ||
| sphinx_tabs |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| ============================== | ||
| Tutorial 0 - Let's get set up! | ||
| ============================== | ||
| Before we build our first BeeWare app, we have to make sure we've got | ||
| all the prerequisites for running BeeWare. | ||
| Install Python | ||
| ============== | ||
| The first thing we'll need is a working Python interpreter, running Python 3.5 | ||
| or higher. If you're on macOS or Windows, you can get the official installer | ||
| from `the Python website <https://www.python.org/downloads>`_. If you're on | ||
| Linux, you'll install Python using the system package manager (``apt`` on | ||
| Debian/Ubuntu/Mint; ``dnf`` on Fedora, or ``pacman`` on Arch). | ||
| .. admonition:: Alternative Python distributions | ||
| There are lots of different ways of installing Python. You can install | ||
| Python through `homebrew | ||
| <https://docs.brew.sh/Homebrew-and-Python>`__. You can use `pyenv | ||
| <https://github.com/pyenv/pyenv#simple-python-version-management-pyenv>`__ | ||
| to manage multiple Python installs on the same machine. Windows users | ||
| can install Python from the Windows App Store. Users from a data science | ||
| background might want to use `Anaconda | ||
| <https://docs.anaconda.com/anaconda/install/>`__ or `Miniconda | ||
| <https://docs.conda.io/en/latest/miniconda.html>`__. | ||
| It doesn't matter *how* you've installed Python - it only matters that you | ||
| can run `python3` from your operating system's command prompt/terminal | ||
| application, and get a working Python interpreter. | ||
| Install dependencies | ||
| ==================== | ||
| Next, install the additional dependencies needed for your operating system: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| Building BeeWare apps on macOS requires Xcode. Xcode is available for free | ||
| from `the macOS App Store | ||
| <https://apps.apple.com/au/app/xcode/id497799835?mt=12>`__. | ||
| .. group-tab:: Linux | ||
| Building BeeWare apps on Linux requires some system packages. The list | ||
| of packages required varies depending on your distribution: | ||
| **Ubuntu 16.04, Debian 9** | ||
| .. code-block:: bash | ||
| $ sudo apt-get update | ||
| $ sudo apt-get install python3-dev python3-venv libgirepository1.0-dev libcairo2-dev libpango1.0-dev libwebkitgtk-3.0-0 gir1.2-webkit-3.0 | ||
| **Ubuntu 18.04, Debian 10** | ||
| .. code-block:: bash | ||
| $ sudo apt-get update | ||
| $ sudo apt-get install python3-dev python3-venv libgirepository1.0-dev libcairo2-dev libpango1.0-dev libwebkit2gtk-4.0-37 gir1.2-webkit2-4.0 | ||
| **Fedora** | ||
| .. code-block:: bash | ||
| # Fedora | ||
| $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-devel cairo-gobject-devel pango-devel webkitgtk3 | ||
| .. group-tab:: Windows | ||
| Building Windows installers requires the `WiX Toolset | ||
| <https://wixtoolset.org/releases/>`__. | ||
| Set up a virtual environment | ||
| ============================ | ||
| We're now going to create a virtual environment - a "sandbox" that we can use | ||
| to isolate our work on this tutorial from our main Python installation. If we | ||
| install packages into the virtual environment, our main Python installation | ||
| (and any other Python projects on our computer) won't be affected. If we make | ||
| a complete mess of our virutal environment, we'll be able to simply delete it | ||
| and start again, without affecting any other Python project on our computer, | ||
| and without the need to re-install Python. | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| $ mkdir beeware-tutorial | ||
| $ cd beeware-tutorial | ||
| $ python3 -m venv beeware-venv | ||
| $ source beeware-venv/bin/activate | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| $ mkdir beeware-tutorial | ||
| $ cd beeware-tutorial | ||
| $ python3 -m venv beeware-venv | ||
| $ source beeware-venv/bin/activate | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| C:\...>md beeware-tutorial | ||
| C:\...>cd beeware-tutorial | ||
| C:\...>py -m venv beeware-venv | ||
| C:\...>beeware-venv\Scripts\activate.bat | ||
| If this worked, your prompt should now be changed - it should have a | ||
| ``(beeware-venv)`` prefix. This lets you know that you're currently in your | ||
| BeeWare virtual environment. Whenever you're working on this tutorial, you | ||
| should make sure your virtual environment is activated. If it isn't, re-run the | ||
| last command (the ``activate`` command) to re-activate your environment. | ||
| .. admonition:: Alternative virtual environments | ||
| If you're using Anaconda or miniconda, you may be more familiar with using | ||
| conda environments. You might also have heard of ``virtualenv``, a | ||
| predecessor to Python's built in ``venv`` module. As with Python installs - | ||
| it doesn't matter *how* you create your virtual environment, as long as you | ||
| have one. | ||
| Even then - strictly speaking, using a virtual environment is optional. You | ||
| *can* install BeeWare's tools directly into your main Python environment. | ||
| However, it's really, *really*, **really** recommended that you use a | ||
| virtual environment. | ||
| Next steps | ||
| ========== | ||
| We've now set up our environment. We're ready to :doc:`create our first BeeWare | ||
| application <tutorial-1>`. |
| =========================== | ||
| Tutorial 1 - Your first app | ||
| =========================== | ||
| We're ready to create our first application. | ||
| Install the BeeWare tools | ||
| ========================= | ||
| First, we need to install the beeware tools and libraries. BeeWare provides a | ||
| convenient shortcut for doing this: a ``beeware`` meta-package on PyPI that | ||
| includes all the pieces you'll need to run this tutorial. Make sure you're in | ||
| the ``beeware-tutorial`` you created in :doc:`Tutorial 0 <tutorial-0>`, with | ||
| the ``beeware-venv`` virtual environment activated, and run: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ pip install --pre beeware | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| (beeware-venv) $ pip install --pre beeware | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv)C:\...>pip install --pre beeware | ||
| One of the BeeWare tools is **Briefcase**. Briefcase can be used to package | ||
| your application for distribution to end users - but it can also be used to | ||
| bootstrap a new project. | ||
| Bootstrap a new project | ||
| ======================= | ||
| Let's start our first BeeWare project! Using the Briefcase ``new`` command, | ||
| we're going to create an application called **Hello World**. Run the following | ||
| from your command prompt: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase new | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase new | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv) C:\...>briefcase new | ||
| Briefcase will ask us for some details of our new application. For the | ||
| purposes of this tutorial, use the following: | ||
| * **Formal Name** - Accept the default value: ``Hello World``. | ||
| * **App Name** - Accept the default value: ``helloworld``. | ||
| * **Project Name** - Accept the default value: ``Hello World``. | ||
| * **Description** - Accept the default value (or, if you want to be really | ||
| creative, come up wit your own description!) | ||
| * **Author** - Enter your own name here. | ||
| * **Author email** - Enter your own email address. This wil only appear in the | ||
| * **Bundle** - If you own your own domain, enter that domain in reversed order. | ||
| (For example, if you own the domain "cupcakes.com", enter ``com.cupcakes`` | ||
| as the bundle). If you don't own your own domain, accept the default bundle | ||
| (``com.example``). | ||
| * **URL** - The URL of the landing page for your application. Again, if you own | ||
| your own domain, enter a URL at that domain (including the ``https://``). | ||
| Otherwise, just accept the default URL (``https://example.com/helloworld``). | ||
| This URL doesn't need to actually exist (for now); it will only be used if | ||
| you publish your application to an app store. | ||
| * **License** - Accept the default license (BSD). This won't affect | ||
| anything about the operation of the tutorial, though - so if you have | ||
| particularly strong feelings about license choice, feel free to choose | ||
| another license. | ||
| * **GUI framework** - Accept the default option, Toga (BeeWare's own GUI | ||
| toolkit). | ||
| Briefcase will then generate a project skeleton for you to use. If you've | ||
| followed this tutorial so far, and accepted the defaults as described, your | ||
| file system should look something like:: | ||
| beeware-tutorial/ | ||
| beeware-venv/ | ||
| ... | ||
| helloworld/ | ||
| LICENSE | ||
| README.rst | ||
| pyproject.toml | ||
| src/ | ||
| helloworld/ | ||
| resources/ | ||
| helloworld.icns | ||
| helloworld.ico | ||
| helloworld.png | ||
| __init__.py | ||
| __main__.py | ||
| app.py | ||
| This skeleton is actually a fully functioning application without adding | ||
| anything else. The ``src`` folder contains all the code for the application, | ||
| and the ``pyproject.toml`` file describes how to package the application for | ||
| distribution. If you open ``pyproject.toml`` in an editor, you'll see the | ||
| configuration details you just provided to Briefcase. | ||
| Now that we have a stub application, we can use Briefcase to run the | ||
| application. | ||
| Run the app in developer mode | ||
| ============================= | ||
| Move into the ``helloworld`` project directory and tell briefcase to start | ||
| the project in Developer (or ``dev``) mode: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ cd helloworld | ||
| (beeware-venv) $ briefcase dev | ||
| [hello-world] Installing dependencies... | ||
| ... | ||
| [helloworld] Starting in dev mode... | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| (beeware-venv) $ cd helloworld | ||
| (beeware-venv) $ briefcase dev | ||
| [hello-world] Installing dependencies... | ||
| ... | ||
| [helloworld] Starting in dev mode... | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv) C:\...>cd helloworld | ||
| (beeware-venv) C:\...>briefcase dev | ||
| [hello-world] Installing dependencies... | ||
| ... | ||
| [helloworld] Starting in dev mode... | ||
| This should open a GUI window: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. image:: images/macOS/tutorial-1.png | ||
| :alt: Hello World Tutorial 1 window, on macOS | ||
| .. group-tab:: Linux | ||
| .. image:: images/linux/tutorial-1.png | ||
| :alt: Hello World Tutorial 1 window, on Linux | ||
| .. group-tab:: Windows | ||
| .. image:: images/windows/tutorial-1.png | ||
| :alt: Hello World Tutorial 1 window, on Windows | ||
| Press the close button (or select Quit from the application's menu), and you're | ||
| done! Congratulations - you've just written a standalone, native application | ||
| in Python! | ||
| Next steps | ||
| ========== | ||
| We now have a working application, running in developer mode. Now we can add | ||
| some logic of our own to make our application do something a little more | ||
| interesting. In :doc:`Tutorial 2 <tutorial-2>`, we'll put a more useful user | ||
| interface onto our application. |
| ================================== | ||
| Tutorial 2 - Making it interesting | ||
| ================================== | ||
| In :doc:`Tutorial 1 <tutorial-1>`, we generated a stub project that was able | ||
| to run, but we didn't write any code ourselves. Let's take a look at what was | ||
| generated for us. | ||
| What was generated | ||
| ================== | ||
| In the ``src/helloworld`` directory, you should see 3 files: ``__init__.py``, | ||
| ``__main__.py`` and ``app.py``. | ||
| ``__init__.py`` marks the ``helloworld`` directory as an importable Python | ||
| package. It is an empty file; the very fact it exists tells the Python | ||
| interpreter that ``helloworld`` is a package. | ||
| ``__main__.py`` marks the ``helloworld`` package as a special kind of package - | ||
| an executable module. If you try to run the ``helloworld`` module, using | ||
| ``python -m helloworld``, the ``__main__.py`` file is where Python will start | ||
| executing. The contents of ``__main__.py`` is relatively simple:: | ||
| from helloworld.app import main | ||
| if __name__ == '__main__': | ||
| main().main_loop() | ||
| That is - it imports the ``main`` method from the helloworld app; and if it's | ||
| being executed as an entry point, calls the main() method, and starts the | ||
| application's main loop. The main loop is the way a GUI application listens for | ||
| user input (like mouse clicks and keyboard presses). | ||
| The more interesting file is ``app.py`` - this contains the logic that creates | ||
| our application window:: | ||
| import toga | ||
| from toga.style import Pack | ||
| from toga.style.pack import COLUMN, ROW | ||
| class HelloWorld(toga.App): | ||
| def startup(self): | ||
| main_box = toga.Box() | ||
| self.main_window = toga.MainWindow(title=self.name) | ||
| self.main_window.content = main_box | ||
| self.main_window.show() | ||
| def main(): | ||
| return HelloWorld('Hello World', 'com.example.helloworld') | ||
| Lets go through this line by line:: | ||
| import toga | ||
| from toga.style import Pack | ||
| from toga.style.pack import COLUMN, ROW | ||
| First, we import the ``toga`` widget toolkit, as well as some style-related | ||
| utility classes and constants. Our code doesn't use these yet - but we'll make | ||
| use of them shortly. | ||
| Then, we define a class:: | ||
| class HelloWorld(toga.App): | ||
| Each Toga application has a single ``toga.App`` instance, representing the | ||
| running entity that is the application. The app may end up managing multiple | ||
| windows; but for simple applications, there will be a single main window. | ||
| Next, we define a ``startup()`` method:: | ||
| def startup(self): | ||
| main_box = toga.Box() | ||
| The first thing the startup method does is to define a main box. Toga's layout | ||
| scheme behaves similar to HTML. You build an application by constructing a | ||
| collection of boxes, each of which contains other boxes, or actual widgets. You | ||
| then apply styles to these boxes to define how they will consume the available | ||
| window space. | ||
| In this application, we define a single box, but we don't put anything into it. | ||
| Next, we define a window into which we can put this empty box:: | ||
| self.main_window = toga.MainWindow(title=self.name) | ||
| This creates an instance of a ``toga.MainWindow``, which will have a title | ||
| matching the application's name. A Main Window is a special kind of window in | ||
| Toga - it's a window that is closely bound to the lifecycle of the app. When | ||
| the Main Window is closed, the application exits. The Main Window is also the | ||
| window that has the application's menu (if you're on a platform like Windows | ||
| where menu bars are part of the window) | ||
| We then add our empty box as the content of the main window, and instruct the | ||
| application to show our window:: | ||
| self.main_window.content = main_box | ||
| self.main_window.show() | ||
| Last of all, we define a ``main()`` method. This is what creates the instance | ||
| of our application:: | ||
| def main(): | ||
| return HelloWorld('Hello World', 'com.example.helloworld') | ||
| This ``main()`` method is the one that is imported and invoked by | ||
| ``__main__.py``. It creates and returns an instance of our ``HelloWorld`` | ||
| application. | ||
| Adding some content of our own | ||
| ============================== | ||
| **TODO** | ||
| Now that we've made these changes we can see what they look like by starting | ||
| the application again. As before, we'll use Developer mode: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase dev | ||
| [helloworld] Starting in dev mode... | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase dev | ||
| [helloworld] Starting in dev mode... | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv) C:\...>briefcase dev | ||
| [helloworld] Starting in dev mode... | ||
| You'll notice that this time, it *doesn't* install dependencies. Briefcase can | ||
| detect that the application has been run before, and to save time, will only | ||
| run the application. If you add new dependencies to your app, you can make | ||
| sure that they're installed by passing in a ``-d`` option when you run | ||
| ``briefcase dev``. | ||
| This should open a GUI window: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. image:: images/macOS/tutorial-2.png | ||
| :alt: Hello World Tutorial 2 window, on macOS | ||
| .. group-tab:: Linux | ||
| .. image:: images/linux/tutorial-2.png | ||
| :alt: Hello World Tutorial 2 window, on Linux | ||
| .. group-tab:: Windows | ||
| .. image:: images/windows/tutorial-2.png | ||
| :alt: Hello World Tutorial 2 window, on Windows | ||
| Next steps | ||
| ========== | ||
| We've now got an application that does something a little more interesting. But | ||
| it only runs on our own computer. Let's package this application for | ||
| distribution. In :doc:`Tutorial 3 <tutorial-3>`, we'll wrap our application up | ||
| as a standalone installer that we could send to a friend, a customer, or upload | ||
| to an App Store. |
| ======================================= | ||
| Tutorial 3 - Packaging for distribution | ||
| ======================================= | ||
| So far, we've been running our application in "Developer mode". This makes it | ||
| easy for us to run our application locally - but what we really want is to be | ||
| able to give our application to others. | ||
| However, we don't want to have to teach our users how to install Python, create | ||
| a virtual environment, clone a git repository, and run Briefcase in developer | ||
| mode. We'd rather just give them an installer, and have the application Just | ||
| Work. | ||
| Briefcase can be used to package your application for distribution in this way. | ||
| You can now use briefcase to build your application. Since this is the first | ||
| time we're packaging our application, we need to create some confguration files | ||
| and other scaffolding to support the packaging process. From the ``helloworld`` | ||
| directory, run: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase create | ||
| [helloworld] Generating application template... | ||
| Using app template: https://github.com/beeware/briefcase-macOS-app-template.git | ||
| ... | ||
| [helloworld] Installing support package... | ||
| ... | ||
| [helloworld] Installing dependencies... | ||
| ... | ||
| [helloworld] Installing application code... | ||
| ... | ||
| [helloworld] Installing application resources... | ||
| ... | ||
| [helloworld] Application created. | ||
| .. group-tab:: Linux | ||
| .. note:: | ||
| Packaging binaries for Linux is complicated, because of the inconsistent | ||
| library versions present on each distribution. Briefcase uses the | ||
| `AppImage <https://appimage.org/>`__ format by default, which resolves | ||
| many of these problems. An AppImage can be executed on *any* Linux | ||
| distribution with a version of libc greater than or equal the version of | ||
| the distribution where the AppImage was created. | ||
| To simplify the packaging process, Briefcase provides a pre-compiled | ||
| Python support library. This support library was compiled on Ubuntu 16.04, | ||
| which means the AppImages build by Briefcase can be used on *any* Linux | ||
| distribution of about the same age or newer - but those AppImages *must* | ||
| be compiled on Ubuntu 16.04. | ||
| This means you have four options: | ||
| 1. Install Ubuntu 16.04 on your own machine. | ||
| 2. Find a cloud or CI provider that can provide you an Ubuntu 16.04 | ||
| machine for build purposes. Github Actions, for example, provides | ||
| Ubuntu 16.04 as a build option. | ||
| 3. Run Briefcase inside a Docker container. Once you have `installed | ||
| Docker <https://docs.docker.com/install/>`__, the command:: | ||
| $ docker run -it -v /path/to/project:/project ubuntu:16.04 /bin/bash | ||
| will start a Docker container running Ubuntu 16.04, mounting your | ||
| local project directory (``/path/to/project``) as the ``/project`` | ||
| directory in the container. You can then install the requirements | ||
| necessary to run Briefcase inside the container:: | ||
| $ apt-get update | ||
| $ apt-get install python3-dev python3-venv libgirepository1.0-dev libcairo2-dev libpango1.0-dev libwebkitgtk-3.0-0 gir1.2-webkit-3.0 | ||
| $ pip install beeware | ||
| There is no need to use a virtual environment inside the Docker | ||
| container, as Docker provides the isolation layer that virtual | ||
| environments provide in a local environment. | ||
| As an aside, this approach will also allow you to create Linux | ||
| packages while on Windows or macOS. | ||
| 4. Build your own version of the BeeWare `Python support libraries | ||
| <https://github.com/beeware/Python-Linux-support>`__. If you take this | ||
| approach, be aware that your AppImage will only be as portable as the | ||
| version of libc that is available on the distribution you use. If you | ||
| build using Ubuntu 19.10, for example, you can expect that only people | ||
| on the most recent versions of Fedora or Arch will be able to run your | ||
| AppImage. | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase create | ||
| [helloworld] Generating application template... | ||
| Using app template: https://github.com/beeware/briefcase-linux-appImage-template.git | ||
| ... | ||
| [helloworld] Installing support package... | ||
| ... | ||
| [helloworld] Installing dependencies... | ||
| ... | ||
| [helloworld] Installing application code... | ||
| ... | ||
| [helloworld] Installing application resources... | ||
| ... | ||
| [helloworld] Application created. | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv) C:\...>briefcase create | ||
| [helloworld] Generating application template... | ||
| Using app template: https://github.com/beeware/briefcase-windows-msi-template.git | ||
| ... | ||
| [helloworld] Installing support package... | ||
| ... | ||
| [helloworld] Installing dependencies... | ||
| ... | ||
| [helloworld] Installing application code... | ||
| ... | ||
| [helloworld] Installing application resources... | ||
| ... | ||
| [helloworld] Application created. | ||
| Once this completes, if you look in the project directory, you should now see a | ||
| directory corresponding to your platform (``macOS``, ``linux``, or ``windows``) | ||
| that contains additional files. This is the platform-specific packaging | ||
| configuration for your application. | ||
| You can then compile an installer, using the `build` command: | ||
| .. tabs:: | ||
| .. group-tab:: macOS | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase build | ||
| [helloworld] Building DMG... | ||
| ... | ||
| [helloworld] Created Hello World-0.0.1.dmg. | ||
| Once this step completes, the ``macOS`` folder will contain an ``Hello | ||
| World.app``. This file is a self contained macOS executable. If you open | ||
| the Finder, you can double click on the icon to start the application. If | ||
| you send ``Hello World.app`` to a friend, they will be able to do the same | ||
| - double click on the app, and see your app running. | ||
| The ``macOS`` folder will contain a file named ``Hello World-0.0.1.dmg``. | ||
| If you locate this file in the Finder, and double click on it's icon, | ||
| you'll mount the DMG, giving you a copy of the Hello World app, and a | ||
| link to your Applications folder for easy installation. Drag the app file | ||
| into Application, and you've installed your application. Send the DMG file | ||
| to a friend, and they should be able to do the same. | ||
| .. group-tab:: Linux | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase build | ||
| [helloworld] Building AppImage... | ||
| ... | ||
| [helloworld] Created Hello World-x86_64-0.0.1.AppImage. | ||
| Once this step completes, the ``linux`` folder will contain a file named | ||
| ``Hello World-x86_64-0.0.1.AppImage``. This AppImage is an executable; | ||
| you can run it from the shell, or double click on it in your file explorer. | ||
| You can also give it to any other Linux user, and as long as they've got | ||
| a recent version of Linux, they should be able to run it in the same way. | ||
| .. group-tab:: Windows | ||
| .. code-block:: doscon | ||
| (beeware-venv) C:\...>briefcase build | ||
| [helloworld] Building MSI... | ||
| ... | ||
| [helloworld] Created Hello_World-0.0.1.msi. | ||
| Once this step completes, the ``windows`` folder will contain a file named | ||
| ``Hello_World-0.0.1.msi``. If you double click on this installer, you | ||
| should go through a familiar Windows installation process. Once this | ||
| installation completes, there will be a "Hello World" entry in your start | ||
| menu. | ||
| Next steps | ||
| ========== | ||
| We now have our application packaged for distribution on desktop platforms. But | ||
| what about mobile? In :doc:`Tutorial 4 <tutorial-4/index>`, we'll convert | ||
| out application into a mobile application, and deploy it onto a device | ||
| simulator, and onto a phone. |
| ====================================== | ||
| Tutorial 4 - Taking it mobile: Android | ||
| ====================================== | ||
| To deploy our applicaton to Android... | ||
| Next steps | ||
| ========== | ||
| We've now got an application on our phone! Is there anywhere other way to | ||
| deploy a BeeWare app? Turn to :doc:`Tutorial 5 <../tutorial-5>` to find | ||
| out... |
| .. raw:: html | ||
| <style> | ||
| .row {clear: both} | ||
| .column img {border: 1px solid black;} | ||
| @media only screen and (min-width: 1000px), | ||
| only screen and (min-width: 500px) and (max-width: 768px){ | ||
| .column { | ||
| padding-left: 5px; | ||
| padding-right: 5px; | ||
| float: left; | ||
| } | ||
| .column3 { | ||
| width: 33.3%; | ||
| } | ||
| .column2 { | ||
| width: 50%; | ||
| } | ||
| } | ||
| </style> | ||
| ============================= | ||
| Tutorial 4 - Taking it Mobile | ||
| ============================= | ||
| So far, we've been running and testing our application on the desktop. However, | ||
| BeeWare also supports mobile platforms - and the application we've written | ||
| can be deployed to your mobile device, too! | ||
| .. admonition:: iOS only... for now. | ||
| The BeeWare project *has* tooling for Android. Unfortunately, due to some | ||
| recent changes in the Android ecosystem, combined with some changes in Toga | ||
| itself, means that our Android tooling is currently broken. We're working | ||
| on it, and hope to have a solution in the very near future. | ||
| In the meantime, this tutorial only works on iOS. | ||
| .. rst-class:: clearfix row | ||
| .. rst-class:: column column2 | ||
| :doc:`iOS <iOS>` | ||
| ---------------- | ||
| iOS applications can only be compiled on macOS. You'll need `Xcode | ||
| <https://apps.apple.com/au/app/xcode/id497799835?mt=12>`__, which you should | ||
| have installed in :doc:`Tutorial 0 <../tutorial-0>`. | ||
| .. rst-class:: column column2 | ||
| :doc:`Android <android>` | ||
| ------------------------ | ||
| Android applications be compiled on macOS, Windows or Linux. You'll need to | ||
| download and install `Android Studio <https://developer.android.com/studio>`__. | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :hidden: | ||
| iOS | ||
| android |
| ================================== | ||
| Tutorial 4 - Taking it mobile: iOS | ||
| ================================== | ||
| Now, we're going to take our application, and deploy it as an iOS application. | ||
| The process of deploying an application to iOS is very similar to the process | ||
| for deploying as a desktop application. First, you run the ``create`` command - | ||
| but this time, we specify that we want to create an iOS application: | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase create iOS | ||
| [helloworld] Generating application template... | ||
| Using app template: https://github.com/beeware/briefcase-iOS-app-template.git | ||
| ... | ||
| [helloworld] Installing support package... | ||
| ... | ||
| [helloworld] Installing dependencies... | ||
| ... | ||
| [helloworld] Installing application code... | ||
| ... | ||
| [helloworld] Installing application resources... | ||
| ... | ||
| [helloworld] Application created. | ||
| Once this completes, we'll now have an ``iOS`` directory in your project. | ||
| This directory will contain a ``Hello World`` folder, which will contain | ||
| an Xcode project, as well as the support libraries and the application code | ||
| needed for the application. | ||
| You can then use briefcase to compile the application compile an installer, | ||
| using the ``build`` command: | ||
| .. code-block:: bash | ||
| (beeware-venv) $ briefcase build iOS | ||
| [hello-world] Generating application template... | ||
| Using app template: https://github.com/beeware/briefcase-iOS-Xcode-template.git | ||
| [helloworld] Building DMG... | ||
| ... | ||
| [helloworld] Created Hello World-0.0.1.dmg. | ||
| Once this step completes, the ``macOS`` folder will contain an ``Hello | ||
| World.app``. This file is a self contained macOS executable. If you open | ||
| the Finder, you can double click on the icon to start the application. If | ||
| you send ``Hello World.app`` to a friend, they will be able to do the same | ||
| - double click on the app, and see your app running. | ||
| The ``macOS`` folder will contain a file named ``Hello World-0.0.1.dmg``. | ||
| If you locate this file in the Finder, and double click on it's icon, | ||
| you'll mount the DMG, giving you a copy of the Hello World app, and a | ||
| link to your Applications folder for easy installation. Drag the app file | ||
| into Application, and you've installed your application. Send the DMG file | ||
| to a friend, and they should be able to do the same. | ||
| Next steps | ||
| ========== | ||
| We've now got an application on our phone! Is there anywhere other way to | ||
| deploy a BeeWare app? Turn to :doc:`Tutorial 5 <../tutorial-5>` to find | ||
| out... |
| =============================== | ||
| Tutorial 5 - Put it on the web! | ||
| =============================== | ||
| In addition to supporting mobile platforms, the Toga widget toolkit supports | ||
| the web! Using the same API, you can deploy your application as a web site. | ||
| **Coming soon** | ||
| Next steps | ||
| ========== | ||
| We've now deployed our application on the web! We're now ready to share our | ||
| application with the rest of the world. In :doc:`Tutorial 6 <./tutorial-6>`, | ||
| we'll use Briefcase to publish our application so others can download it. |
| ================================= | ||
| Tutorial 6 - Publishing your app! | ||
| ================================= | ||
| Once you've built an installer for your application, you're going to want to | ||
| share it with the world. Briefcase provides a command - ``publish`` to manage | ||
| this process, with a range of options for how to publish your application. | ||
| **Coming soon** | ||
| Next steps | ||
| ========== | ||
| This has been a taster for what you can do with the tools provided by the | ||
| BeeWare project. What you do from here is up to you! | ||
| Some places to go from here: | ||
| * Tutorials demonstrating `features of the Toga widget toolkit | ||
| <https://toga.readthedocs.io/en/latest/tutorial/index.html>`__. | ||
| * Details on the `options available when configuring your Briefcase project | ||
| <https://briefcase.readthedocs.io/en/latest/reference/index.html>`__. |
@@ -1,13 +0,18 @@ | ||
| Metadata-Version: 1.1 | ||
| Metadata-Version: 2.1 | ||
| Name: beeware | ||
| Version: 0.1.1 | ||
| Summary: UNKNOWN | ||
| Home-page: http://pybee.org/ | ||
| Version: 0.3.0.dev1 | ||
| Summary: A metapackage to install the full BeeWare suite of tools. | ||
| Home-page: http://beeware.org/ | ||
| Author: Russell Keith-Magee | ||
| Author-email: russell@keith-magee.com | ||
| Maintainer: Russell Keith-Magee | ||
| Maintainer-email: russell@keith-magee.com | ||
| License: New BSD | ||
| Description-Content-Type: UNKNOWN | ||
| Description: .. image:: http://pybee.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://pybee.org/ | ||
| Project-URL: Funding, https://beeware.org/contributing/membership/ | ||
| Project-URL: Documentation, http://briefcase.readthedocs.io/en/latest/ | ||
| Project-URL: Tracker, https://github.com/beeware/briefcase/issues | ||
| Project-URL: Source, https://github.com/beeware/briefcase | ||
| Description: .. image:: https://beeware.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://beeware.org | ||
@@ -18,64 +23,32 @@ BeeWare | ||
| .. image:: https://img.shields.io/pypi/pyversions/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Python Versions | ||
| .. image:: https://img.shields.io/pypi/v/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: PyPI Version | ||
| .. image:: https://img.shields.io/pypi/status/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Maturity | ||
| .. image:: https://img.shields.io/pypi/l/beeware.svg | ||
| :target: https://github.com/pybee/beeware/blob/master/LICENSE | ||
| :target: https://github.com/beeware/beeware/blob/master/LICENSE | ||
| :alt: BSD License | ||
| .. image:: https://badges.gitter.im/pybee/general.svg | ||
| :target: https://gitter.im/pybee/general | ||
| .. image:: https://github.com/beeware/beefore/workflows/Build%20status/badge.svg | ||
| :target: https://github.com/beeware/beefore/actions | ||
| :alt: Build Status | ||
| .. image:: https://badges.gitter.im/beeware/general.svg | ||
| :target: https://gitter.im/beeware/general | ||
| :alt: Chat on Gitter | ||
| BeeWare is a collection of tools and libraries to aid native application | ||
| development in Python. | ||
| This package provides a convenient user interface to drive those tools. | ||
| BeeWare is a collection of tools and libraries for building and distributing | ||
| native applications in Python. | ||
| Usage | ||
| ----- | ||
| For a introduction to the full BeeWare suite, we recommend running the | ||
| `BeeWare Tutorial`_. | ||
| To install BeeWare, create a new virtual environment:: | ||
| $ mkdir beeware | ||
| $ cd beeware | ||
| beeware $ python -m venv venv | ||
| beeware $ ./venv/bin/activate | ||
| (or, if you're on Windows):: | ||
| beeware $ venv\Scripts\activate.bat | ||
| Then, install BeeWare in that virtual environment:: | ||
| (venv) $ pip install beeware | ||
| To start a new project, run:: | ||
| (venv) $ beeware new | ||
| This will prompt you for details of your new project, such as the name, | ||
| description, and license. | ||
| Once you've added your application code, run:: | ||
| (venv) $ beeware build ios | ||
| from the directory that beeware created to build your application. To run | ||
| your application:: | ||
| (venv) $ beeware run ios | ||
| You can also target `android`, `macos`, `windows`, `linux` or `django`. | ||
| This will: | ||
| * Run the app in the simulator for iOS and Android; | ||
| * Start a desktop app on Windows, macOS and Linux; and | ||
| * Start a webserver on port 8000 for Django | ||
| Community | ||
@@ -88,3 +61,3 @@ --------- | ||
| * The `pybee/general`_ channel on Gitter. | ||
| * The `beeware/general`_ channel on Gitter. | ||
@@ -100,9 +73,10 @@ We foster a welcoming and respectful community as described in our | ||
| .. _BeeWare suite: http://pybee.org | ||
| .. _BeeWare suite: https://beeware.org | ||
| .. _BeeWare Tutorial: https://beeware.readthedocs.io/en/latest/tutorial/ | ||
| .. _@pybeeware on Twitter: https://twitter.com/pybeeware | ||
| .. _pybee/general: https://gitter.im/pybee/general | ||
| .. _BeeWare Community Code of Conduct: http://pybee.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/pybee/beeware/issues | ||
| .. _fork the code: https://github.com/pybee/beeware | ||
| .. _submit a pull request: https://github.com/pybee/beeware/pulls | ||
| .. _beeware/general: https://gitter.im/beeware/general | ||
| .. _BeeWare Community Code of Conduct: http://beeware.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/beeware/beeware/issues | ||
| .. _fork the code: https://github.com/beeware/beeware | ||
| .. _submit a pull request: https://github.com/beeware/beeware/pulls | ||
@@ -118,3 +92,7 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
| Classifier: Topic :: Software Development | ||
| Classifier: Topic :: Utilities | ||
| Requires-Python: >= 3.5 | ||
| Description-Content-Type: text/x-rst; charset=UTF-8 |
@@ -1,2 +0,2 @@ | ||
| briefcase | ||
| toga>=0.3.0.dev2 | ||
| briefcase>=0.3.0.dev1 | ||
| toga>=0.3.0.dev15 |
@@ -6,3 +6,2 @@ AUTHORS | ||
| README.rst | ||
| beeware.py | ||
| setup.cfg | ||
@@ -13,4 +12,24 @@ setup.py | ||
| beeware.egg-info/dependency_links.txt | ||
| beeware.egg-info/entry_points.txt | ||
| beeware.egg-info/not-zip-safe | ||
| beeware.egg-info/requires.txt | ||
| beeware.egg-info/top_level.txt | ||
| beeware.egg-info/top_level.txt | ||
| docs/Makefile | ||
| docs/conf.py | ||
| docs/index.rst | ||
| docs/make.bat | ||
| docs/requirements.txt | ||
| docs/spelling_wordlist | ||
| docs/images/beeware.png | ||
| docs/tutorial/tutorial-0.rst | ||
| docs/tutorial/tutorial-1.rst | ||
| docs/tutorial/tutorial-2.rst | ||
| docs/tutorial/tutorial-3.rst | ||
| docs/tutorial/tutorial-5.rst | ||
| docs/tutorial/tutorial-6.rst | ||
| docs/tutorial/images/linux/tutorial-1.png | ||
| docs/tutorial/images/macOS/tutorial-1.png | ||
| docs/tutorial/images/windows/Thumbs.db | ||
| docs/tutorial/images/windows/tutorial-1.png | ||
| docs/tutorial/tutorial-4/android.rst | ||
| docs/tutorial/tutorial-4/iOS.rst | ||
| docs/tutorial/tutorial-4/index.rst |
@@ -1,1 +0,1 @@ | ||
| beeware | ||
+3
-3
| # Contributing | ||
| PyBee <3's contributions! | ||
| BeeWare <3's contributions! | ||
| Please be aware, PyBee operates under a Code of Conduct. | ||
| Please be aware, BeeWare operates under a Code of Conduct. | ||
| See [CONTRIBUTING to PyBee](http://pybee.org/contributing) for details. | ||
| See [CONTRIBUTING to BeeWare](http://pybee.org/contributing) for details. | ||
+9
-1
@@ -5,2 +5,10 @@ include CONTRIBUTING.md | ||
| include LICENSE | ||
| include lizard.py *.py | ||
| include docs/spelling_wordlist | ||
| recursive-include docs *.bat | ||
| recursive-include docs *.db | ||
| recursive-include docs *.png | ||
| recursive-include docs *.py | ||
| recursive-include docs *.rst | ||
| recursive-include docs *.txt | ||
| recursive-include docs Makefile | ||
| recursive-exclude docs/_build * |
+43
-65
@@ -1,13 +0,18 @@ | ||
| Metadata-Version: 1.1 | ||
| Metadata-Version: 2.1 | ||
| Name: beeware | ||
| Version: 0.1.1 | ||
| Summary: UNKNOWN | ||
| Home-page: http://pybee.org/ | ||
| Version: 0.3.0.dev1 | ||
| Summary: A metapackage to install the full BeeWare suite of tools. | ||
| Home-page: http://beeware.org/ | ||
| Author: Russell Keith-Magee | ||
| Author-email: russell@keith-magee.com | ||
| Maintainer: Russell Keith-Magee | ||
| Maintainer-email: russell@keith-magee.com | ||
| License: New BSD | ||
| Description-Content-Type: UNKNOWN | ||
| Description: .. image:: http://pybee.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://pybee.org/ | ||
| Project-URL: Funding, https://beeware.org/contributing/membership/ | ||
| Project-URL: Documentation, http://briefcase.readthedocs.io/en/latest/ | ||
| Project-URL: Tracker, https://github.com/beeware/briefcase/issues | ||
| Project-URL: Source, https://github.com/beeware/briefcase | ||
| Description: .. image:: https://beeware.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://beeware.org | ||
@@ -18,64 +23,32 @@ BeeWare | ||
| .. image:: https://img.shields.io/pypi/pyversions/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Python Versions | ||
| .. image:: https://img.shields.io/pypi/v/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: PyPI Version | ||
| .. image:: https://img.shields.io/pypi/status/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Maturity | ||
| .. image:: https://img.shields.io/pypi/l/beeware.svg | ||
| :target: https://github.com/pybee/beeware/blob/master/LICENSE | ||
| :target: https://github.com/beeware/beeware/blob/master/LICENSE | ||
| :alt: BSD License | ||
| .. image:: https://badges.gitter.im/pybee/general.svg | ||
| :target: https://gitter.im/pybee/general | ||
| .. image:: https://github.com/beeware/beefore/workflows/Build%20status/badge.svg | ||
| :target: https://github.com/beeware/beefore/actions | ||
| :alt: Build Status | ||
| .. image:: https://badges.gitter.im/beeware/general.svg | ||
| :target: https://gitter.im/beeware/general | ||
| :alt: Chat on Gitter | ||
| BeeWare is a collection of tools and libraries to aid native application | ||
| development in Python. | ||
| This package provides a convenient user interface to drive those tools. | ||
| BeeWare is a collection of tools and libraries for building and distributing | ||
| native applications in Python. | ||
| Usage | ||
| ----- | ||
| For a introduction to the full BeeWare suite, we recommend running the | ||
| `BeeWare Tutorial`_. | ||
| To install BeeWare, create a new virtual environment:: | ||
| $ mkdir beeware | ||
| $ cd beeware | ||
| beeware $ python -m venv venv | ||
| beeware $ ./venv/bin/activate | ||
| (or, if you're on Windows):: | ||
| beeware $ venv\Scripts\activate.bat | ||
| Then, install BeeWare in that virtual environment:: | ||
| (venv) $ pip install beeware | ||
| To start a new project, run:: | ||
| (venv) $ beeware new | ||
| This will prompt you for details of your new project, such as the name, | ||
| description, and license. | ||
| Once you've added your application code, run:: | ||
| (venv) $ beeware build ios | ||
| from the directory that beeware created to build your application. To run | ||
| your application:: | ||
| (venv) $ beeware run ios | ||
| You can also target `android`, `macos`, `windows`, `linux` or `django`. | ||
| This will: | ||
| * Run the app in the simulator for iOS and Android; | ||
| * Start a desktop app on Windows, macOS and Linux; and | ||
| * Start a webserver on port 8000 for Django | ||
| Community | ||
@@ -88,3 +61,3 @@ --------- | ||
| * The `pybee/general`_ channel on Gitter. | ||
| * The `beeware/general`_ channel on Gitter. | ||
@@ -100,9 +73,10 @@ We foster a welcoming and respectful community as described in our | ||
| .. _BeeWare suite: http://pybee.org | ||
| .. _BeeWare suite: https://beeware.org | ||
| .. _BeeWare Tutorial: https://beeware.readthedocs.io/en/latest/tutorial/ | ||
| .. _@pybeeware on Twitter: https://twitter.com/pybeeware | ||
| .. _pybee/general: https://gitter.im/pybee/general | ||
| .. _BeeWare Community Code of Conduct: http://pybee.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/pybee/beeware/issues | ||
| .. _fork the code: https://github.com/pybee/beeware | ||
| .. _submit a pull request: https://github.com/pybee/beeware/pulls | ||
| .. _beeware/general: https://gitter.im/beeware/general | ||
| .. _BeeWare Community Code of Conduct: http://beeware.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/beeware/beeware/issues | ||
| .. _fork the code: https://github.com/beeware/beeware | ||
| .. _submit a pull request: https://github.com/beeware/beeware/pulls | ||
@@ -118,3 +92,7 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
| Classifier: Topic :: Software Development | ||
| Classifier: Topic :: Utilities | ||
| Requires-Python: >= 3.5 | ||
| Description-Content-Type: text/x-rst; charset=UTF-8 |
+29
-60
@@ -1,4 +0,4 @@ | ||
| .. image:: http://pybee.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://pybee.org/ | ||
| .. image:: https://beeware.org/static/images/brutus-270.png | ||
| :width: 72px | ||
| :target: https://beeware.org | ||
@@ -9,64 +9,32 @@ BeeWare | ||
| .. image:: https://img.shields.io/pypi/pyversions/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Python Versions | ||
| .. image:: https://img.shields.io/pypi/v/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: PyPI Version | ||
| .. image:: https://img.shields.io/pypi/status/beeware.svg | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :target: https://pypi.python.org/pypi/beeware | ||
| :alt: Maturity | ||
| .. image:: https://img.shields.io/pypi/l/beeware.svg | ||
| :target: https://github.com/pybee/beeware/blob/master/LICENSE | ||
| :target: https://github.com/beeware/beeware/blob/master/LICENSE | ||
| :alt: BSD License | ||
| .. image:: https://badges.gitter.im/pybee/general.svg | ||
| :target: https://gitter.im/pybee/general | ||
| .. image:: https://github.com/beeware/beefore/workflows/Build%20status/badge.svg | ||
| :target: https://github.com/beeware/beefore/actions | ||
| :alt: Build Status | ||
| .. image:: https://badges.gitter.im/beeware/general.svg | ||
| :target: https://gitter.im/beeware/general | ||
| :alt: Chat on Gitter | ||
| BeeWare is a collection of tools and libraries to aid native application | ||
| development in Python. | ||
| This package provides a convenient user interface to drive those tools. | ||
| BeeWare is a collection of tools and libraries for building and distributing | ||
| native applications in Python. | ||
| Usage | ||
| ----- | ||
| For a introduction to the full BeeWare suite, we recommend running the | ||
| `BeeWare Tutorial`_. | ||
| To install BeeWare, create a new virtual environment:: | ||
| $ mkdir beeware | ||
| $ cd beeware | ||
| beeware $ python -m venv venv | ||
| beeware $ ./venv/bin/activate | ||
| (or, if you're on Windows):: | ||
| beeware $ venv\Scripts\activate.bat | ||
| Then, install BeeWare in that virtual environment:: | ||
| (venv) $ pip install beeware | ||
| To start a new project, run:: | ||
| (venv) $ beeware new | ||
| This will prompt you for details of your new project, such as the name, | ||
| description, and license. | ||
| Once you've added your application code, run:: | ||
| (venv) $ beeware build ios | ||
| from the directory that beeware created to build your application. To run | ||
| your application:: | ||
| (venv) $ beeware run ios | ||
| You can also target `android`, `macos`, `windows`, `linux` or `django`. | ||
| This will: | ||
| * Run the app in the simulator for iOS and Android; | ||
| * Start a desktop app on Windows, macOS and Linux; and | ||
| * Start a webserver on port 8000 for Django | ||
| Community | ||
@@ -79,3 +47,3 @@ --------- | ||
| * The `pybee/general`_ channel on Gitter. | ||
| * The `beeware/general`_ channel on Gitter. | ||
@@ -91,8 +59,9 @@ We foster a welcoming and respectful community as described in our | ||
| .. _BeeWare suite: http://pybee.org | ||
| .. _BeeWare suite: https://beeware.org | ||
| .. _BeeWare Tutorial: https://beeware.readthedocs.io/en/latest/tutorial/ | ||
| .. _@pybeeware on Twitter: https://twitter.com/pybeeware | ||
| .. _pybee/general: https://gitter.im/pybee/general | ||
| .. _BeeWare Community Code of Conduct: http://pybee.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/pybee/beeware/issues | ||
| .. _fork the code: https://github.com/pybee/beeware | ||
| .. _submit a pull request: https://github.com/pybee/beeware/pulls | ||
| .. _beeware/general: https://gitter.im/beeware/general | ||
| .. _BeeWare Community Code of Conduct: http://beeware.org/community/behavior/ | ||
| .. _log them on Github: https://github.com/beeware/beeware/issues | ||
| .. _fork the code: https://github.com/beeware/beeware | ||
| .. _submit a pull request: https://github.com/beeware/beeware/pulls |
+38
-12
| [metadata] | ||
| description-file = README.rst | ||
| name = beeware | ||
| version = 0.3.0.dev1 | ||
| url = http://beeware.org/ | ||
| project_urls = | ||
| Funding = https://beeware.org/contributing/membership/ | ||
| Documentation = http://briefcase.readthedocs.io/en/latest/ | ||
| Tracker = https://github.com/beeware/briefcase/issues | ||
| Source = https://github.com/beeware/briefcase | ||
| author = Russell Keith-Magee | ||
| author_email = russell@keith-magee.com | ||
| maintainer = Russell Keith-Magee | ||
| maintainer_email = russell@keith-magee.com | ||
| classifiers = | ||
| Development Status :: 4 - Beta | ||
| Intended Audience :: Developers | ||
| License :: OSI Approved :: BSD License | ||
| Operating System :: OS Independent | ||
| Programming Language :: Python :: 3 | ||
| Programming Language :: Python :: 3.5 | ||
| Programming Language :: Python :: 3.6 | ||
| Programming Language :: Python :: 3.7 | ||
| Programming Language :: Python :: 3.8 | ||
| Programming Language :: Python :: 3 :: Only | ||
| Topic :: Software Development | ||
| Topic :: Utilities | ||
| license = New BSD | ||
| license_file = LICENSE | ||
| description = A metapackage to install the full BeeWare suite of tools. | ||
| long_description = file: README.rst | ||
| long_description_content_type = text/x-rst; charset=UTF-8 | ||
| keywords = | ||
| [options] | ||
| zip_safe = False | ||
| python_requires = >= 3.5 | ||
| install_requires = | ||
| briefcase >= 0.3.0.dev1 | ||
| toga >= 0.3.0.dev15 | ||
| [bdist_wheel] | ||
| universal = 1 | ||
| [tools:pytest] | ||
| addopts = --ignore node_modules | ||
| [flake8] | ||
| exclude = docs/*,build/* | ||
| max-complexity = 15 | ||
| max-line-length = 119 | ||
| [pep8] | ||
| ignore = W503 | ||
| [egg_info] | ||
@@ -19,0 +45,0 @@ tag_build = |
+2
-49
| #!/usr/bin/env python | ||
| import io | ||
| import re | ||
| from setuptools import setup, find_packages | ||
| from setuptools import setup | ||
| with io.open('./beeware.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() | ||
| setup( | ||
| name='beeware', | ||
| version=version, | ||
| description="", | ||
| long_description=long_description, | ||
| author='Russell Keith-Magee', | ||
| author_email='russell@keith-magee.com', | ||
| url='http://pybee.org/', | ||
| entry_points={ | ||
| 'console_scripts': [ | ||
| 'beeware = beeware:main', | ||
| ] | ||
| }, | ||
| py_modules=['beeware'], | ||
| license='New BSD', | ||
| install_requires=[ | ||
| 'briefcase', | ||
| 'toga>=0.3.0.dev2', | ||
| ], | ||
| classifiers=[ | ||
| 'Development Status :: 4 - Beta', | ||
| 'Intended Audience :: Developers', | ||
| 'License :: OSI Approved :: BSD License', | ||
| 'Operating System :: OS Independent', | ||
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3.5', | ||
| 'Programming Language :: Python :: 3.6', | ||
| 'Programming Language :: Python :: 3.7', | ||
| 'Topic :: Software Development', | ||
| 'Topic :: Utilities', | ||
| ], | ||
| # test_suite='tests' | ||
| ) | ||
| setup() |
| [console_scripts] | ||
| beeware = beeware:main | ||
-67
| import argparse | ||
| import subprocess | ||
| import sys | ||
| # Examples of valid version strings | ||
| # __version__ = '1.2.3.dev1' # Development release 1 | ||
| # __version__ = '1.2.3a1' # Alpha Release 1 | ||
| # __version__ = '1.2.3b1' # Beta Release 1 | ||
| # __version__ = '1.2.3rc1' # RC Release 1 | ||
| # __version__ = '1.2.3' # Final Release | ||
| # __version__ = '1.2.3.post1' # Post Release 1 | ||
| __version__ = '0.1.1' | ||
| def new_project(): | ||
| cmd = ['cookiecutter', 'https://github.com/pybee/briefcase-template.git'] | ||
| print('Creating new BeeWare project using the Briefcase Template...') | ||
| print('>>>', ' '.join(cmd)) | ||
| print() | ||
| subprocess.run(cmd) | ||
| def build_project(target): | ||
| cmd = ['setup.py', target] | ||
| print('Running Briefcase...') | ||
| print('>>> python', ' '.join(cmd)) | ||
| print() | ||
| subprocess.run([sys.executable] + cmd) | ||
| def run_project(target): | ||
| cmd = ['setup.py', target, '-s'] | ||
| print('Running Briefcase...') | ||
| print('>>> python', ' '.join(cmd)) | ||
| print() | ||
| subprocess.run([sys.executable] + cmd) | ||
| def main(): | ||
| parser = argparse.ArgumentParser() | ||
| subparsers = parser.add_subparsers(help='sub-command help', dest='command') | ||
| # beeware new | ||
| new_parser = subparsers.add_parser('new') | ||
| # beeware build | ||
| build_parser = subparsers.add_parser('build') | ||
| build_parser.add_argument('target', help='The platform to build') | ||
| # beeware run | ||
| run_parser = subparsers.add_parser('run') | ||
| run_parser.add_argument('target', help='The platform on which to run') | ||
| args = parser.parse_args() | ||
| if args.command == 'new': | ||
| new_project() | ||
| elif args.command == 'build': | ||
| build_project(args.target.lower()) | ||
| elif args.command == 'run': | ||
| run_project(args.target.lower()) | ||
| else: | ||
| parser.print_help() | ||
| if __name__ == '__main__': | ||
| main() |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
451026
2603.18%34
126.67%218
127.08%