1# Copyright 2022 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17declare_args() { 18 # Python tasks, such as running tests and Pylint, are done in a single GN 19 # toolchain to avoid unnecessary duplication in the build. 20 pw_build_PYTHON_TOOLCHAIN = "$dir_pw_build/python_toolchain:python" 21 22 # Default gn build virtualenv target. 23 pw_build_PYTHON_BUILD_VENV = "$dir_pw_env_setup:pigweed_build_venv" 24 25 # DOCSTAG: [default-pip-gn-args] 26 # Set pw_python_venv.vendor_wheel targets to download Python packages for all 27 # platform combinations. This takes a significant amount of time. 28 pw_build_PYTHON_PIP_DOWNLOAD_ALL_PLATFORMS = false 29 30 # Adds '--require-hashes'. This option enforces hash checking on Python 31 # package files. 32 pw_build_PYTHON_PIP_INSTALL_REQUIRE_HASHES = false 33 34 # Adds --no-index forcing pip to not reach out to the internet (pypi.org) to 35 # download packages. Using this option requires setting 36 # pw_build_PYTHON_PIP_INSTALL_FIND_LINKS as well. 37 pw_build_PYTHON_PIP_INSTALL_OFFLINE = false 38 39 # Adds '--no-cache-dir' forcing pip to ignore any previously cached Python 40 # packages. On most systems this is located in ~/.cache/pip/ 41 pw_build_PYTHON_PIP_INSTALL_DISABLE_CACHE = false 42 43 # List of paths to folders containing Python wheels (*.whl) or source tar 44 # files (*.tar.gz). Pip will check each of these directories when looking for 45 # potential install candidates. Each path will be passed to all 'pip install' 46 # commands as '--find-links PATH'. 47 pw_build_PYTHON_PIP_INSTALL_FIND_LINKS = [] 48 49 # General options passed to pip commands 50 # https://pip.pypa.io/en/stable/cli/pip/#general-options 51 pw_build_PYTHON_PIP_DEFAULT_OPTIONS = [ "--disable-pip-version-check" ] 52 53 # DOCSTAG: [default-pip-gn-args] 54} 55