-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Release 2020.06.02 #2225
Merged
Merged
Release 2020.06.02 #2225
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running the freshly compiled python binary from another Python process (e.g. sh module or os.system()) may get wrongly detected as if it was ran directly from the venv. This happens when `pyvenv.cfg` is present (e.g. venv/pyvenv.cfg). It makes `sysconfig.is_python_build()` returns `False` instead of `True` since it's using the compiled interpreter (e.g. ./build-dir/python). https://docs.python.org/3/library/sysconfig.html#sysconfig.is_python_build https://github.com/python/cpython/blob/v3.8.2/Lib/sysconfig.py#L127 This is because the `sys._home` attribute is used during the detection. The issue was first seen in macOS venv which generates the `pyvenv.cfg`. To compare both behaviours, try the following within and without a venv: ```python import os os.system("./build-dir/python -E -c 'import sysconfig; print(sysconfig._sys_home)'") ``` One would return `/usr/local/bin` and the other `None` Refs: - kivy/kivy-ios#401 - #2063
Fixes hostpython build with macOS venv
* Switch to using Gradle srcDir props for extra source dirs. * Add warning about only supporting source dir includes with gradle. * Fixed typos in gradle source directory warning Co-authored-by: Alexander Taylor <[email protected]>
* command line option to add to the assets/ directory * allow custom destination paths * code review suggestions * fix bugs sleepliy introduced in commit "code review suggestions" * flake8 compliance
As discussed on the Discord, this is a recipe to build apps based on SDL2-based pygame. It currently references a RC until we have an official stable release of pygame based on SDL2 with android support. Simple examples have been tested by other pygame users (it doesn't just build on my own machine) but some pygame functionality is still untested, and some dependencies like freetype, postmidi and libjpeg are currently not part of the build. It's usable, but not complete.
Also removes deprecated error troubleshooting targeting Python 2.
Adds macOS install instructions
Adds pygame recipe
…s fixed (#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 <[email protected]> * Made bootstrap tests clear the Recipe cache in setup * Made test_should_build not check non-existing storage_dir Authored-by: Jonas Thiem <[email protected]>
Updates version number to 2020.04.29
Tries to keep the `current_directory` context manager as scoped as possible. Also use the `contextlib.suppress` context manager when appropriated as it's more concise.
Actually simply reverted few files: ```sh git checkout master -- \ pythonforandroid/recipes/sdl2/__init__.py \ pythonforandroid/bootstraps/sdl2/build/src/patches/SDLActivity.java.patch \ pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java ``` - fixes #2167 - fixes #2169
Downgrades to SDL2 2.0.9
Narrows some context manager scopes
- Updates the PyPI release process (handled by the CI) - Links both Travis and GitHub CI build systems - Reformats the release checklist to blockcode for markdown
See adb logcat trace after the fix: ``` Android kivy bootstrap done. __name__ is __main__ AND: Ran string Run user program, change dir and execute entrypoint Imported unittest App requirements are: {'sqlite3', 'python3', 'openssl', 'requests', 'pyjnius', 'libffi'} Defined test case Adding Testcase: tests.test_requirements.Sqlite3TestCase Adding Testcase: tests.test_requirements.OpensslTestCase Adding Testcase: tests.test_requirements.RequestsTestCase Adding Testcase: tests.test_requirements.PyjniusTestCase Adding Testcase: tests.test_requirements.LibffiTestCase Tests to perform are: {'sqlite3': 'tests.test_requirements.Sqlite3TestCase', 'openssl': 'tests.test_requirements.OpensslTestCase', 'requests': 'tests.test_requirements.RequestsTestCase', 'pyjnius': 'tests.test_requirements.PyjniusTestCase', 'libffi': 'tests.test_requirements.LibffiTestCase'} .......... ---------------------------------------------------------------------- Ran 10 tests in 4.130s OK Python for android ended. ```
Also removes unused `mActivity` member. Note we changed the constructor input parameter to accept a `Context` object which is a parent class of the previous `Activity` one. Changes were tested on both kivy and service_only bootstraps. Also removes the `get_common_dir()` as it's no longer used since #2092
…t_loading Fixes service only unittest loading
…n_update Updates release documentation
All 3 `Hardware.java` seemed to be the same (minus some formatting).
Deletes duplicates ones.
None of the class seems to be used.
Moves kamranzafar/ java directory to common/
Use common Hardware.java
Reuse common AssetExtract.java
…oncurrency Removes java concurrency/ folder
Got the deprecation warning message since april 2016. #728
- Avoid duplicate imports - Avoid importing anything from the package java.lang - Avoid unused imports - Avoid unused local variables - Avoid unused private fields - No need to import a type that lives in the same package - Unnecessary use of fully qualified name due to existing import In the future we may want to add a dedicated Java linting job in the CI.
🐛 Fixes flake8 errors post update
This helper class shares code to be reused between the `PythonActivity` classes of the different bootstraps. Also adds few minor adjustments to existing classes.
…va_code PythonActivityUtil helper for unpacking data
This covers an 84% of the python recipe. Most of the uncovered code is related with `set_lib_flags` (marked with a `todo` inline comment)
Because, I forgot to implement it when I first wrote the test at 535b39d **Note:** I replaced `os.path.isfile` by `pathlib.Path(<any-path>).is_file()` because: - It seems that when trying to mock `isfile` function, doesn't work as expected (is completely ignored, unless we import the whole `os.path` module) - Given the above situation, we must modify the import, so better use the `pathlib` implementation, wich it has several advantages (it handles any kind of path automatically, no matter the platform)
Co-authored-by: fred-simard <[email protected]>
This will cover **100%** of the code for the hostpython3 recipe. Also we migrate `os.path.exists` and `os.path.isfile` to `pathlib.Path`'s implementation because when we mock these functions, it seems that property `return_value` is being ignored.
Remove superfluous recipes fixes #1387
Documents how to fix the following error: ``` SSLError("Can't connect to HTTPS URL because the SSL module is not available.") ```
…error 📚 Troubleshoot SSL error
If we want to **keep** debug symbols from `.so` files we will use: `--with-debug-symbols` Also: - enable debug builds for all bootstraps (AndroidManifest.tmpl.xml) - add log message to make it clear what kind of build we will get
📝 Attempt to improve the issue template
Using the latest released LTS.
⬆️ Bumps to Ubuntu 20.04
Followed the docs as I was building a project from a fresh macOS install.
📝 Updates install and troubleshooting docs
⬆️ Bumps to Cython==0.29.19
Gradle 6 supports OpenJDK up to version 13. Also refs: kivy/buildozer#1135
⬆️ Bumps to Gradle 6.4.1
The `requests` module has `urllib3`, `chardet` and `idna` as dependencies. This used to be handled dynamically thanks to the `requests` recipe. This is a drawback and side effect of #2202. The on device error was: ``` Imported unittest loading tests... running unittest... unittest result is: ....EE........ ====================================================================== ERROR: test_import_module (tests.test_requirements.RequestsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/app/testapps/on_device_unit_tests/build/bdist.android-armeabi-v7a/test_app/tests/mixin.py", line 17, in test_import_module File "/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/importlib/__init__.py", line 127, in import_module File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/user/.local/share/python-for-android/build/python-installs/bdist_unit_tests_app/requests/__init__.py", line 43, in <module> ModuleNotFoundError: No module named 'urllib3' ====================================================================== ERROR: test_run_module (tests.test_requirements.RequestsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/app/testapps/on_device_unit_tests/build/bdist.android-armeabi-v7a/test_app/tests/test_requirements.py", line 74, in test_run_module File "/home/user/.local/share/python-for-android/build/python-installs/bdist_unit_tests_app/requests/__init__.py", line 43, in <module> ModuleNotFoundError: No module named 'urllib3' ---------------------------------------------------------------------- Ran 14 tests in 0.591s FAILED (errors=2) Ran tests ``` Also sneaked a minor documentation regression fix (bug introduced in #2219).
🐛 Adds missing requests sub dependencies
inclement
approved these changes
Jun 2, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tox
: tox.log this performs some long-running tests that are skipped on Travis.armeabi-v7a
andarm64-v8a
:armeabi-v7a
(cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=armeabi-v7a --debug
)arm64-v8a
(cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=arm64-v8a --debug
)