This version adds the following feature:
- Add fast conversions between Python
bytearray and Java
And fixes the following pip-related issues:
- Make pip evaluate environment markers (PEP 508) and
data-requires-python attributes (PEP 503) against the target platform rather than the build platform.
- Make pip only prioritize native wheels (not pure-Python wheels) over sdists of a newer version.
- Fix pip issues when multiple packages provide the same directory or filename.
- Improve pip error messages when packages attempt to build native code.
Also, the following packages have recently been added to the repository:
This release adds the following feature:
And includes the following bugfixes:
- Make sure
__spec__ is set on modules which are loaded by direct calls to the loader, or via
hashlib OpenSSL integration.
- Fix pip
- Improve up-to-date checks on Gradle tasks.
This release adds support for installing pure-Python sdists. This means that all pure-Python packages on PyPI should now work with Chaquopy, whether they have wheels available or not. If you have any difficulty installing a package, please report it at our issue tracker.
- The Python major version of
buildPython is now required to be the same as that of the app itself when using pip, and the default value of
buildPython has been changed accordingly.
- Implement implicit namespace packages on Python 3 (PEP 420).
- Add partial support for .pth files. Only the execution of lines starting with
import is currently implemented: all other lines are ignored.
- Add message explaining how to show full pip output in Android Studio 3.1’s new Build window.
- Fix “registering invalid inputs” warning in Android Studio 3.1.
This version adds support for Android Gradle plugin version 3.1, and removes support for version 2.2. If you’re still using Android Studio 2.2, then we highly recommend that you upgrade to version 3.1. Our testing shows that it builds apps more than twice as fast, whether you’re using Chaquopy or not.
- Add Python versions 2.7.15 and 3.6.5, and fix a few lesser-used standard library modules.
- Update to pip version 10.0.1.
- Build reliability fixes, including one for over-strict metadata parsing.
- Further build speed improvements.
- Improve app startup speed where a requirement is reinstalled at the same version as before.
We’re happy to announce that, due to popular demand, the following packages are now available for Chaquopy 2.1 and later:
NumPy has also been updated to the newest version, and is now built to work with OpenBLAS. As a result, many calculations are significantly faster than in the previous build.
For a full list of native packages currently available for Chaquopy, see the repository. In addition, Chaquopy of course supports all pure-Python packages which are available as wheels on PyPI.
If your favorite package still isn’t available, please let us know!
This version is focused on improving support for Python requirements which are very large, or contain native code. Several new packages have been added to the repository as a result: see the next post for a list.
List of changes:
- External shared library dependencies can now be loaded.
- pip install performance has been improved.
This version fixes the following bugs:
- Fix a crash reported on various devices, especially Samsung Galaxy J series phones.
- Disable upgrade notification from bundled copy of pip.
It also makes available the following fixes in the package repository:
- Fix NumPy dependency on libc functions not present in API level 17 and earlier.
- Remove debugging information from native modules. All native packages benefit from this, but especially NumPy, which is now smaller by 4 MB per ABI.
The major version number is incremented due to the following incompatible change:
- The import hook now only looks up names in Java if they failed to import from Python. This significantly speeds up import of large Python packages. However, it means that importing a name which exists in both languages is no longer reported as an error: instead, the value from Python will be returned.
- General performance improvements: the Python unit tests now run about 25% faster.
- Fix a crash on API level 15 caused by the license notification.
- Remove READ_LOGS permission from the demo app: this was only needed on API level 15, and its Google Play description is too scary.
The Chaquopy SDK is now out of beta and is considered ready for production use. Thanks to all those who tested it during the beta period: your free license keys will remain valid for all future versions.
We’re looking forward to continuing to improve Chaquopy in the future, but we’d like to hear what features are most important to you. Do you want better performance, or are there any Python packages you’d like to be made available? Would you benefit from better Android Studio integration, or would you be more interested in a way to create apps in Python directly on an Android device?
Please let us know your thoughts by email or on our GitHub page.
This version adds the following feature:
- The Python standard library is now loaded from compiled .pyc files by default (see documentation). As a result, startup of a minimal app is now 20-30% faster with Python 2, and 50-60% faster with Python 3. (Python 3 startup is still slower than Python 2, but only by 15-20%.)
And fixes the following bugs:
sys.stdin now returns EOF rather than blocking. If you want to run some code which takes interactive text input, see below for the new console app template.
write method of
sys.stderr now returns the character count.
- Very long lines written to
sys.stderr are now split into slightly smaller fragments, to allow for the shorter Logcat message length limit in recent versions of Android.
- Fix a multi-threading deadlock.
- Apps built with an unlicensed copy of the SDK are now limited to a run-time of 5 minutes.
- A console app template is now available, providing a framework for running text-based Python programs in an Android app. The demo app has been rewritten to use this framework, giving the following improvements:
- Code input in the REPL is now executed on a background thread.
- The REPL can now be terminated by typing
exit(), then restarted by pressing back and re-entering the activity.
- Stderr is now shown in red.
- Scrolling, rotation and state restoration are all more reliable.