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

Release 2020.06.02 #2225

Merged
merged 62 commits into from
Jun 2, 2020
Merged

Release 2020.06.02 #2225

merged 62 commits into from
Jun 2, 2020

Commits on Apr 29, 2020

  1. Fixes python build with macOS venv

    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
    AndreMiras committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    38ba1ad View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2159 from AndreMiras/feature/fix_macos_venv_build

    Fixes hostpython build with macOS venv
    AndreMiras authored Apr 29, 2020
    Configuration menu
    Copy the full SHA
    83dc122 View commit details
    Browse the repository at this point in the history
  3. Get --add-source working for dirs in Gradle builds (#2156)

    * 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]>
    kollivier and inclement authored Apr 29, 2020
    Configuration menu
    Copy the full SHA
    36825d7 View commit details
    Browse the repository at this point in the history
  4. Adding more assets (#2132)

    * 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
    robertpfeiffer authored Apr 29, 2020
    Configuration menu
    Copy the full SHA
    4b6e095 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3bdeaca View commit details
    Browse the repository at this point in the history

Commits on May 1, 2020

  1. Adds pygame recipe

    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.
    Robert Pfeiffer authored and AndreMiras committed May 1, 2020
    Configuration menu
    Copy the full SHA
    9dded87 View commit details
    Browse the repository at this point in the history
  2. Adds macOS install instructions

    Also removes deprecated error troubleshooting targeting Python 2.
    AndreMiras committed May 1, 2020
    Configuration menu
    Copy the full SHA
    d5c672e View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2165 from AndreMiras/feature/documentation_update

    Adds macOS install instructions
    AndreMiras authored May 1, 2020
    Configuration menu
    Copy the full SHA
    36426f4 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2164 from AndreMiras/feature/pygame_recipe

    Adds pygame recipe
    AndreMiras authored May 1, 2020
    Configuration menu
    Copy the full SHA
    66f6a34 View commit details
    Browse the repository at this point in the history
  5. Bump to SDL2 2.0.10 & extract .java from SDL2 tarball: merge conflict…

    …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]>
    inclement authored May 1, 2020
    Configuration menu
    Copy the full SHA
    1b887be View commit details
    Browse the repository at this point in the history

Commits on May 7, 2020

  1. Merge pull request #2175 from kivy/release-2020.04.29

    Updates version number to 2020.04.29
    inclement authored May 7, 2020
    Configuration menu
    Copy the full SHA
    b6a35e9 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2020

  1. Narrows some context manager scopes

    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.
    AndreMiras committed May 8, 2020
    Configuration menu
    Copy the full SHA
    581c4b4 View commit details
    Browse the repository at this point in the history
  2. Downgrades to SDL2 2.0.9

    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
    AndreMiras committed May 8, 2020
    Configuration menu
    Copy the full SHA
    04b8f35 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2180 from AndreMiras/feature/downgrade_sdl2_2.0.9

    Downgrades to SDL2 2.0.9
    AndreMiras authored May 8, 2020
    Configuration menu
    Copy the full SHA
    2808130 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eaf4c2f View commit details
    Browse the repository at this point in the history

