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

Bump to SDL2 2.0.10 & extract .java from SDL2 tarball: merge conflicts fixed #2113

Merged
merged 5 commits into from
May 1, 2020

Conversation

inclement
Copy link
Member

This is the code from #1779 with (minor) merge conflicts fixed.

@inclement
Copy link
Member Author

If the tests pass, I intend to merge this right away.

@opacam
Copy link
Member

opacam commented Mar 31, 2020

The flake 8 errors now are fixed by #2114, a new merge/rebase of develop branch should fix that

AndreMiras
AndreMiras previously approved these changes Mar 31, 2020
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.

Yes 5K lines of code less 👏
Can we rebase it to see if tests are passing?
Can't wait to have it merged!

Comment on lines +153 to +169
if not os.path.exists(target_dir):
os.makedirs(target_dir)
Copy link
Member

Choose a reason for hiding this comment

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

We could save one line by simulating the --parents flag:

Suggested change
if not os.path.exists(target_dir):
os.makedirs(target_dir)
os.makedirs(target_dir, exist_ok=True)

Copy link

Choose a reason for hiding this comment

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

I think I wrote it like this to maintain Python 2 compatibility. So yes, for 3.x-only shortening it like this makes sense 👍

@inclement
Copy link
Member Author

Unsurprisingly there are some minor test failures, but the app builds seem to work fine. I'll see if I can fix it quickly.

I'm finding that test_pythonpackage.py runs out my ram within a few seconds, which didn't happen in the past. Not sure what's up there.

@AndreMiras
Copy link
Member

I actually often skip the test_pythonpackage.py in local because for me it always ran for ages

@opacam
Copy link
Member

opacam commented Apr 1, 2020

If I remember well...the problem of these tests are that we don't mock at all the file/dir reading/creation and this has a serious impact to the tests performance. So, as @AndreMiras, I almost always skip these tests as well.

Anyway, I also tested one of the generated apks for on_device_unit_test_app, the one for arm64-v8a, and it works ok, actually I think that it works better, since the kivy's keyboard features now I think that are working as expected.

@ghost
Copy link

ghost commented Apr 1, 2020

For what it's worth, test_pythonpackage.py tests with pip because pip has no stable interface and likes to break things, and there is no libpip or other library-level alternative. So this is kind of an external problem that cannot be easily solved unless pip decides to do so.

Edit: the out of memory thing sounds strange though. How much did it have available to run?

@inclement inclement force-pushed the etc0de-sdl-bump_conflicts_fixed branch from adf71a4 to 4e733a6 Compare April 29, 2020 22:00
@inclement
Copy link
Member Author

Got sidetracked on this but still trying to prioritise it over anything else.

I fixed a bug with the sdl2 patching, on runs after the first one it was partially-applying the patch before deciding the patch wasn't needed, breaking the java code. I've made it do a dry run instead, which seems to resolve that issue.

I want to do a bit more testing, but as far as I know it's working fine now.

@inclement
Copy link
Member Author

Fixed tox, I think, by fixing recipe cache clearing.

@inclement
Copy link
Member Author

Fixed another bug, in test_recipe.py. This one only occurs if you run the tests from an unexpected directory, as the test tries to listdir a directory that doesn't exist because the exists call has been overridden. To keep things simple, I changed the test state so that this directory is not in the search path, but I might revisit this in another PR.

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.

💯

Awesome, ¡¡so many thanks!!

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.

Looking good! Thanks for spending time on resuming this work. Awesome to see 5K lines ditched 👏
Thank you @etc0de for the initial initiative ❤️

@inclement inclement merged commit 1b887be into kivy:develop May 1, 2020
@inclement inclement deleted the etc0de-sdl-bump_conflicts_fixed branch May 1, 2020 17:43
brvier added a commit to brvier/python-for-android that referenced this pull request May 6, 2020
brvier pushed a commit to brvier/python-for-android that referenced this pull request May 6, 2020
…s fixed (kivy#2113)

* Bump to SDL2 2.0.10 & make sure to extract .java from SDL2 tarball

* Made SDL2 patching do a dry run to check it will work

* Update pythonforandroid/bootstraps/common/build/build.py

Co-authored-by: Pol Canelles <canellestudi@gmail.com>

* Made bootstrap tests clear the Recipe cache in setup

* Made test_should_build not check non-existing storage_dir

Authored-by: Jonas Thiem <jonas@thiem.email>
brvier added a commit to brvier/python-for-android that referenced this pull request May 6, 2020
lerela added a commit to chronolife-rd/python-for-android that referenced this pull request Jun 23, 2020
🔖 v2020.06.02

* Adds missing requests sub dependencies (kivy#2221)
* Bumps to Gradle 6.4.1 (kivy#2222)
* Bumps to Cython==0.29.19 (kivy#2220)
* Updates install and troubleshooting docs (kivy#2219)
* Bumps to Ubuntu 20.04 (kivy#2218)
* Attempt to improve the issue template (kivy#2217)
* Add `opencv_extras` recipe (kivy#2209)
* Split logic for build modes & debug symbols (kivy#2213)
* Troubleshoot SSL error (kivy#2205)
* Remove superfluous recipes fixes (kivy#2202)
* Add tests for hostpython3 recipe (kivy#2196)
* Fix for 'cannot find setuptools module' (kivy#2195)
* Rename `Hostpython3Recipe` class to camel case (kivy#2194)
* Fix `test_should_build` (kivy#2193)
* Add initial tests for python3 recipe (kivy#2192)
* PythonActivityUtil helper for unpacking data (kivy#2189)
* Fixes flake8 errors post update (kivy#2191)
* Share PythonUtil.java between bootstraps (kivy#2188)
* Java code linting using PMD 6.23.0 (kivy#2187)
* Deletes deprecated renpy Python{Activity,Service}.java (kivy#2186)
* Removes java concurrency/ folder (kivy#2185)
* Reuse common AssetExtract.java (kivy#2182)
* Use common Hardware.java (kivy#2183)
* Moves kamranzafar/ java directory to common/ (kivy#2184)
* Updates release documentation (kivy#2177)
* Fixes service only unittest loading (kivy#2181)
* Narrows some context manager scopes (kivy#2179)
* Downgrades to SDL2 2.0.9 (kivy#2180)
* Bump to SDL2 2.0.10 & extract .java from SDL2 tarball (kivy#2113)
* Adds pygame recipe (kivy#2164)
* Adds macOS install instructions (2165)
* Removed python2 support mention from README (kivy#2162)
* Adding more assets (kivy#2132)
* Get --add-source working for dirs in Gradle builds (kivy#2156)
* Fixes python build with macOS venv (kivy#2159)
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