From dd1131be095cf7f19dde865d293e5c0d156061f7 Mon Sep 17 00:00:00 2001 From: Jacob Fuss Date: Wed, 17 Jun 2020 14:51:20 -0500 Subject: [PATCH 1/4] feat(python): Support downloading manylinux2010 and manylinux2014 --- aws_lambda_builders/workflows/python_pip/packager.py | 11 ++++++++--- tests/unit/workflows/python_pip/test_packager.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/aws_lambda_builders/workflows/python_pip/packager.py b/aws_lambda_builders/workflows/python_pip/packager.py index 4fdd30260..4f3639a5b 100644 --- a/aws_lambda_builders/workflows/python_pip/packager.py +++ b/aws_lambda_builders/workflows/python_pip/packager.py @@ -150,7 +150,13 @@ class DependencyBuilder(object): packager. """ - _MANYLINUX_COMPATIBLE_PLATFORM = {"any", "linux_x86_64", "manylinux1_x86_64"} + _MANYLINUX_COMPATIBLE_PLATFORM = { + "any", + "linux_x86_64", + "manylinux1_x86_64", + "manylinux2010_x86_64", + "manylinux2014_x86_64", + } _COMPATIBLE_PACKAGE_WHITELIST = {"sqlalchemy"} def __init__(self, osutils, runtime, pip_runner=None): @@ -243,7 +249,6 @@ def _download_dependencies(self, directory, requirements_filename): compatible_wheels.add(package) else: incompatible_wheels.add(package) - LOG.debug("initial compatible: %s", compatible_wheels) LOG.debug("initial incompatible: %s", incompatible_wheels | sdists) @@ -622,7 +627,7 @@ def download_manylinux_wheels(self, packages, directory, lambda_abi): "--only-binary=:all:", "--no-deps", "--platform", - "manylinux1_x86_64", + "manylinux2014_x86_64", "--implementation", "cp", "--abi", diff --git a/tests/unit/workflows/python_pip/test_packager.py b/tests/unit/workflows/python_pip/test_packager.py index 4aa3ed455..a8f73b386 100644 --- a/tests/unit/workflows/python_pip/test_packager.py +++ b/tests/unit/workflows/python_pip/test_packager.py @@ -234,7 +234,7 @@ def test_download_wheels(self, pip_factory): "--only-binary=:all:", "--no-deps", "--platform", - "manylinux1_x86_64", + "manylinux2014_x86_64", "--implementation", "cp", "--abi", From 96e2ebec3a5587b5a95669697c6f6b844ea90bc3 Mon Sep 17 00:00:00 2001 From: Jacob Fuss Date: Wed, 17 Jun 2020 15:35:52 -0500 Subject: [PATCH 2/4] fix functional assertions --- tests/functional/workflows/python_pip/test_packager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/workflows/python_pip/test_packager.py b/tests/functional/workflows/python_pip/test_packager.py index 266583db3..03a2c1b8f 100644 --- a/tests/functional/workflows/python_pip/test_packager.py +++ b/tests/functional/workflows/python_pip/test_packager.py @@ -555,7 +555,7 @@ def test_can_replace_incompat_whl(self, tmpdir, osutils, pip_runner): "--only-binary=:all:", "--no-deps", "--platform", - "manylinux1_x86_64", + "manylinux2014_x86_64", "--implementation", "cp", "--abi", @@ -589,7 +589,7 @@ def test_whitelist_sqlalchemy(self, tmpdir, osutils, pip_runner): "--only-binary=:all:", "--no-deps", "--platform", - "manylinux1_x86_64", + "manylinux2014_x86_64", "--implementation", "cp", "--abi", @@ -721,7 +721,7 @@ def test_build_into_existing_dir_with_preinstalled_packages(self, tmpdir, osutil "--only-binary=:all:", "--no-deps", "--platform", - "manylinux1_x86_64", + "manylinux2014_x86_64", "--implementation", "cp", "--abi", From 3913f538b7a3cc5279f826d42096476efd6ec55a Mon Sep 17 00:00:00 2001 From: Jacob Fuss Date: Mon, 22 Jun 2020 16:00:39 -0500 Subject: [PATCH 3/4] Fix version of certifi in integ test --- tests/integration/workflows/custom_make/test_custom_make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/workflows/custom_make/test_custom_make.py b/tests/integration/workflows/custom_make/test_custom_make.py index 7c19f8009..e0417fe04 100644 --- a/tests/integration/workflows/custom_make/test_custom_make.py +++ b/tests/integration/workflows/custom_make/test_custom_make.py @@ -46,7 +46,7 @@ def test_must_build_python_project_through_makefile(self): "idna", "urllib3-1.25.9.dist-info", "chardet-3.0.4.dist-info", - "certifi-2020.4.5.1.dist-info", + "certifi-2020.4.5.2.dist-info", "certifi", "idna-2.9.dist-info", "requests", From ec4182a5031e9c1631c2618bc0c298dac7659650 Mon Sep 17 00:00:00 2001 From: Jacob Fuss Date: Mon, 22 Jun 2020 16:28:07 -0500 Subject: [PATCH 4/4] Pin certifi version in integ tests for makefile --- .../testdata/makefile-root/requirements-requests.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/workflows/custom_make/testdata/makefile-root/requirements-requests.txt b/tests/integration/workflows/custom_make/testdata/makefile-root/requirements-requests.txt index 822be7520..a0111f46d 100644 --- a/tests/integration/workflows/custom_make/testdata/makefile-root/requirements-requests.txt +++ b/tests/integration/workflows/custom_make/testdata/makefile-root/requirements-requests.txt @@ -1 +1,4 @@ -requests==2.23.0 \ No newline at end of file +requests==2.23.0 + +# Pinning so the test can expect a given version +certifi==2020.4.5.2 # dep of requests \ No newline at end of file