Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): Support downloading manylinux2010 and manylinux2014 #178

Merged
merged 4 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions aws_lambda_builders/workflows/python_pip/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/workflows/python_pip/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
requests==2.23.0
requests==2.23.0

# Pinning so the test can expect a given version
certifi==2020.4.5.2 # dep of requests
2 changes: 1 addition & 1 deletion tests/unit/workflows/python_pip/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down