Skip to content

Commit 539f3ed

Browse files
committed
Update Contributing Guidelines and Readme
### Contributing Guidelines * Refer to Kivy for the heavy-lifting, and discuss the *differences* with Kivy. * Made wording more consistent with other sources. * Removed empty promise of a release every 4 weeks. That isn't a sustainable rate. * Very mild copy-edit. ### ReadMe * Refer to Kivy for details of support, rather than repeating. * Refer to p4a Contributing Guidelines, rather than repeating * Refer to Quickstart rather than repeating * Increased space for all the current sponsors and provisioned a far way into the future. * Could have used an SVG here, but the comment promised we would include a link :-(
1 parent 59d6985 commit 539f3ed

File tree

2 files changed

+93
-98
lines changed

2 files changed

+93
-98
lines changed

README.md

Lines changed: 49 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python-for-android
66
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
77
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors)
88

9-
python-for-android is a packaging tool for Python apps on Android. You can
9+
python-for-android (p4a) is a packaging tool for Python apps on Android. You can
1010
create your own Python distribution including the modules and
1111
dependencies you want, and bundle it in an APK or AAB along with your own code.
1212

@@ -21,71 +21,33 @@ Features include:
2121
device.
2222
- AAB: Android App Bundle support.
2323

24-
For documentation and support, see:
24+
python-for-android is managed by the [Kivy team](https://kivy.org).
25+
python-for-android is perfect for Kivy apps, but is not limited to those.
2526

26-
- Website: http://python-for-android.readthedocs.io
27-
- Mailing list: https://groups.google.com/forum/#!forum/kivy-users or
28-
https://groups.google.com/forum/#!forum/python-android.
29-
30-
## Documentation
31-
32-
Follow the [quickstart
33-
instructions](<https://python-for-android.readthedocs.org/en/latest/quickstart/>)
34-
to install and begin creating APKs and AABs.
35-
36-
**Quick instructions**: install python-for-android with:
37-
38-
pip install python-for-android
39-
40-
(for the develop branch: `pip install git+https://github.com/kivy/python-for-android.git`)
41-
42-
Test that the install works with:
43-
44-
p4a --version
45-
46-
To build any actual apps, **set up the Android SDK and NDK**
47-
as described in the [quickstart](
48-
<https://python-for-android.readthedocs.org/en/latest/quickstart/#installing-android-sdk>).
49-
**Use the SDK/NDK API level & NDK version as in the quickstart,**
50-
other API levels may not work.
51-
52-
With everything installed, build an APK with SDL2 with e.g.:
53-
54-
p4a apk --private PATH_TO_YOUR_APP_CODE --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python3,kivy
55-
56-
**If you need to deploy your app on Google Play, Android App Bundle (aab) is required since 1 August 2021:**
57-
58-
**For full instructions and parameter options,** see [the
59-
documentation](https://python-for-android.readthedocs.io/en/latest/quickstart/#usage).
27+
More information is available in the
28+
[online documentation](https://python-for-android.readthedocs.io) including a
29+
[quickstart
30+
guide](https://python-for-android.readthedocs.org/en/latest/quickstart/).
6031

6132
## Support
6233

63-
If you need assistance, you can ask for help on our mailing list:
34+
Are you having trouble using the Kivy framework, or any of its related projects? Is
35+
there an error you don't understand? Are you trying to figure out how to use it? We
36+
have volunteers who can help!
6437

65-
- User Group: https://groups.google.com/group/kivy-users
66-
67-
68-
We also have [#support Discord channel](https://chat.kivy.org/).
38+
Details can be found in the latest
39+
[Kivy Contact page](https://kivy.org/doc/master/contact.html).
6940

7041
## Contributing
7142

72-
We love pull requests and discussing novel ideas. Check out the Kivy
73-
project [contribution guide](https://kivy.org/doc/stable/contribute.html) and
74-
feel free to improve python-for-android.
75-
76-
See [our
77-
documentation](https://python-for-android.readthedocs.io/en/latest/contribute/)
78-
for more information about the python-for-android development and
79-
release model, but don't worry about the details. You just need to
80-
make a pull request, we'll take care of the rest.
43+
We welcome (and rely on)
44+
users who want to give back to the community by contributing to the project.
8145

82-
The following mailing list and IRC channel are used exclusively for
83-
discussions about developing the Kivy framework and its sister projects:
46+
Contributions can come in many forms.
8447

85-
- Dev Group: https://groups.google.com/group/kivy-dev
86-
87-
88-
We also have [#dev Discord channel](https://chat.kivy.org/).
48+
Please read our latest
49+
[Contribution Guidelines](https://python-for-android.readthedocs.org/en/latest/contribute.html)
50+
for more.
8951

9052
## License
9153

@@ -99,25 +61,25 @@ easier-to-extend interface. If you'd like to browse the old toolchain, its
9961
status is recorded for posterity at
10062
https://github.com/kivy/python-for-android/tree/old_toolchain.
10163

102-
In the last quarter of 2018 the python recipes were changed. The
103-
new recipe for python3 (3.7.1) had a new build system which was
104-
applied to the ancient python recipe, allowing us to bump the python2
64+
In the last quarter of 2018 the Python recipes were changed. The
65+
new recipe for Python3 (3.7.1) had a new build system which was
66+
applied to the ancient Python recipe, allowing us to bump the Python2
10567
version number to 2.7.15. This change unified the build process for
106-
both python recipes, and probably solved various issues detected over the
107-
years. These **unified python recipes** require a **minimum target api level of 21**,
68+
both Python recipes, and probably solved various issues detected over the
69+
years. These **unified Python recipes** require a **minimum target api level of 21**,
10870
*Android 5.0 - Lollipop*. If you need to build targeting an
10971
api level below 21, you should use an older version of python-for-android
11072
(<=0.7.1).
11173

112-
On March of 2020 we dropped support for creating apps that use Python 2. The latest
74+
On March 2020 we dropped support for creating apps that use Python 2. The latest
11375
python-for-android release that supported building Python 2 was version 2019.10.6.
11476

115-
On August of 2021, we added support for Android App Bundle (aab). As a collateral,
116-
now We support multi-arch apk.
77+
On August 2021, we added support for Android App Bundle (aab). As a
78+
collateral benefit, we now support multi-arch apk.
11779

11880
## Contributors
11981

120-
This project exists thanks to all the people who contribute. [[Contribute](https://kivy.org/doc/stable/contribute.html)].
82+
This project exists thanks to all the people who contributed. [[Become a contributor](https://kivy.org/doc/stable/contribute.html)].
12183
<a href="https://github.com/kivy/python-for-android/graphs/contributors"><img src="https://opencollective.com/kivy/contributors.svg?width=890&button=false" /></a>
12284

12385

@@ -142,3 +104,25 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
142104
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>
143105
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a>
144106
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a>
107+
<a href="https://opencollective.com/kivy/sponsor/10/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/10/avatar.svg"></a>
108+
<a href="https://opencollective.com/kivy/sponsor/11/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/11/avatar.svg"></a>
109+
<a href="https://opencollective.com/kivy/sponsor/12/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/12/avatar.svg"></a>
110+
<a href="https://opencollective.com/kivy/sponsor/13/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/13/avatar.svg"></a>
111+
<a href="https://opencollective.com/kivy/sponsor/14/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/14/avatar.svg"></a>
112+
<a href="https://opencollective.com/kivy/sponsor/15/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/15/avatar.svg"></a>
113+
<a href="https://opencollective.com/kivy/sponsor/16/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/16/avatar.svg"></a>
114+
<a href="https://opencollective.com/kivy/sponsor/17/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/17/avatar.svg"></a>
115+
<a href="https://opencollective.com/kivy/sponsor/18/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/18/avatar.svg"></a>
116+
<a href="https://opencollective.com/kivy/sponsor/19/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/19/avatar.svg"></a>
117+
<a href="https://opencollective.com/kivy/sponsor/20/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/20/avatar.svg"></a>
118+
<a href="https://opencollective.com/kivy/sponsor/21/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/21/avatar.svg"></a>
119+
<a href="https://opencollective.com/kivy/sponsor/22/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/22/avatar.svg"></a>
120+
<a href="https://opencollective.com/kivy/sponsor/23/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/23/avatar.svg"></a>
121+
<a href="https://opencollective.com/kivy/sponsor/24/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/24/avatar.svg"></a>
122+
<a href="https://opencollective.com/kivy/sponsor/25/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/25/avatar.svg"></a>
123+
<a href="https://opencollective.com/kivy/sponsor/26/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/26/avatar.svg"></a>
124+
<a href="https://opencollective.com/kivy/sponsor/27/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/27/avatar.svg"></a>
125+
<a href="https://opencollective.com/kivy/sponsor/28/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/28/avatar.svg"></a>
126+
<a href="https://opencollective.com/kivy/sponsor/29/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/29/avatar.svg"></a>
127+
<a href="https://opencollective.com/kivy/sponsor/30/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/30/avatar.svg"></a>
128+

doc/source/contribute.rst

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
1-
Development and Contributing
2-
============================
1+
.. _contributing:
32

4-
The development of python-for-android is managed by the Kivy team `via
5-
Github <https://github.com/kivy/python-for-android>`_.
3+
Contribution Guidelines
4+
=======================
65

7-
Issues and pull requests are welcome via the integrated `issue tracker
8-
<https://github.com/kivy/python-for-android/issues>`_.
6+
python-for-android is a complex product used by a large community of developers for free,
7+
but it is built entirely by the contributions of volunteers. We welcome (and rely on)
8+
users who want to give back to the community by contributing to the project.
99

10-
Read on for more information about how we manage development and
11-
releases, but don't worry about the details! Pull requests are welcome
12-
and we'll deal with the rest.
10+
Contributions can come in many forms.
11+
12+
The latest `Kivy Contribution Guidelines
13+
<https://kivy.readthedocs.io/en/master/>`_explain how you can help us, how to submit code, and our
14+
community code of conduct.
15+
16+
.. warning::
17+
The python-for-android process differs in small but important ways from the Kivy framework's process.
18+
Please read below.
1319

1420
Development model
1521
-----------------
1622

17-
python-for-android is developed using the following model:
23+
Unlike the Kivy framework, python-for-android is developed using the following model:
1824

1925
- The ``master`` branch always represents the latest stable release.
2026
- The ``develop`` branch is the most up to date with new contributions.
2127
- Releases happen periodically, and consist of merging the current ``develop`` branch into ``master``.
2228

29+
This means pull requests for python-for-android code and documentation submissions should be made
30+
to the ``develop`` branch, not the ``master`` branch.
31+
2332
For reference, this is based on a `Git flow
2433
<https://nvie.com/posts/a-successful-git-branching-model/>`__ model,
2534
although we don't follow this religiously.
@@ -29,8 +38,7 @@ Versioning
2938

3039
python-for-android releases currently use `calendar versioning
3140
<https://calver.org/>`__. Release numbers are of the form
32-
YYYY.MM.DD. We aim to create a new release every four weeks, but more
33-
frequent releases are also possible.
41+
YYYY.MM.DD.
3442

3543
We use calendar versioning because in practice, changes in
3644
python-for-android are often driven by updates or adjustments in the
@@ -42,6 +50,8 @@ while internals are changing.
4250
Creating a new release
4351
----------------------
4452

53+
(These instructions are for core developers, not casual contributors.)
54+
4555
New releases follow these steps:
4656

4757
- Create a new branch ``release-YYYY.MM.DD`` based on the ``develop`` branch.
@@ -87,10 +97,10 @@ How python-for-android uses `pip`
8797
*Last update: July 2019*
8898

8999
This section is meant to provide a quick summary how
90-
p4a (=python-for-android) uses pip and python packages in
100+
python-for-android uses pip and Python packages in
91101
its build process.
92-
**It is written for a python
93-
packagers point of view, not for regular end users or
102+
**It is written for a Python
103+
packager's point of view, not for regular end users or
94104
contributors,** to assist with making pip developers and
95105
other packaging experts aware of p4a's packaging needs.
96106

@@ -106,17 +116,17 @@ Basic concepts
106116
*(This part repeats other parts of the docs, for the sake of
107117
making this a more independent read)*
108118

109-
p4a builds & packages a python application for use on Android.
119+
p4a builds & packages a Python application for use on Android.
110120
It does this by providing a Java wrapper, and for graphical applications
111-
an SDL2-based wrapper which can be used with the kivy UI toolkit if
112-
desired (or alternatively just plain PySDL2). Any such python application
113-
will of course have further library dependencies to do its work.
121+
an SDL2-based wrapper which can be used with the Kivy framework if
122+
desired (or alternatively just plain PySDL2). Any such the Python application
123+
will likely have further library dependencies to do its work.
114124

115125
p4a supports two types of package dependencies for a project:
116126

117-
**Recipe:** install script in custom p4a format. Can either install
118-
C/C++ or other things that cannot be pulled in via pip, or things
119-
that can be installed via pip but break on android by default.
127+
**Recipe:** Install a script in custom p4a format. Can either install
128+
C/C++ or other software that cannot be pulled in via pip, or software
129+
that can be installed via pip but break on Android by default.
120130
These are maintained primarily inside the p4a source tree by p4a
121131
contributors and interested folks.
122132

@@ -131,11 +141,11 @@ Install process regarding packages
131141
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132142

133143
The install/build process of a p4a project, as triggered by the
134-
`p4a apk` command, roughly works as follows in regards to python
144+
`p4a apk` command, roughly works as follows in regards to Python
135145
packages:
136146

137147
1. The user has specified a project folder to install. This is either
138-
just a folder with python scripts and a `main.py`, or it may
148+
just a folder with Python scripts and a `main.py`, or it may
139149
also have a `pyproject.toml` for a more standardized install.
140150

141151
2. Dependencies are collected: they can be either specified via
@@ -179,16 +189,17 @@ Overall process / package relevant notes for p4a
179189
Here are some common things worth knowing about python-for-android's
180190
dealing with python packages:
181191

182-
- Packages will work fine without a recipe if they would also build
183-
on Linux ARM, don't use any API not available in the NDK if they
184-
use native code, and don't use any weird compiler flags the toolchain
185-
doesn't like if they use native code. The package also needs to
186-
work with cross compilation.
192+
- Packages will work fine without a recipe if:
193+
194+
* they would also build on Linux ARM,
195+
* don't use any API not available in the NDK if they use native code, and
196+
* don't use any weird compiler flags the toolchain doesn't like if they use native code.
197+
* works with cross compilation.
187198

188199
- There is currently no easy way for a package to know it is being
189200
cross-compiled (at least that we know of) other than examining the
190201
`CC` compiler that was set, or that it is being cross-compiled for
191-
Android specifically. If that breaks a package it currently needs
202+
Android specifically. If that breaks a package, it currently needs
192203
to be worked around with a recipe.
193204

194205
- If a package does **not** work, p4a developers will often create a
@@ -210,16 +221,16 @@ Ideas for the future regarding packaging
210221
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211222

212223
- We in overall prefer to use the recipe mechanism less if we can.
213-
In overall the recipes are just a collection of workarounds.
224+
Overall, the recipes are just a collection of workarounds.
214225
It may look quite hacky from the outside, since p4a
215226
version pins recipe-wrapped packages usually to make the patches reliably
216227
apply. This creates work for the recipes to be kept up-to-date, and
217228
obviously this approach doesn't scale too well. However, it has ended
218-
up as a quite practical interims solution until better ways are found.
229+
up as a quite practical interim solution until better ways are found.
219230

220231
- Obviously, it would be nice if packages could know they are being
221232
cross-compiled, and for Android specifically. We aren't currently aware
222-
of a good mechanism for that.
233+
of any good mechanism for that.
223234

224235
- If pip could actually run the recipes (instead of p4a wrapping pip and
225236
doing so) then this might even allow build isolation to work - but

0 commit comments

Comments
 (0)