Skip to content

Commit

Permalink
Merge branch 'main' into cmdline-app
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed May 27, 2024
2 parents 9969b4b + 31beb73 commit fb3cf11
Show file tree
Hide file tree
Showing 105 changed files with 734 additions and 676 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
python-version: "3.8"
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
if: always() && contains('success,failure', needs.unit-tests.result)
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0

Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
strategy:
fail-fast: false
matrix:
framework: [ "toga", "pyside6", "ppb", "pygame" ]
framework: [ "toga", "pyside6", "pygame" ]
runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ]

verify-apps:
Expand All @@ -189,5 +189,5 @@ jobs:
strategy:
fail-fast: false
matrix:
framework: [ "toga", "pyside6", "ppb", "pygame" ]
framework: [ "toga", "pyside6", "pygame" ]
runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ]
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
name: ${{ env.VERSION }}
draft: true
artifacts: dist/*
artifacts: dist/${{ github.event.repository.name }}*
artifactErrorsFailBuild: true

- name: Publish release to Test PyPI
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
# remove toml extra once Python 3.10 is no longer supported
Expand Down
5 changes: 2 additions & 3 deletions automation/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
# keep versions in sync with ../pyproject.toml
"setuptools==69.5.1",
"setuptools_scm==8.0.4",
"setuptools==70.0.0",
"setuptools_scm==8.1.0",
"setuptools_dynamic_dependencies @ git+https://github.com/beeware/setuptools_dynamic_dependencies",
]
build-backend = "setuptools.build_meta"
Expand All @@ -20,7 +20,6 @@ dynamic = ["version", "dependencies"]
"Console Automation" = "automation.bootstraps.console:ConsoleAutomationBootstrap"
"PySide6 Automation" = "automation.bootstraps.pyside6:PySide6AutomationBootstrap"
"Pygame Automation" = "automation.bootstraps.pygame:PygameAutomationBootstrap"
"PursuedPyBear Automation" = "automation.bootstraps.pursuedpybear:PursuedPyBearAutomationBootstrap"

[tool.setuptools_scm]
root = "../"
Expand Down
50 changes: 0 additions & 50 deletions automation/src/automation/bootstraps/pursuedpybear.py

This file was deleted.

1 change: 1 addition & 0 deletions changes/1212.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Validation rules for bundle identifiers have been loosened. App IDs that contain country codes or language reserved words are no longer flagged as invalid.
1 change: 1 addition & 0 deletions changes/1221.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed deprecated macOS deep signing.
1 change: 1 addition & 0 deletions changes/1472.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added xcrun debugging tips to error message for failed signing attempts
1 change: 1 addition & 0 deletions changes/1703.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added documentation describing manual signing requirement for Android packages.
1 change: 1 addition & 0 deletions changes/1746.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Escaping of quotation marks in TOML templates was corrected.
1 change: 1 addition & 0 deletions changes/1771.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added documentation for document type id, corrected placement of extension under the Document Types section and fixed typos.
1 change: 1 addition & 0 deletions changes/1773.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Docker version on OpenSUSE Tumbleweed is now accepted and no longer triggers a warning message.
1 change: 1 addition & 0 deletions changes/1777.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The release workflow was modified to exclude non-releasable artefacts.
1 change: 1 addition & 0 deletions changes/1778.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Android SDK Commandline Tools 12.0 is now used to build Android apps.
1 change: 1 addition & 0 deletions changes/1784.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Resolved a typo in the Android reference documentation.
1 change: 1 addition & 0 deletions changes/1786.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Specific examples added for requires under configuration.
1 change: 1 addition & 0 deletions changes/1789.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated furo from 2024.4.27 to 2024.5.6.
1 change: 1 addition & 0 deletions changes/1790.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated pre-commit from 3.7.0 to 3.7.1.
1 change: 1 addition & 0 deletions changes/1791.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated setuptools-scm from 8.0.4 to 8.1.0.
1 change: 1 addition & 0 deletions changes/1792.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The pinned dependencies in pyproject.toml and tox.ini were updated to their latest versions.
1 change: 1 addition & 0 deletions changes/1793.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated actions/checkout from 4.1.4 to 4.1.5.
1 change: 1 addition & 0 deletions changes/1798.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated actions/checkout from 4.1.5 to 4.1.6.
1 change: 1 addition & 0 deletions changes/1799.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The pinned dependencies in pyproject.toml and tox.ini were updated to their latest versions.
1 change: 1 addition & 0 deletions changes/1800.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated setuptools-scm from 8.0.4 to 8.1.0.
1 change: 1 addition & 0 deletions changes/1810.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The formal name of an app is now validated.
1 change: 1 addition & 0 deletions changes/1812.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The name of the license file can now be specified using a PEP 621-compliant format for the ``license`` setting.
1 change: 1 addition & 0 deletions changes/1812.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The format for the ``license`` field has been converted to PEP 621 format. Existing projects that specify ``license`` as a string should update their configurations to point at the generated license file using ``license.file = "LICENSE"``.
1 change: 1 addition & 0 deletions changes/1816.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated Android publishing documentation to encourage users to set non-default passwords.
1 change: 1 addition & 0 deletions changes/1817.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pytest was bumped from version 8.1.2 to 8.2.1.
1 change: 1 addition & 0 deletions changes/1819.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Android packaging documentation was clarified to describe the working directory.
1 change: 1 addition & 0 deletions changes/1820.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
macOS apps now generate ``info.plist`` entries for camera, photo library and microphone permissions.
1 change: 1 addition & 0 deletions changes/1821.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added clarification to the error message when Android SDK command-line tools not found.
1 change: 1 addition & 0 deletions changes/1823.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed failing tests on a Windows 11 development environment.
1 change: 1 addition & 0 deletions changes/1834.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Migrated PursuedPyBear bootstrap to the PursuedPyBear project.
1 change: 1 addition & 0 deletions changes/1839.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Files with non-unique content were made unique so the packaged wheel passes ``check-wheel-contents``.
1 change: 1 addition & 0 deletions changes/1840.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The pinned dependencies in pyproject.toml and tox.ini were updated to their latest versions.
1 change: 1 addition & 0 deletions changes/1841.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ``pre-commit`` hook for ``codespell`` was updated to its latest version.
1 change: 1 addition & 0 deletions changes/1842.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage[toml] from 7.5.1 to 7.5.2.
6 changes: 3 additions & 3 deletions docs/background/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,12 @@ Features
--------

* Apps can be updated as part of a call to package. (#473)
* The Android emulator can now be used on Apple M1 hardware. (#616)
* The Android emulator can now be used on Apple Silicon hardware. (#616)
* Names that are reserved words in Python (or other common programming languages) are now prevented when creating apps. (#617)
* Names that are invalid on Windows as filenames (such as CON and LPT0) are now invalid as app names. (#685)
* Verbose logging via ``-v`` and ``-vv`` now includes the return code, output, and environment variables for shell commands (#704)
* When the output of a wrapped command cannot be parsed, full command output, and failure reason is now logged. (#728)
* The iOS emulator will now run apps natively on M1 hardware, rather than through Rosetta emulation. (#739)
* The iOS emulator will now run apps natively on Apple Silicon hardware, rather than through Rosetta emulation. (#739)


Bugfixes
Expand All @@ -481,7 +481,7 @@ Bugfixes
* The error reporting when the user is on an unsupported platform or Python version has been improved. (#541)
* When the formal name uses non-Latin characters, the suggested Class and App names are now valid. (#612)
* The code signing process for macOS apps has been made more robust. (#652)
* macOS app binaries are now adhoc signed by default, ensuring they can run on M1 hardware. (#664)
* macOS app binaries are now adhoc signed by default, ensuring they can run on Apple Silicon hardware. (#664)
* Xcode version checks are now more robust. (#668)
* Android projects that have punctuation in their formal names can now build without error. (#696)
* Bundle name validation no longer excludes valid country identifiers (like ``in.example``). (#709)
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/code-signing/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ used as an upload key for the Google Play store, we call the key "upload-key".

We use a password of ``android``. This is the `default password for common
Android keystores <https://developers.google.com/android/guides/client-auth>`__.
You can change the password if you like. It is more important to limit who
has access to the keystore file than to change the password.
You should change the password. It is most critical to limit who
has access to the keystore file, but changing the password is also important.

See :doc:`Publishing your app <../publishing/android/>` for instructions
on using this key to upload an app to the Google Play store.
2 changes: 1 addition & 1 deletion docs/how-to/contribute-docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You'll also need to install the Enchant spell checking library.
(venv) $ brew install enchant
If you're on an M1 machine, you'll also need to manually set the location
If you're on an Apple Silicon machine, you'll also need to manually set the location
of the Enchant library:

.. code-block:: console
Expand Down
1 change: 1 addition & 0 deletions docs/how-to/publishing/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ focuses on how to distribute a BeeWare app on the Google Play Store.
Build the app in release mode
-----------------------------

To build the app, you must start from the directory containing the `pyproject.toml` file.
Use Briefcase to build a release bundle for your application:

.. tabs::
Expand Down
61 changes: 50 additions & 11 deletions docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ A hexadecimal RGB color value (e.g., ``#008577``) used alongside the primary
color. This setting is only used if the platform allows color modification,
otherwise it is ignored.


.. _configuration-requires-key:

``requires``
~~~~~~~~~~~~

Expand All @@ -331,6 +334,35 @@ application level, *and* platform level, the final set of requirements will be
the *concatenation* of requirements from all levels, starting from least to
most specific.

Any PEP 508 version specifier is legal. For example:

* Bare package name::

requires = ["pillow"]

* Package name with version specifier::

requires = ["pillow==9.1.0"]

* Install from source using the ``--no-binary`` entry::

requires = [
"pillow==9.1.0",
"--no-binary", "pillow",
]

* Git repository::

requires=["git+https://github.com/beeware/briefcase.git"]

* Local directory::

requires=["mysrc/myapp"]

* Local wheel file::

requires=["fullpath/wheelfile.whl"]

``revision``
~~~~~~~~~~~~

Expand Down Expand Up @@ -409,6 +441,8 @@ level, application level, *and* platform level, the final set of requirements
will be the *concatenation* of requirements from all levels, starting from least
to most specific.

See :ref:`requires <configuration-requires-key>` for examples.

``test_sources``
~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -441,17 +475,17 @@ starting from least to most specific, with the most specific taking priority.

Briefcase maintains a set of cross-platform permissions:

* ``permission.camera`` - permission to access to the camera to take photos or video.
* ``permission.camera`` - permission to access the camera to take photos or video.
* ``permission.microphone`` - permission to access the microphone.
* ``permission.coarse_location`` - permission to determine a rough GPS location.
* ``permission.fine_location`` - permission to determine a precise GPS location.
* ``permission.background_location`` - permission to track GPS location while in the background.
* ``permission.photo_library`` - permission to access to the user's photo library.
* ``permission.photo_library`` - permission to access the user's photo library.

If a cross-platform permission is used, it will be mapped to platform-specific values in
whatever files are used to define permissions on that platform.

Permissions can also be configured by adding platform-specific configuration items. See the documentation for the the platform backends to see the options that are available.
Permissions can also be configured by adding platform-specific configuration items. See the documentation for the platform backends to see the available options.

The value for each permission is a short description of why that permission is required.
If the platform requires, the value may be displayed to the user as part of an
Expand All @@ -469,15 +503,14 @@ handlers for specific document types by adding a ``document_type``
configuration section for each document type the application can support. This
section follows the format:

``[tool.briefcase.app.<app name>.document_type.<extension>]``
``[tool.briefcase.app.<app name>.document_type.<document type id>]``

or, for a platform specific definition:
or, for a platform-specific definition:

``[tool.briefcase.app.<app name>.<platform>.document_type.<extension>]``
``[tool.briefcase.app.<app name>.<platform>.document_type.<document type id>]``

The ``document type id`` is an identifier, in alphanumeric format. It is appended to the app id of an application to identify documents of the same type.

where ``extension`` is the file extension to register. For example, ``myapp``
could register as a handler for PNG image files by defining the configuration
section ``[tool.briefcase.app.myapp.document_type.png]``.

The document type declaration requires the following settings:

Expand All @@ -486,13 +519,19 @@ The document type declaration requires the following settings:

A short, one-line description of the document format.

``extension``
---------------

The ``extension`` is the file extension to register. For example, ``myapp``
could register as a handler for PNG image files by defining the configuration
section ``[tool.briefcase.app.myapp.document_type.png]``.

``icon``
--------

A path, relative to the directory where the ``pyproject.toml`` file is located,
to an image for an icon to register for use with documents of this type. The
path should *exclude* the extension; Briefcase will append a platform
appropriate extension when configuring the application. For example, an icon
path should *exclude* the extension; Briefcase will append a platform-appropriate extension when configuring the application. For example, an icon
specification of::

icon = "resources/icon"
Expand Down
13 changes: 10 additions & 3 deletions docs/reference/platforms/android/gradle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you have an existing install of the Android SDK, it will be used by Briefcase
if the ``ANDROID_HOME`` environment variable is set. If ``ANDROID_HOME`` is not
present in the environment, Briefcase will honor the deprecated
``ANDROID_SDK_ROOT`` environment variable. Additionally, an existing SDK install
must have version 9.0 of Command-line Tools installed; this version can be
must have version 12.0 of Command-line Tools installed; this version can be
installed in the SDK Manager in Android Studio.

Packaging format
Expand Down Expand Up @@ -132,9 +132,9 @@ The device or emulator to target. Can be specified as:
* a JSON dictionary specifying the properties of a device that will be created.
This dictionary must have, at a minimum, an AVD name:

.. code-block:: console
.. code-block:: console
$ briefcase run -d '{"avd":"new-device"}'
$ briefcase run -d '{"avd":"new-device"}'
You may also specify:

Expand Down Expand Up @@ -380,3 +380,10 @@ recipes for building the packages that are stored in the `secondary package repo
can be submitted as pull requests. Or, if you have a particular package that you'd like
us to support, please visit the `issue tracker
<https://github.com/chaquo/chaquopy/issues>`__ and provide details about that package.

While it is possible to use `briefcase package android` to produce an APK or AAB
file for distribution, the file is *not* usable as-is. It must be signed
regardless of whether you're distributing your app through the Play Store, or
via loading the APK directly. For details on how to manually sign your code,
see the instructions on `signing an Android App Bundle
<https://briefcase.readthedocs.io/en/stable/how-to/publishing/android.html#sign-the-android-app-bundle>`__.```
Loading

0 comments on commit fb3cf11

Please sign in to comment.