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

Delete the pygame bootstrap #1670

Merged
merged 1 commit into from
May 26, 2019
Merged

Conversation

inclement
Copy link
Member

The time has come to get rid of the pygame bootstrap. We sometimes find weird things in the code aimed at working with it, but I'm not sure if it even works any more and we definitely don't support it.

I'll leave this issue here for a little while in case anyone wants to raise anything, but in the absence of any complaints about it we'll merge this quite soon.

WIP because I didn't yet check throroughly if I caught everything.

@opacam
Copy link
Member

opacam commented Feb 3, 2019

¡¡¡Good work @inclement!!! 😄 so far looks good to me, still there will be some pygame entries, as you suspect, in the following recipes:

  • android
  • generickndkbuild
  • sdl (can we remove this recipe? I think that we only use that for pygame...)
  • sdl2

Also we have a pygame's testapp that we should remove

And we have pygame entries in:

  • testapps/testlauncher_setup/pygame.py
  • tests/test_graph.py
  • ci/constants.py

That is what I found...hope that this helps you with this pr ;)

Update: if we remove sdl...we also should take care to remove sdl references in recipes:

  • audiostream
  • pyjnius

@inclement inclement force-pushed the delete_pygame_bootstrap branch from 0648d5d to 2304f20 Compare February 3, 2019 17:35
@inclement
Copy link
Member Author

Thanks @opacam, I hadn't seen all of those references yet.

This seems fairly complete now, but let me know if there's anything else to do.

@@ -8,7 +8,7 @@ class GenericNDKBuildRecipe(BootstrapNDKRecipe):
url = None

depends = [('python2', 'python3', 'python3crystax')]
conflicts = ['sdl2', 'pygame', 'sdl']
conflicts = ['sdl2', 'sdl']
Copy link
Member

Choose a reason for hiding this comment

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

I think that we can remove sdl of here because you removed sdl recipe 😉

@@ -88,8 +82,5 @@ def prebuild_arch(self, arch):
fh.write(
'#define SDL_ANDROID_GetJNIEnv SDL_AndroidGetJNIEnv\n'
)
elif is_pygame:
fh.write('JNIEnv *SDL_ANDROID_GetJNIEnv(void);\n')

Copy link
Member

Choose a reason for hiding this comment

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

😬

@ghost
Copy link

ghost commented Feb 9, 2019

@inclement I introduced some conflicts with this with my graph stuff, sorry 😬 I propose we get this in before we bother with #1625 because I don't mind rebasing, and we should really get the pygame bootstrap ripped out before we get more and more conflicts, and everyone continues to carry along old & new special case code to deal with it...

@AndreMiras
Copy link
Member

No worries @Jonast this is a WIP/reminder PR anyway 👍

@ghost
Copy link

ghost commented Feb 9, 2019

@AndreMiras let's make it not-so-WIP/reminder then!

@AndreMiras
Copy link
Member

Should we continue with this @inclement ? I can take over if you don't have time but give me write access to your branch, I like deleting code 😈

@ghost
Copy link

ghost commented Apr 1, 2019

I was told here to write that I want this and I really do

@AndreMiras
Copy link
Member

I would definitely go for the delete. I'm not entirely sure, but I think I recall during the FOSDEM @tito had some objection here. Or did you @tito ? I think you were saying some recent upstream changes in pygame made it interesting again.
Few of my arguments for killing it are:

  • it's legacy
  • sdl2 is awesome
  • nobody in p4a team is currently {using, test, maintaining} it
  • it slows us up when bug fixing and feature pushing
  • less is more

If we're worrying about breaking things for the people who are using it still, we could tag a p4a 0.8.0 release before deleting it. And people who can't move forward with sdl2 can stay on 0.8.0.

@ghost
Copy link

ghost commented Apr 1, 2019

I agree with every single one of @AndreMiras ' points

@inclement inclement force-pushed the delete_pygame_bootstrap branch 2 times, most recently from 4f3fcb8 to 8540afb Compare May 26, 2019 13:40
@inclement
Copy link
Member Author

Rebased and squashed.

@AndreMiras @Jonast Please go ahead and merge if the tests pass and the changes look good to you.

@inclement inclement force-pushed the delete_pygame_bootstrap branch 3 times, most recently from 47a9159 to 0691176 Compare May 26, 2019 14:28
@inclement
Copy link
Member Author

Looks like tests are failing only because the recipe update test is confused.

@opacam
Copy link
Member

opacam commented May 26, 2019

¡¡¡Great job!!!

Can you remove pygame entry from this line?

https://github.com/kivy/python-for-android/blob/master/tests/test_graph.py#L107

I think that without that entry we will have all the code free of pygame 😄

Removed pygame references from doc

Removed some more pygame references

Removed some more pygame references

Removed more references to pygame

Fixed unicode strings in android module recipe, broken in rebase

Deleted pygame recipe

Removed references to sdl from audiostream and genericndkbuild

Deleted argparse file in pygame bootstrap

Removed sdl reference from pyjnius recipe

Added blank line to make pep8 happy

I think this is an irrelevant aspect of style

Removed pygame mention from test
@inclement inclement force-pushed the delete_pygame_bootstrap branch from 0691176 to 79b2be1 Compare May 26, 2019 18:04
@inclement
Copy link
Member Author

Nice catch @opacam, done.

Copy link
Member

@opacam opacam left a comment

Choose a reason for hiding this comment

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

👍

Looks good to me, and I'm guessing that @AndreMiras and @Jonast has no problem to merge this soon, so I aproved the changes, but I cannot merge it with the master branch so you must do that job yourself...but before do that, consider the point mentioned by @AndreMiras:

If we're worrying about breaking things for the people who are using it still, we could tag a p4a 0.8.0 release before deleting it. And people who can't move forward with sdl2 can stay on 0.8.0.

@inclement
Copy link
Member Author

I'm going to go ahead and merge because it'll only break again, and because we're currently directing all buildozer users at p4a master so making a new release is less important now. I'm not clear if the pygame bootstrap was working properly any more anyway.

@inclement inclement merged commit 00bd9d5 into kivy:master May 26, 2019
@ghost
Copy link

ghost commented May 26, 2019

🎉 nice! code cleanup, yaas ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants