kivy / kivy/python-for-android

service_only and empty bootstraps should be fixed/documented or removed

Ouverte
#2,875 1 commentaire 3 réactions 0 personnes assignées Voir sur GitHub
need-analysis Priority: Medium
Langage dominant
Python
Étoiles
8.9k
Forks
2k
Merge moyen
12 h 20 min
PR mergées (30 j)
9

Description

### Versions

- P4a: 2023.05.21

### Description

The p4a command line lists the valid bootstraps:

```
$ p4a bootstraps
[WARNING]: prerequisites.py is experimental and does not support all prerequisites yet.
[WARNING]: Please report any issues to the python-for-android issue tracker.
sdl2
depends: ['android', 'python3', 'sdl2']
webview
depends: ['genericndkbuild', 'android', 'python3']
service_library
depends: ['genericndkbuild', 'android', 'python3']
service_only
depends: ['genericndkbuild', 'android', 'python3']
empty
depends: []

```

However, `service_only` and `empty` are not mentioned in the [documentation on bootstrap options](https://python-for-android.readthedocs.io/en/latest/buildoptions/#bootstrap-build-options).

Furthermore, the `service_only` value has a show-stopper bug: in `build.py` starting from around line 809, the command-line arguments `orientation` and `manifest-orientation` are ignored if the bootstrap name is `service_only`.

But in line 1016, the code assumes those arguments are defined (even if they have default values).

```
args.manifest_orientation = get_manifest_orientation(
args.orientation, args.manifest_orientation
)
```

This causes p4a to crash.

I don't know enough about the difference between `service_only` and `service_library` to give an opinion, but we should either:

* Properly document `service_only` AND fix the bug stopping it from working and (if we are serious about supporting it) add an integration test to show it works, or
* remove it from the options available.

Likewise, we should either:

* Properly document `empty` and add an integration test to show it works, or
* remove it from the options available.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by reading build.py around lines 809 and 1016 to trace how service_only handles orientation and manifest-orientation, then review the bootstrap options documentation. Determine the intended status of service_only and empty, and check the existing integration-test structure. Done means the supported options are documented and tested without the reported service_only crash, or the unsupported options are removed.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, python
Domaine
build-system, cli, documentation
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.