Commits on May 9, 2020

  1. Merge pull request #2179 from AndreMiras/feature/narrow_context_manager

    Narrows some context manager scopes
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    f96356b View commit details
    Browse the repository at this point in the history
  2. Updates release documentation

    - 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
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    afa99bb View commit details
    Browse the repository at this point in the history
  3. Fixes service only unittest loading

    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.
    ```
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    c0d3015 View commit details
    Browse the repository at this point in the history
  4. Reuse common AssetExtract.java

    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
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    4fbcefd View commit details
    Browse the repository at this point in the history
  5. Merge pull request #2181 from AndreMiras/feature/service_only_unittes…

    …t_loading
    
    Fixes service only unittest loading
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    f29262a View commit details
    Browse the repository at this point in the history
  6. Merge pull request #2177 from AndreMiras/feature/release_documentatio…

    …n_update
    
    Updates release documentation
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    f3e9222 View commit details
    Browse the repository at this point in the history
  7. Use common Hardware.java

    All 3 `Hardware.java` seemed to be the same (minus some formatting).
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    c03f0ff View commit details
    Browse the repository at this point in the history
  8. Moves kamranzafar/ java directory to common/

    Deletes duplicates ones.
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    a3b18f1 View commit details
    Browse the repository at this point in the history
  9. Removes java concurrency/ folder

    None of the class seems to be used.
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    a0b878d View commit details
    Browse the repository at this point in the history
  10. Merge pull request #2184 from AndreMiras/feature/common_kamranzafar_java

    Moves kamranzafar/ java directory to common/
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    f00d00b View commit details
    Browse the repository at this point in the history
  11. Merge pull request #2183 from AndreMiras/feature/common_hardware_java

    Use common Hardware.java
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    de7d06a View commit details
    Browse the repository at this point in the history
  12. Merge pull request #2182 from AndreMiras/feature/share_asset_extract

    Reuse common AssetExtract.java
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    9f9a42f View commit details
    Browse the repository at this point in the history
  13. Merge pull request #2185 from AndreMiras/feature/delete_unused_java_c…

    …oncurrency
    
    Removes java concurrency/ folder
    AndreMiras authored May 9, 2020
    Configuration menu
    Copy the full SHA
    2604406 View commit details
    Browse the repository at this point in the history
  14. Deletes deprecated renpy Python{Activity,Service}.java

    Got the deprecation warning message since april 2016.
    #728
    AndreMiras committed May 9, 2020
    Configuration menu
    Copy the full SHA
    54c9b62 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2020

  1. Java code linting using PMD 6.23.0

    - 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.
    AndreMiras committed May 10, 2020
    Configuration menu
    Copy the full SHA
    d0deae0 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2186 from AndreMiras/feature/removes_deprecated_r…

    …enpy_python_activity
    
    Deletes deprecated renpy Python{Activity,Service}.java
    AndreMiras authored May 10, 2020
    Configuration menu
    Copy the full SHA
    0730f6c View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2187 from AndreMiras/feature/java_code_cleaning

    Java code linting using PMD 6.23.0
    AndreMiras authored May 10, 2020
    Configuration menu
    Copy the full SHA
    7b27577 View commit details
    Browse the repository at this point in the history
  4. Share PythonUtil.java between bootstraps

    Note we're using `addLibraryIfExists()` for libraries that are needed
    by the `sdl2` bootstrap, but may not be compiled on other bootstraps.
    This way it should fail gracefully while letting us share 100% of the code.
    AndreMiras committed May 10, 2020
    Configuration menu
    Copy the full SHA
    53722ed View commit details
    Browse the repository at this point in the history
  5. Merge pull request #2188 from AndreMiras/feature/share_java_python_util

    Share PythonUtil.java between bootstraps
    AndreMiras authored May 10, 2020
    Configuration menu
    Copy the full SHA
    eeed13c View commit details
    Browse the repository at this point in the history

Commits on May 11, 2020

  1. 🐛 Fixes flake8 errors post update

    The recent `flake8==3.8.0` update reported new errors:
    ```
    pythonforandroid/graph.py:133:27: E741 ambiguous variable name 'l'
    pythonforandroid/toolchain.py:219:25: E741 ambiguous variable name 'l'
    pythonforandroid/toolchain.py:1146:19: F522 '...'.format(...) has unused named argument(s): Fore
    pythonforandroid/pythonpackage.py:690:23: F523 '...'.format(...) has unused arguments at position(s): 0
    pythonforandroid/logger.py:202:36: E741 ambiguous variable name 'l'
    pythonforandroid/logger.py:204:36: E741 ambiguous variable name 'l'
    pythonforandroid/archs.py:150:25: E741 ambiguous variable name 'l'
    pythonforandroid/recipes/android/src/android/_ctypes_library_finder.py:56:27: E741 ambiguous variable name 'l'
    pythonforandroid/recipes/reportlab/__init__.py:25:21: E741 ambiguous variable name 'l'
    ```
    AndreMiras committed May 11, 2020
    Configuration menu
    Copy the full SHA
    2eb0ddf View commit details
    Browse the repository at this point in the history

Commits on May 12, 2020

  1. Merge pull request #2191 from AndreMiras/feature/linter

    🐛 Fixes flake8 errors post update
    AndreMiras authored May 12, 2020
    Configuration menu
    Copy the full SHA
    c70432d View commit details
    Browse the repository at this point in the history
  2. 🔨 PythonActivityUtil helper for unpacking data

    This helper class shares code to be reused between the `PythonActivity`
    classes of the different bootstraps.
    Also adds few minor adjustments to existing classes.
    AndreMiras committed May 12, 2020
    Configuration menu
    Copy the full SHA
    5312595 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2189 from AndreMiras/feature/share_unpack_data_ja…

    …va_code
    
    PythonActivityUtil helper for unpacking data
    AndreMiras authored May 12, 2020
    Configuration menu
    Copy the full SHA
    0a76c4a View commit details
    Browse the repository at this point in the history
  4. ✅ Add initial tests for python3 recipe (#2192)

    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)
    opacam authored May 12, 2020
    Configuration menu
    Copy the full SHA
    535b39d View commit details
    Browse the repository at this point in the history

Commits on May 13, 2020

  1. 🚑 Fix test_should_build (#2193)

    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)
    opacam authored May 13, 2020
    Configuration menu
    Copy the full SHA
    eb11081 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e6e01e View commit details
    Browse the repository at this point in the history
  3. Fix for 'cannot find setuptools module' (#2195)

    Co-authored-by: fred-simard <[email protected]>
    atom2626 and frederic-simard authored May 13, 2020
    Configuration menu
    Copy the full SHA
    5448f34 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2020

  1. ✅ Add tests for hostpython3 recipe (#2196)

    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.
    opacam authored May 16, 2020
    Configuration menu
    Copy the full SHA
    5e90f06 View commit details
    Browse the repository at this point in the history
  2. Remove superfluous recipes fixes #1387

    Merges/squash #1983
    with a rebasing on develop, closes #1983
    rnixx authored and AndreMiras committed May 16, 2020
    Configuration menu
    Copy the full SHA
    8620562 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2202 from AndreMiras/remove-superfluous-recipes

    Remove superfluous recipes fixes #1387
    AndreMiras authored May 16, 2020
    Configuration menu
    Copy the full SHA
    e4404c8 View commit details
    Browse the repository at this point in the history
  4. 📚 Troubleshoot SSL error

    Documents how to fix the following error:
    ```
    SSLError("Can't connect to HTTPS URL because the SSL module is not available.")
    ```
    AndreMiras committed May 16, 2020
    Configuration menu
    Copy the full SHA
    56a6cf1 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2020

  1. Merge pull request #2205 from AndreMiras/feature/troubleshooting_ssl_…

    …error
    
    📚 Troubleshoot SSL error
    AndreMiras authored May 17, 2020
    Configuration menu
    Copy the full SHA
    d96d71e View commit details
    Browse the repository at this point in the history

Commits on May 25, 2020

  1. 📦 Split logic for build modes & debug symbols (#2213)

    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
    opacam authored May 25, 2020
    Configuration menu
    Copy the full SHA
    0610d20 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2020

  1. ✨ Add opencv_extras recipe (#2209)

    * ✨ Add `opencv_extras` recipe
    
    * 🚧 Test `opencv_extras` build via github actions
    
    * ⏪ Revert "🚧 Test `opencv_extras` build via github actions"
    
    This reverts commit eb6cc6b
    
    * 👌 Remove unneeded development inline comment
    opacam authored May 28, 2020
    1 Configuration menu
    Copy the full SHA
    c8c9776 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2020

  1. Configuration menu
    Copy the full SHA
    c236ddd View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2217 from AndreMiras/feature/issue_template_update

    📝 Attempt to improve the issue template
    AndreMiras authored May 30, 2020
    Configuration menu
    Copy the full SHA
    13a7899 View commit details
    Browse the repository at this point in the history
  3. ⬆️ Bumps to Ubuntu 20.04

    Using the latest released LTS.
    AndreMiras committed May 30, 2020
    Configuration menu
    Copy the full SHA
    a22231e View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2218 from AndreMiras/feature/bumps_to_ubuntu_20.04

    ⬆️ Bumps to Ubuntu 20.04
    AndreMiras authored May 30, 2020
    Configuration menu
    Copy the full SHA
    51de0b3 View commit details
    Browse the repository at this point in the history
  5. 📝 Updates install and troubleshooting docs

    Followed the docs as I was building a project from a fresh macOS install.
    AndreMiras committed May 30, 2020
    Configuration menu
    Copy the full SHA
    62bda59 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a4be492 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #2219 from AndreMiras/feature/update_install_docs

    📝 Updates install and troubleshooting docs
    AndreMiras authored May 30, 2020
    Configuration menu
    Copy the full SHA
    70251d8 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #2220 from AndreMiras/feature/bump_latest_cython

    ⬆️ Bumps to Cython==0.29.19
    AndreMiras authored May 30, 2020
    Configuration menu
    Copy the full SHA
    bff8a2a View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2020

  1. ⬆️ Bumps to Gradle 6.4.1

    Gradle 6 supports OpenJDK up to version 13.
    Also refs: kivy/buildozer#1135
    AndreMiras committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    aca3c4b View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. Merge pull request #2222 from AndreMiras/feature/bumps_gradle_version

    ⬆️ Bumps to Gradle 6.4.1
    AndreMiras authored Jun 2, 2020
    Configuration menu
    Copy the full SHA
    5affb70 View commit details
    Browse the repository at this point in the history
  2. 🐛 Adds missing requests sub dependencies

    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).
    AndreMiras committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    f5e0855 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2221 from AndreMiras/feature/fix_on_device_tests

    🐛 Adds missing requests sub dependencies
    AndreMiras authored Jun 2, 2020
    Configuration menu
    Copy the full SHA
    46d14e9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a32f68 View commit details
    Browse the repository at this point in the history