Skip to content

Conversation

@atom2626
Copy link
Owner

No description provided.

AndreMiras and others added 30 commits April 29, 2020 14:21
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
- kivy#2063
…uild

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 <alexanderjohntaylor@gmail.com>
* 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.
…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>
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 kivy#2167
- fixes kivy#2169
…anager

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 kivy#2092
…ttest_loading

Fixes service only unittest loading
…ation_update

Updates release documentation
All 3 `Hardware.java` seemed to be the same (minus some formatting).
None of the class seems to be used.
…ar_java

Moves kamranzafar/ java directory to common/
…va_concurrency

Removes java concurrency/ folder
Got the deprecation warning message since april 2016.
kivy#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.
AndreMiras and others added 5 commits May 10, 2020 16:20
…ed_renpy_python_activity

Deletes deprecated renpy Python{Activity,Service}.java
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.
…n_util

Share PythonUtil.java between bootstraps
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.

7 participants