![]() It seems that poetry env use will not replace an existing virtualenv of the same major/minor version, so if you ran any poetry commands before poetry env use, your environment needs to be deleted and recreated. If you get an error like the following: Expected python to be $NDK_SRC/prebuilts/python/$HOST/bin/python3.9, but is ~/.cache/pypoetry/virtualenvs/$VENV/bin/python (/usr/bin/python3.9). Build For Linux or Darwin $ python checkbuild. To suppress that, pass -permissive-python-environment when using those tools in this environment. You may also need to remove the old poetry environment ( poetry env list to get the name, poetry env remove to remove it).Ĭheckbuild.py and run_tests.py will complain when you try to use a Python that doesn't come from prebuilts by default. In my case that's 3.10.6.Įach time the NDK updates to a new version of Python, you'll need to repeat those steps. # pyenv will list the available Python versions. # We don't need to match the version exactly, just the major/minor version. prebuilts/python/darwin-x86/bin/python3 -version # From the //ndk directory of your NDK tree: This setting will apply to the directory it is run in, so you will need to do it per NDK tree. Then set up your tree to use the correct version of Python. You may need to install homebrew ( for Googlers, else ). Until the Python prebuilt includes that module, do the following to use a different Python:įirst time setup: ensure that you have pyenv installed. On macOS you may not be able to use the Python that is in prebuilts because it does not support the ssl module (which poetry itself needs). Plus, if it’s in your environment your editor can use it. checkbuild.py), but it‘s simpler to just spawn a new shell. You could instead run NDK commands with the poetry run prefix (e.g. ![]() Spawn a new shell using the virtualenv that Poetry created. Note: If poetry install hangs on Linux, try PYTHON_KEYRING_BACKEND= poetry install. The first time, and also anytime you sync because there might be new or updated dependencies, install the NDK dependencies to the virtualenv managed by poetry. prebuilts / python / linux - x86 / bin / python3 If on Mac, be sure to use the darwin-x86 version instead. ![]() Whenever you set up a new NDK tree (after a fresh repo init, for example), configure the project to use our prebuilt Python instead of your system's. To set up your environment to use the correct versions of Python and Python packages, install Poetry and then do the following. This is provided as part of the Android SDK. Running tests requires that adb is in your PATH. pyīuilding on Mac OS X has similar dependencies as Linux, but also requires Xcode. You can use docker to build the NDK: docker build - t ndk - dev infra / dockerĭocker run - it - u $UID - v `realpath. Linux dependencies are listed in the Dockerfile. For example, to check out the r19 release branch, use the -b ndk-release-r19 flag instad of -b master-ndk. They're named ndk-release-r$-release for older releases. If you wish to rebuild a given release of the NDK, the release branches can also be checked out. com / platform / manifest - b master - ndk - partial - clone At time of writing, the correct # invocation is: # Googlers, follow (select AOSP in the Host menu, # and uncheck the box for the git superproject). ![]() If you’re already familiar with how to use repo and gerrit from other Android projects, you already know plenty :)Ĭheck out the branch master-ndk. If you‘re new to using repo and gerrit, see repo.md for tips. The first thing you need is the AOSP NDK repository. Windows host binaries are cross-compiled with MinGW.īuilding the NDK for Mac OS X requires at least 10.13. īoth Linux and Windows NDKs are built on Linux machines. The latest version of this document is available at.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |