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

New feature: allow to use a p4a fork #940

Merged
merged 4 commits into from
Jul 26, 2019

Conversation

opacam
Copy link
Member

@opacam opacam commented Jul 24, 2019

This PR adds the ability to use any p4a fork. So combined with buildozer.spec file key p4a.branch it will allows us to test any pull requests of kivy/python-for-android using buildozer. Also, an user could use his own fork/branch of p4a editing two keys from his buildozer.spec file: p4a.fork and p4a.branch to make use of his own fork/branch of p4a.

So...in this PR we do:

  • add a new key to buildozer.spec file: p4a.fork
  • check on each build that fork/branch has not been changed, and if so, remove the old p4a installation (which will trigger a new p4a's installation)
  • move key p4a.branch to proper section (python-for-android)...of course this is not mandatory, it's only to be neatest and to make easier to find the key
  • fix a pep8 error (two blank lines before class)

Note: The p4a fork it's supposed to have the same name than the the repository from kivy's organization (python-for-android), if that is not the case, don't expect this to work!!!

To be neatest and to be easier to find the key
and if so, remove the old p4a installation so the new one can be installed
@@ -208,6 +205,12 @@ android.arch = armeabi-v7a
# Python for android (p4a) specific
#

# (str) python-for-android fork to use, defaults to upstream (kivy)
#p4a.fork = kivy
Copy link
Member

Choose a reason for hiding this comment

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

Minor remark: so for now, we're assuming the fork is on github only right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, and also we assume that the name of the fork has not changed 😉

Copy link
Member

Choose a reason for hiding this comment

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

That's more than enough for a first iteration and that probably covers more than 80% of the cases

@AndreMiras
Copy link
Member

Awesome thanks! I'll give this a try later this week hopefully

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.

This is working pretty good!
I tried it with pip3 install --user --upgrade https://github.com/opacam/buildozer/archive/feature-allow-p4a-forks.zip then playing with an existing project buildozer.spec file.
I could verify that it didn't break the default behavior, while I could also clone from a fork. cd .buildozer/android/platform/python-for-android/ and running git remote -v && git branch to verify things were behaving as expected.
Thanks!

@opacam opacam merged commit 7a0ef4f into kivy:master Jul 26, 2019
@AndreMiras
Copy link
Member

Oh man, I'm just using it now for testing kivy/python-for-android#1883
This is such an improvement to me. It will also really ease people hooking to their forks until PRs get merged upstream.
Well done 👏

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.

2 participants