aws-lambda-builders 1.68.0__tar.gz → 1.69.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aws_lambda_builders-1.68.0/aws_lambda_builders.egg-info → aws_lambda_builders-1.69.0}/PKG-INFO +2 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/__init__.py +1 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/actions.py +50 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/supported_runtimes.py +2 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/utils.py +80 -5
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/DESIGN.md +1 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/packager.py +3 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/workflow.py +10 -2
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0/aws_lambda_builders.egg-info}/PKG-INFO +2 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/pyproject.toml +1 -1
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/setup.py +1 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/LICENSE +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/MANIFEST.in +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/NOTICE +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/README.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/__main__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/architecture.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/binary_path.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/builder.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/path_resolver.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/registry.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/make.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/custom_make/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/dotnetcli.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/dotnetcli_resolver.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/dotnet_clipackage/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/builder.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/go_modules/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/gradle.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/gradle_resolver.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/gradle_validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/resources/lambda-build-init.gradle +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_gradle/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/maven.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/maven_resolver.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/maven_validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/java_maven/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/lockfile_closure.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/npm.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/nodejs_npm_esbuild/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/compat.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_pip/validator.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/packager.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/python_uv/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/bundler.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/ruby_bundler/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/DESIGN.md +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/__init__.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/actions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/cargo_lambda.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/exceptions.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/utils.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/rust_cargo/workflow.py +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/SOURCES.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/dependency_links.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/entry_points.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/requires.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/top_level.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/requirements/base.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/requirements/dev.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/requirements/python_pip.txt +0 -0
- {aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/setup.cfg +0 -0
{aws_lambda_builders-1.68.0/aws_lambda_builders.egg-info → aws_lambda_builders-1.69.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aws_lambda_builders
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.69.0
|
|
4
4
|
Summary: Python library to compile, build & package AWS Lambda functions for several runtimes & frameworks.
|
|
5
5
|
Home-page: https://github.com/awslabs/aws-lambda-builders
|
|
6
6
|
Author: Amazon Web Services
|
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
24
|
Classifier: Topic :: Internet
|
|
24
25
|
Classifier: Topic :: Software Development :: Build Tools
|
|
25
26
|
Classifier: Topic :: Utilities
|
|
@@ -132,17 +132,66 @@ class LinkSourceAction(BaseAction):
|
|
|
132
132
|
self._dest_dir = dest_dir
|
|
133
133
|
|
|
134
134
|
def execute(self):
|
|
135
|
+
# Match CopySourceAction: a missing source is skipped, not fatal.
|
|
136
|
+
if not os.path.isdir(self._source_dir):
|
|
137
|
+
LOG.warning("Skipping link operation since source %s does not exist", self._source_dir)
|
|
138
|
+
return
|
|
139
|
+
|
|
135
140
|
source_files = set(os.listdir(self._source_dir))
|
|
136
141
|
|
|
137
142
|
for source_file in source_files:
|
|
138
143
|
source_path = Path(self._source_dir, source_file)
|
|
139
144
|
destination_path = Path(self._dest_dir, source_file)
|
|
140
|
-
|
|
145
|
+
# is_symlink() first: a dangling link is not exists().
|
|
146
|
+
if destination_path.is_symlink() or destination_path.is_file():
|
|
141
147
|
os.remove(destination_path)
|
|
148
|
+
elif destination_path.is_dir():
|
|
149
|
+
# Left by an earlier copying build.
|
|
150
|
+
shutil.rmtree(destination_path)
|
|
142
151
|
else:
|
|
143
152
|
os.makedirs(destination_path.parent, exist_ok=True)
|
|
144
153
|
utils.create_symlink_or_copy(str(source_path), str(destination_path))
|
|
145
154
|
|
|
155
|
+
self._prune_dangling_links(source_files)
|
|
156
|
+
|
|
157
|
+
def _prune_dangling_links(self, source_files):
|
|
158
|
+
"""
|
|
159
|
+
Remove broken links into the source directory whose source no longer exists.
|
|
160
|
+
|
|
161
|
+
:type source_files: set
|
|
162
|
+
:param source_files: names currently in the source directory
|
|
163
|
+
"""
|
|
164
|
+
if not os.path.isdir(self._dest_dir):
|
|
165
|
+
return
|
|
166
|
+
|
|
167
|
+
for name in set(os.listdir(self._dest_dir)) - source_files:
|
|
168
|
+
stale_path = Path(self._dest_dir, name)
|
|
169
|
+
if not stale_path.is_symlink() or stale_path.exists():
|
|
170
|
+
continue
|
|
171
|
+
if not self._points_into_source(stale_path):
|
|
172
|
+
continue
|
|
173
|
+
LOG.debug("Removing %s: a link to a source that no longer exists", stale_path)
|
|
174
|
+
os.remove(stale_path)
|
|
175
|
+
|
|
176
|
+
def _points_into_source(self, link_path):
|
|
177
|
+
"""
|
|
178
|
+
Return True if the link targets a direct child of the source directory.
|
|
179
|
+
|
|
180
|
+
Uses os.readlink, not os.path.realpath, which does not follow a broken link on Windows.
|
|
181
|
+
|
|
182
|
+
:type link_path: pathlib.Path
|
|
183
|
+
:param link_path: the symlink to check
|
|
184
|
+
:rtype: bool
|
|
185
|
+
"""
|
|
186
|
+
target = os.readlink(link_path)
|
|
187
|
+
if not os.path.isabs(target):
|
|
188
|
+
target = os.path.join(os.path.dirname(link_path), target)
|
|
189
|
+
|
|
190
|
+
target_parent = os.path.dirname(os.path.normpath(target))
|
|
191
|
+
if not os.path.isdir(target_parent):
|
|
192
|
+
return False
|
|
193
|
+
return os.path.samefile(target_parent, self._source_dir)
|
|
194
|
+
|
|
146
195
|
|
|
147
196
|
class LinkSinglePathAction(BaseAction):
|
|
148
197
|
NAME = "LinkSource"
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/supported_runtimes.py
RENAMED
|
@@ -14,6 +14,7 @@ NODEJS_RUNTIMES = [
|
|
|
14
14
|
"nodejs20.x",
|
|
15
15
|
"nodejs22.x",
|
|
16
16
|
"nodejs24.x",
|
|
17
|
+
"nodejs26.x",
|
|
17
18
|
]
|
|
18
19
|
|
|
19
20
|
# Python runtimes
|
|
@@ -25,6 +26,7 @@ PYTHON_RUNTIMES = [
|
|
|
25
26
|
"python3.12",
|
|
26
27
|
"python3.13",
|
|
27
28
|
"python3.14",
|
|
29
|
+
"python3.15",
|
|
28
30
|
]
|
|
29
31
|
|
|
30
32
|
# Ruby runtimes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Common utilities for the library
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import codecs
|
|
5
6
|
import locale
|
|
6
7
|
import logging
|
|
7
8
|
import os
|
|
@@ -15,6 +16,28 @@ from aws_lambda_builders.architecture import ARM64
|
|
|
15
16
|
LOG = logging.getLogger(__name__)
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
def _materialize_symlinked_destination(destination: str) -> None:
|
|
20
|
+
"""
|
|
21
|
+
Replace a symlinked destination with a real copy of its target, so copying into it
|
|
22
|
+
does not write into the shared dependencies directory.
|
|
23
|
+
|
|
24
|
+
:type destination: str
|
|
25
|
+
:param destination: path that may be a symlink
|
|
26
|
+
"""
|
|
27
|
+
if not os.path.islink(destination):
|
|
28
|
+
return
|
|
29
|
+
|
|
30
|
+
LOG.debug("Replacing symlinked destination %s with a real copy before copying into it", destination)
|
|
31
|
+
link_target = os.path.realpath(destination)
|
|
32
|
+
os.unlink(destination)
|
|
33
|
+
|
|
34
|
+
if os.path.isdir(link_target):
|
|
35
|
+
copytree(link_target, destination)
|
|
36
|
+
elif os.path.isfile(link_target):
|
|
37
|
+
os.makedirs(os.path.dirname(destination), exist_ok=True)
|
|
38
|
+
shutil.copy2(link_target, destination)
|
|
39
|
+
|
|
40
|
+
|
|
18
41
|
def copytree(
|
|
19
42
|
source: str,
|
|
20
43
|
destination: str,
|
|
@@ -48,6 +71,8 @@ def copytree(
|
|
|
48
71
|
LOG.warning("Skipping copy operation since source %s does not exist", source)
|
|
49
72
|
return
|
|
50
73
|
|
|
74
|
+
_materialize_symlinked_destination(destination)
|
|
75
|
+
|
|
51
76
|
if not os.path.exists(destination):
|
|
52
77
|
LOG.debug("Creating target folders at %s", destination)
|
|
53
78
|
os.makedirs(destination)
|
|
@@ -86,6 +111,9 @@ def copytree(
|
|
|
86
111
|
elif os.path.isdir(new_source):
|
|
87
112
|
copytree(new_source, new_destination, ignore=ignore, include=include, maintain_symlinks=maintain_symlinks)
|
|
88
113
|
else:
|
|
114
|
+
# copy2 would write through a symlinked destination.
|
|
115
|
+
if os.path.islink(new_destination):
|
|
116
|
+
os.unlink(new_destination)
|
|
89
117
|
LOG.debug("Copying source file (%s) to destination (%s)", new_source, new_destination)
|
|
90
118
|
shutil.copy2(new_source, new_destination)
|
|
91
119
|
|
|
@@ -210,7 +238,19 @@ def create_symlink_or_copy(source: str, destination: str) -> None:
|
|
|
210
238
|
"consider enabling the necessary settings or privileges on your system to support symbolic links.",
|
|
211
239
|
exc_info=ex if LOG.isEnabledFor(logging.DEBUG) else None,
|
|
212
240
|
)
|
|
213
|
-
|
|
241
|
+
# A broken link at the destination is one reason os.symlink fails. Remove it so the copy
|
|
242
|
+
# below doesn't write through it.
|
|
243
|
+
if os.path.islink(destination):
|
|
244
|
+
LOG.debug("Removing existing symlink at destination %s before copying", destination)
|
|
245
|
+
os.unlink(destination)
|
|
246
|
+
# copytree only handles directories; a dependency can also be a single file (six.py).
|
|
247
|
+
if os.path.isdir(source):
|
|
248
|
+
copytree(source, destination)
|
|
249
|
+
elif os.path.isfile(source):
|
|
250
|
+
os.makedirs(os.path.dirname(destination), exist_ok=True)
|
|
251
|
+
shutil.copy2(source, destination)
|
|
252
|
+
else:
|
|
253
|
+
LOG.warning("Skipping copy operation since source %s does not exist", source)
|
|
214
254
|
|
|
215
255
|
|
|
216
256
|
def _is_within_directory(directory: Union[str, os.PathLike], target: Union[str, os.PathLike]) -> bool:
|
|
@@ -218,9 +258,13 @@ def _is_within_directory(directory: Union[str, os.PathLike], target: Union[str,
|
|
|
218
258
|
abs_directory = os.path.abspath(directory)
|
|
219
259
|
abs_target = os.path.abspath(target)
|
|
220
260
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
261
|
+
try:
|
|
262
|
+
# commonpath compares whole path components; commonprefix compares characters,
|
|
263
|
+
# which would wrongly treat "/tmp/ab/x" as being inside "/tmp/a".
|
|
264
|
+
return os.path.commonpath([abs_directory, abs_target]) == abs_directory
|
|
265
|
+
except ValueError:
|
|
266
|
+
# Raised for paths on different drives (Windows): they cannot be nested
|
|
267
|
+
return False
|
|
224
268
|
|
|
225
269
|
|
|
226
270
|
def extract_tarfile(tarfile_path: Union[str, os.PathLike], unpack_dir: Union[str, os.PathLike]) -> None:
|
|
@@ -238,6 +282,37 @@ def extract_tarfile(tarfile_path: Union[str, os.PathLike], unpack_dir: Union[str
|
|
|
238
282
|
tar.extractall(unpack_dir)
|
|
239
283
|
|
|
240
284
|
|
|
285
|
+
def _locale_encoding() -> str:
|
|
286
|
+
"""
|
|
287
|
+
Returns the encoding to decode the output of external tools (pip, npm, maven, ...) with.
|
|
288
|
+
|
|
289
|
+
Before Python 3.15, ``locale.getpreferredencoding()`` returned the locale encoding, or "utf-8" when
|
|
290
|
+
UTF-8 mode was enabled (explicitly, or automatically for the C/POSIX locale, PEP 540). Python 3.15
|
|
291
|
+
enables UTF-8 mode by default (PEP 686), so ``getpreferredencoding()`` now returns "utf-8" even for
|
|
292
|
+
non-UTF-8 locales such as a Windows ANSI code page, while external tools still write in that encoding.
|
|
293
|
+
This keeps the pre-3.15 behaviour:
|
|
294
|
+
|
|
295
|
+
- UTF-8 mode explicitly requested (PYTHONUTF8=1 or -X utf8): utf-8
|
|
296
|
+
- otherwise the locale encoding (``locale.getencoding()``, Python 3.11+), except that an ASCII locale
|
|
297
|
+
(C/POSIX) is decoded as utf-8, a superset of ASCII
|
|
298
|
+
"""
|
|
299
|
+
getencoding = getattr(locale, "getencoding", None)
|
|
300
|
+
if getencoding is None:
|
|
301
|
+
# Python < 3.11: UTF-8 mode is never on by default, so this is the historical behaviour
|
|
302
|
+
return locale.getpreferredencoding()
|
|
303
|
+
|
|
304
|
+
if os.environ.get("PYTHONUTF8") == "1" or sys._xoptions.get("utf8") in (True, "1"):
|
|
305
|
+
return "utf-8"
|
|
306
|
+
|
|
307
|
+
encoding = getencoding()
|
|
308
|
+
try:
|
|
309
|
+
if codecs.lookup(encoding).name == "ascii":
|
|
310
|
+
return "utf-8"
|
|
311
|
+
except LookupError:
|
|
312
|
+
return "utf-8"
|
|
313
|
+
return encoding
|
|
314
|
+
|
|
315
|
+
|
|
241
316
|
def decode(to_decode: bytes, encoding: Optional[str] = None) -> str:
|
|
242
317
|
"""
|
|
243
318
|
Perform a "safe" decoding of a series of bytes. Attempts to find the localized encoding
|
|
@@ -258,5 +333,5 @@ def decode(to_decode: bytes, encoding: Optional[str] = None) -> str:
|
|
|
258
333
|
str
|
|
259
334
|
Decoded string with unrecognized characters replaced with a replacement character
|
|
260
335
|
"""
|
|
261
|
-
encoding = encoding or
|
|
336
|
+
encoding = encoding or _locale_encoding()
|
|
262
337
|
return to_decode.decode(encoding, errors="replace").strip()
|
|
@@ -49,7 +49,7 @@ def build_dependencies(artifacts_dir_path,
|
|
|
49
49
|
|
|
50
50
|
:type runtime: str
|
|
51
51
|
:param runtime: Python version to build dependencies for. This can
|
|
52
|
-
either be python3.8, python3.9, python3.10, python3.11, python3.12, python3.13 or python3.
|
|
52
|
+
either be python3.8, python3.9, python3.10, python3.11, python3.12, python3.13, python3.14 or python3.15. These are
|
|
53
53
|
currently the only supported values.
|
|
54
54
|
|
|
55
55
|
:type ui: :class:`lambda_builders.actions.python_pip.utils.UI`
|
|
@@ -89,6 +89,7 @@ def get_lambda_abi(runtime):
|
|
|
89
89
|
"python3.12": "cp312",
|
|
90
90
|
"python3.13": "cp313",
|
|
91
91
|
"python3.14": "cp314",
|
|
92
|
+
"python3.15": "cp315",
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
if runtime not in supported:
|
|
@@ -103,7 +104,7 @@ class PythonPipDependencyBuilder(object):
|
|
|
103
104
|
|
|
104
105
|
:type runtime: str
|
|
105
106
|
:param runtime: Python version to build dependencies for. This can
|
|
106
|
-
either be python3.8, python3.9, python3.10, python3.11, python3.12, python3.13 or python3.
|
|
107
|
+
either be python3.8, python3.9, python3.10, python3.11, python3.12, python3.13, python3.14 or python3.15.
|
|
107
108
|
These are currently the only supported values.
|
|
108
109
|
|
|
109
110
|
:type osutils: :class:`lambda_builders.utils.OSUtils`
|
|
@@ -217,6 +218,7 @@ class DependencyBuilder(object):
|
|
|
217
218
|
"cp312": (2, 34),
|
|
218
219
|
"cp313": (2, 34),
|
|
219
220
|
"cp314": (2, 34),
|
|
221
|
+
"cp315": (2, 34),
|
|
220
222
|
}
|
|
221
223
|
# Fallback version if we're on an unknown python version
|
|
222
224
|
# not in _RUNTIME_GLIBC.
|
|
@@ -115,8 +115,16 @@ class PythonPipWorkflow(BaseWorkflow):
|
|
|
115
115
|
# folder
|
|
116
116
|
if self.dependencies_dir and self.combine_dependencies:
|
|
117
117
|
# when copying downloaded dependencies back to artifacts folder, don't exclude anything
|
|
118
|
-
#
|
|
119
|
-
|
|
118
|
+
#
|
|
119
|
+
# Symlink instead of copy only when building a layer. sam local mounts a function's
|
|
120
|
+
# build folder into the container, where links pointing outside it break (#391).
|
|
121
|
+
# A layer that creates parent packages also copies, so that step can't write into
|
|
122
|
+
# dependencies_dir through a link.
|
|
123
|
+
if (
|
|
124
|
+
self.is_building_layer
|
|
125
|
+
and not self._should_create_parent_packages()
|
|
126
|
+
and is_experimental_build_improvements_enabled(self.experimental_flags)
|
|
127
|
+
):
|
|
120
128
|
self._actions.append(LinkSourceAction(self.dependencies_dir, artifacts_dir))
|
|
121
129
|
else:
|
|
122
130
|
self._actions.append(CopySourceAction(self.dependencies_dir, artifacts_dir))
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0/aws_lambda_builders.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aws_lambda_builders
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.69.0
|
|
4
4
|
Summary: Python library to compile, build & package AWS Lambda functions for several runtimes & frameworks.
|
|
5
5
|
Home-page: https://github.com/awslabs/aws-lambda-builders
|
|
6
6
|
Author: Amazon Web Services
|
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
24
|
Classifier: Topic :: Internet
|
|
24
25
|
Classifier: Topic :: Software Development :: Build Tools
|
|
25
26
|
Classifier: Topic :: Utilities
|
|
@@ -63,6 +63,7 @@ setup(
|
|
|
63
63
|
"Programming Language :: Python :: 3.12",
|
|
64
64
|
"Programming Language :: Python :: 3.13",
|
|
65
65
|
"Programming Language :: Python :: 3.14",
|
|
66
|
+
"Programming Language :: Python :: 3.15",
|
|
66
67
|
"Topic :: Internet",
|
|
67
68
|
"Topic :: Software Development :: Build Tools",
|
|
68
69
|
"Topic :: Utilities",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/architecture.py
RENAMED
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/binary_path.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/path_resolver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders/workflows/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/requires.txt
RENAMED
|
File without changes
|
{aws_lambda_builders-1.68.0 → aws_lambda_builders-1.69.0}/aws_lambda_builders.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|