third_party.pigweed.src/.gn
Rob Mohr 43851ceac0 pw_env_setup: Pin Python package versions
Add a file to pass to the '--constraint' option of 'pip'. This allows
setup.cfg files to only set actual requirements on dependencies but
ensures the actual version retrieved for a given commit is always the
same.

Added a new command 'pw python-packages'. 'pw python-packages list'
writes the list of versions of installed packages to a file.
'pw python-packages diff' compares the list of installed packages to the
constraint file. If there are new packages or updates to package
versions 'pw python-packages diff' will fail.

Added an option to pw_env_setup, '--unpin-pip-packages'. If this is set
the constraint file defined in the top-level '.gn' file is ignored. This
should periodically be used to update versions of packages in the
constraint file.

Change-Id: I49337e029b0c5c82ac1414448d97d952d9df4dae
Bug: 459
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/58280
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-09-08 06:03:42 +00:00

21 lines
743 B
Plaintext

# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
buildconfig = "//BUILDCONFIG.gn"
default_args = {
pw_build_PIP_CONSTRAINTS =
[ "//pw_env_setup/py/pw_env_setup/virtualenv_setup/constraint.list" ]
}