Merge pull request #178302 from lrworth/update-aws-tools

Update aws-sam-cli, aws-sam-translator, and awscli2
main
Benjamin Hipple 2 years ago committed by GitHub
commit bf15544726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      pkgs/development/python-modules/aws-sam-translator/default.nix
  2. 14
      pkgs/development/tools/aws-sam-cli/default.nix
  3. 21
      pkgs/development/tools/aws-sam-cli/support-click-8-1.patch
  4. 3
      pkgs/tools/admin/awscli2/default.nix

@ -5,6 +5,7 @@
, jsonschema
, mock
, parameterized
, pytest-env
, pytestCheckHook
, pythonOlder
, pyyaml
@ -13,7 +14,7 @@
buildPythonPackage rec {
pname = "aws-sam-translator";
version = "1.42.0";
version = "1.46.0";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -22,7 +23,7 @@ buildPythonPackage rec {
owner = "aws";
repo = "serverless-application-model";
rev = "v${version}";
sha256 = "sha256-pjcRsmxPL4lbgDopW+wKQRkRcqebLPTd95JTL8PiWtc=";
sha256 = "sha256-SLGxpRbTuK+Lxww45dfHIMwwxV5vhlnYyG4WqG45aNg=";
};
propagatedBuildInputs = [
@ -41,6 +42,7 @@ buildPythonPackage rec {
checkInputs = [
mock
parameterized
pytest-env
pytestCheckHook
pyyaml
];

@ -5,11 +5,11 @@
python3.pkgs.buildPythonApplication rec {
pname = "aws-sam-cli";
version = "1.37.0";
version = "1.52.0";
src = python3.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-XE3g2mKwAiaJvi0ShVScnCKrmz7ujaQgOeFXuYwtP4g=";
hash = "sha256-ldr0X+I5+Nfb+WBDOe0m202WOuccGUI5HFL3fpbBNPo=";
};
propagatedBuildInputs = with python3.pkgs; [
@ -36,15 +36,23 @@ python3.pkgs.buildPythonApplication rec {
wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0
'';
patches = [
# Click 8.1 removed `get_terminal_size`, recommending
# `shutil.get_terminal_size` instead.
# (https://github.com/pallets/click/pull/2130)
./support-click-8-1.patch
];
# fix over-restrictive version bounds
postPatch = ''
substituteInPlace requirements/base.txt \
--replace "aws_lambda_builders==" "aws-lambda-builders #" \
--replace "click~=7.1" "click~=8.0" \
--replace "click~=7.1" "click~=8.1" \
--replace "dateparser~=1.0" "dateparser>=0.7" \
--replace "docker~=4.2.0" "docker>=4.2.0" \
--replace "Flask~=1.1.2" "Flask~=2.0" \
--replace "jmespath~=0.10.0" "jmespath" \
--replace "MarkupSafe==2.0.1" "MarkupSafe #" \
--replace "PyYAML~=5.3" "PyYAML #" \
--replace "regex==" "regex #" \
--replace "requests==" "requests #" \

@ -0,0 +1,21 @@
diff --git a/samcli/commands/_utils/table_print.py b/samcli/commands/_utils/table_print.py
index de63af29..a9d0f2fe 100644
--- a/samcli/commands/_utils/table_print.py
+++ b/samcli/commands/_utils/table_print.py
@@ -7,6 +7,7 @@ from functools import wraps
from typing import Sized
import click
+import shutil
MIN_OFFSET = 20
@@ -30,7 +31,7 @@ def pprint_column_names(
def pprint_wrap(func):
# Calculate terminal width, number of columns in the table
- width, _ = click.get_terminal_size()
+ width, _ = shutil.get_terminal_size()
# For UX purposes, set a minimum width for the table to be usable
# and usable_width keeps margins in mind.
width = max(width, min_width)

@ -29,7 +29,7 @@ let
in
with py.pkgs; buildPythonApplication rec {
pname = "awscli2";
version = "2.7.8"; # N.B: if you change this, check if overrides are still up-to-date
version = "2.7.9"; # N.B: if you change this, check if overrides are still up-to-date
src = fetchFromGitHub {
owner = "aws";
@ -67,6 +67,7 @@ with py.pkgs; buildPythonApplication rec {
postPatch = ''
substituteInPlace setup.cfg \
--replace "colorama>=0.2.5,<0.4.4" "colorama" \
--replace "cryptography>=3.3.2,<37.0.0" "cryptography" \
--replace "docutils>=0.10,<0.16" "docutils" \
--replace "ruamel.yaml>=0.15.0,<0.16.0" "ruamel.yaml" \
--replace "wcwidth<0.2.0" "wcwidth" \

Loading…
Cancel
Save