Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop CrystaX support and code base #1913

Merged
merged 8 commits into from
Jul 14, 2019

Conversation

opacam
Copy link
Member

@opacam opacam commented Jul 10, 2019

There is an open issue, a proposal to drop CrystaX support (#1905), so this PR takes care of this...in case that the team wants to take this road, we will see in here I guess..:wink:

Note: labeled WIP because the tests must be updated

.. note:: Since we don't support `python3crystax` anymore, the old instructions
has been removed from here. If you, still have the need to make use
of this old recipe, you should do it with an old `python-for-android`
release. Probably, a got starting point would be `version 0.7.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you meen "a good starting point? `s/a got/a good/

Within the custom diff made by building the distribution there is another
big chunk of space eaten. The very basic stuff such as a distribution with:
CPython 3, setuptools, Python for Android ``android`` module, SDL2 (+ deps),
PyJNIus and Kivy takes almost 13 GB. Check your free space first!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since CrystaX is gone from the Dockerfile I think the image size is way less.
DockerHub shows 2 GB.
https://cloud.docker.com/u/kivy/repository/docker/kivy/python-for-android/tags

@AndreMiras
Copy link
Member

Awesome start 👏 can't wait to see it goes 😄

Because we already build them whenever we build our python recipes, so this way we will avoid to make it fail the `CI` test `rebuild_updated_recipes` in the case that we have to touch both hostpython recipes at the same time
Since now we have an smartest way to determine the right bootstrap based on recipes, it's time to rely on it for our `rebuild_updated_recipes`

Closes: kivy#1594
@opacam opacam changed the title [WIP] Drop CrystaX support and code base Drop CrystaX support and code base Jul 11, 2019

depends = [('python2', 'python3')]
'''
.. note:: it's important to keep this depends as a class attribute, outside
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note is helpful, but it seems a bit overly long. I am not trying to be nitpicky, but it is actually a problem that when all explanatory comments get too long one tends to not read them. So I recommend shortening it down to:

    .. note:: it's important to keep this depends as a class attribute outside
              `__init__` because sometimes we only initialize the class, so
              the `__init__` call won't be called and the deps would be missing
              (which breaks the dependency graph computation)

build order for dependencies will not be computed as expected (if
computed...). So be very careful with this line!!

.. warning:: this `depends` may be overwrote in inherited classes of
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would shorten this to:

 .. warning:: don't forget to call `super().__init__()` in any recipe's `__init__`, or
              otherwise it may not be ensured that it depends on python2 or python3
              which can break the dependency graph

if d in self.depends
]
):
# we overwrote `depends` in inherited recipe, so we must add it
Copy link

@ghost ghost Jul 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rephrase this comment to:

# We ensure here that the recipe depends on python even it overrode `depends`.
# We only do this if it doesn't already depend on any python,
# since some recipes intentionally don't depend on/work with all python variants

@ghost
Copy link

ghost commented Jul 13, 2019

Looks good to me in overall, I suggested a few minor things but don't consider them blocking on the merge.

I suggest we should merge this soon, because it looks like this may conflict with things and crystax really is annoying to keep around

inclement
inclement previously approved these changes Jul 14, 2019
Copy link
Member

@inclement inclement left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks!

~~~~~~~~~~~~~~~

python-for-android originally supported Python 3 using the CrystaX NDK. Since
we have a working python3 recipe, we don't support CrystaX NDK anymore. If you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be more direct with this kind of doc, you can just write

python-for-android no longer supports building for Python 3 using the CrystaX NDK. Instead, use the python3 recipe, which can be built using the normal Google NDK.

The last python-for-android version supporting CrystaX was 0.7.0.

No need for this to hold up merging the PR, we can improve the doc later (there are plenty of parts that I wrote that also need improvement), just noting as something I've been thinking about.

@inclement
Copy link
Member

Not merging because I didn't check the status of the other comments, but it's fine to merge for me.

AndreMiras
AndreMiras previously approved these changes Jul 14, 2019
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also looks good to me @opacam 👍
Let's address @Jonast comments and merge it

By shortening a little some long texts, thanks @Jonast and @inclement!!
@opacam opacam dismissed stale reviews from AndreMiras and inclement via 5ad8ad7 July 14, 2019 19:35
@opacam
Copy link
Member Author

opacam commented Jul 14, 2019

Thanks @Jonast, @inclement and @AndreMiras,

for your reviews and text corrections 👍

All your suggestions as been applied as you wanted, so I think that we have this 😄

@inclement inclement merged commit fba37de into kivy:develop Jul 14, 2019
@inclement
Copy link
Member

Thanks @opacam!

@opacam opacam deleted the feature-remove-crystax branch July 15, 2019 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants