Skip to content

Commit 00bd9d5

Browse files
authored
Merge pull request #1670 from inclement/delete_pygame_bootstrap
Delete the pygame bootstrap
2 parents 49e616c + 79b2be1 commit 00bd9d5

File tree

134 files changed

+49
-22613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+49
-22613
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ recursive-include pythonforandroid/recipes *.py *.patch *.c *.pyx Setup *.h
1010
recursive-include pythonforandroid/bootstraps *.properties *.xml *.java *.tmpl *.txt *.png *.aidl *.py *.sh *.c *.h *.html *.patch
1111

1212
prune .git
13-
prune pythonforandroid/bootstraps/pygame/build/libs

README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,23 @@ Please refer to the LICENSE file.
8888
## History
8989

9090
In 2015 these tools were rewritten to provide a new, easier to use and
91-
extend interface. If you are looking for the old toolchain with
92-
distribute.sh and build.py, it is still available at
93-
https://github.com/kivy/python-for-android/tree/old_toolchain, and
94-
issues and PRs relating to this branch are still accepted. However, the
95-
new toolchain contains all the same functionality via the built in
96-
pygame bootstrap.
97-
98-
In the last quarter of 2018 the python recipes has been changed, the new recipe
99-
for python3 (3.7.1) has a new build system which has been applied to the ancient
100-
python recipe, allowing us to bump the python2 version number to 2.7.15. This
101-
change, unifies the build process for both python recipes, and probably solve
102-
some issues detected over the years, but unfortunately, this change breaks the
103-
pygame bootstrap (in a near future we will fix it or remove it). Also should be
104-
mentioned that the old python recipe is still usable, and has been renamed to
105-
`python2legacy`. This `python2legacy` recipe allow us to build with a minimum
106-
api lower than 21, which is not the case for the new python recipes which are
107-
limited to a minimum api of 21. All this work has been done using android ndk
108-
version r17c, and your build should success with that version...but be aware
109-
that the project is in constant development so...the ndk version will change
110-
at some time.
91+
extend interface. If you'd like to browse the old toolchain, its
92+
status is recorded for posterity at at
93+
https://github.com/kivy/python-for-android/tree/old_toolchain.
94+
95+
In the last quarter of 2018 the python recipes has been changed, the
96+
new recipe for python3 (3.7.1) has a new build system which has been
97+
applied to the ancient python recipe, allowing us to bump the python2
98+
version number to 2.7.15. This change, unifies the build process for
99+
both python recipes, and probably solve some issues detected over the
100+
years. Also should be mentioned that the old python recipe is still
101+
usable, and has been renamed to `python2legacy`. This `python2legacy`
102+
recipe allow us to build with a minimum api lower than 21, which is
103+
not the case for the new python recipes which are limited to a minimum
104+
api of 21. All this work has been done using android ndk version r17c,
105+
and your build should success with that version...but be aware that
106+
the project is in constant development so...the ndk version will
107+
change at some time.
111108

112109
Those mentioned changes has been done this way to make easier the transition
113110
between python3 and python2. We will slowly phase out python2 support

ci/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class TargetPython(Enum):
4242
'omemo',
4343
# requires `libpq-dev` system dependency e.g. for `pg_config` binary
4444
'psycopg2',
45-
'pygame',
4645
# most likely some setup in the Docker container, because it works in host
4746
'pyjnius', 'pyopenal',
4847
'pyproj',

doc/source/apis.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Advanced Android API use
9898
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9999

100100
As mentioned above, the ``android`` Python module provides a simple
101-
wrapper around many native Android APIS, and it is *included per default*
101+
wrapper around many native Android APIS, and it is *included by default*
102102
unless you blacklist it.
103103

104104
The available functionality of this module is not separately documented.
@@ -159,9 +159,6 @@ a Java class. For instance, here is the code to vibrate your device::
159159
# application, this reference is stored automatically by
160160
# Kivy's PythonActivity bootstrap
161161

162-
# This one works with Pygame
163-
# PythonActivity = autoclass('org.renpy.android.PythonActivity')
164-
165162
# This one works with SDL2
166163
PythonActivity = autoclass('org.kivy.android.PythonActivity')
167164

@@ -176,9 +173,9 @@ Things to note here are:
176173

177174
- The class that must be wrapped depends on the bootstrap. This is
178175
because Pyjnius is using the bootstrap's java source code to get a
179-
reference to the current activity, which both the Pygame and SDL2
180-
bootstraps store in the ``mActivity`` static variable. This
181-
difference isn't always important, but it's important to know about.
176+
reference to the current activity, which the bootstraps store in the
177+
``mActivity`` static variable. This difference isn't always
178+
important, but it's important to know about.
182179
- The code closely follows the Java API - this is exactly the same set
183180
of function calls that you'd use to achieve the same thing from Java
184181
code.

doc/source/bootstraps.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bootstraps
33
==========
44

55
This page is about creating new bootstrap backends. For build options
6-
of existing bootstraps (i.e. with SDL2, Pygame, Webview etc.), see
6+
of existing bootstraps (i.e. with SDL2, Webview, etc.), see
77
:ref:`build options <bootstrap_build_options>`.
88

99
python-for-android (p4a) supports multiple *bootstraps*. These fulfill a

doc/source/buildoptions.rst

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,24 +188,10 @@ ready.
188188
access. Defaults to 5000.
189189

190190

191-
pygame
192-
~~~~~~
193-
194-
You can use this with ``--bootstrap=pygame``, or simply include the
195-
``pygame`` recipe in your ``--requirements``.
196-
197-
The pygame bootstrap is the original backend used by Kivy, and still
198-
works fine for use with Kivy apps. It may also work for pure pygame
199-
apps, but hasn't been developed with this in mind.
200-
201-
This bootstrap will eventually be deprecated in favour of sdl2, but
202-
not before the sdl2 bootstrap includes all the features that would be
203-
lost.
204-
205191
Build options
206192
%%%%%%%%%%%%%
207193

208-
The pygame bootstrap supports the following additional command line
194+
The sdl2 bootstrap supports the following additional command line
209195
options (this list may not be exhaustive):
210196

211197
- ``--private``: The directory containing your project files.

doc/source/commands.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ supply those that you need.
7878
The Java bootstrap to use for your application. You mostly don't
7979
need to worry about this or set it manually, as an appropriate
8080
bootstrap will be chosen from your ``--requirements``. Current
81-
choices are ``sdl2`` or ``pygame``; ``sdl2`` is experimental but
82-
preferable where possible.
81+
choices are ``sdl2`` (used with Kivy and most other apps) or ``webview``.
8382

8483

8584
.. note:: These options are preliminary. Others will include toggles

doc/source/launcher.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ grab an old (cached) package instead of a fresh one.
3636
--name="App name" \
3737
--version=x.y.z \
3838
--android_api XY \
39-
--bootstrap=pygame or sdl2 \
39+
--bootstrap=sdl2 \
4040
--launcher \
4141
--minsdk 13
4242

@@ -91,12 +91,8 @@ it changes quickly and needs testing.
9191
Source code
9292
-----------
9393

94-
.. |renpy| replace:: pygame org.renpy.android
9594
.. |kivy| replace:: sdl2 org.kivy.android
9695

97-
.. _renpy:
98-
https://github.com/kivy/python-for-android/tree/master/\
99-
pythonforandroid/bootstraps/pygame/build/src/org/renpy/android
10096
.. _sdl2:
10197
https://github.com/kivy/python-for-android/tree/master/\
10298
pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android

doc/source/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Concepts
2727
different sets of requirements.
2828

2929
- bootstrap: A bootstrap is the app backend that will start your
30-
application. Your application could use SDL2 as a base, or Pygame,
30+
application. Your application could use SDL2 as a base,
3131
or a web backend like Flask with a WebView bootstrap. Different
3232
bootstraps can have different build options.
3333

doc/source/recipes.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The basic declaration of a recipe is as follows::
4141
patches = ['some_fix.patch'] # Paths relative to the recipe dir
4242

4343
depends = ['kivy', 'sdl2'] # These are just examples
44-
conflicts = ['pygame']
44+
conflicts = ['python2']
4545
4646
recipe = YourRecipe()
4747

@@ -306,14 +306,14 @@ the cython components and to install the Python module just like a
306306
normal PythonRecipe.
307307

308308
For instance, the following is all that's necessary to make a recipe
309-
for Kivy (in this case, depending on Pygame rather than SDL2)::
309+
for Kivy::
310310

311311
class KivyRecipe(CythonRecipe):
312-
version = 'stable'
313-
url = 'https://github.com/kivy/kivy/archive/{version}.zip'
314-
name = 'kivy'
312+
version = 'stable'
313+
url = 'https://github.com/kivy/kivy/archive/{version}.zip'
314+
name = 'kivy'
315315

316-
depends = ['pygame', 'pyjnius', 'android']
316+
depends = ['sdl2', 'pyjnius']
317317

318318
recipe = KivyRecipe()
319319

0 commit comments

Comments
 (0)