Skip to content

Commit effe65b

Browse files
authored
Revert "fix: Adding debug logging to python_pip builder (#33)"
This reverts commit 0b30c14.
1 parent 7cfa9da commit effe65b

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

aws_lambda_builders/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
22
AWS Lambda Builder Library
33
"""
4-
__version__ = '0.0.3-dev'
4+
__version__ = '0.0.2'
55
RPC_PROTOCOL_VERSION = "0.1"

aws_lambda_builders/workflows/python_pip/packager.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import sys
66
import re
77
import subprocess
8-
import logging
98
from email.parser import FeedParser
109

1110

@@ -15,8 +14,6 @@
1514
from .compat import pip_no_compile_c_shim
1615
from .utils import OSUtils
1716

18-
LOG = logging.getLogger(__name__)
19-
2017

2118
# TODO update the wording here
2219
MISSING_DEPENDENCIES_TEMPLATE = r"""
@@ -232,9 +229,6 @@ def _download_dependencies(self, directory, requirements_filename):
232229
else:
233230
incompatible_wheels.add(package)
234231

235-
LOG.debug("initial compatible: %s", compatible_wheels)
236-
LOG.debug("initial incompatible: %s", incompatible_wheels | sdists)
237-
238232
# Next we need to go through the downloaded packages and pick out any
239233
# dependencies that do not have a compatible wheel file downloaded.
240234
# For these packages we need to explicitly try to download a
@@ -248,10 +242,6 @@ def _download_dependencies(self, directory, requirements_filename):
248242
# file ourselves.
249243
compatible_wheels, incompatible_wheels = self._categorize_wheel_files(
250244
directory)
251-
LOG.debug(
252-
"compatible wheels after second download pass: %s",
253-
compatible_wheels
254-
)
255245
missing_wheels = sdists - compatible_wheels
256246
self._build_sdists(missing_wheels, directory, compile_c=True)
257247

@@ -265,10 +255,6 @@ def _download_dependencies(self, directory, requirements_filename):
265255
# compiler.
266256
compatible_wheels, incompatible_wheels = self._categorize_wheel_files(
267257
directory)
268-
LOG.debug(
269-
"compatible after building wheels (no C compiling): %s",
270-
compatible_wheels
271-
)
272258
missing_wheels = sdists - compatible_wheels
273259
self._build_sdists(missing_wheels, directory, compile_c=False)
274260

@@ -278,10 +264,6 @@ def _download_dependencies(self, directory, requirements_filename):
278264
# compatible version directly and building from source.
279265
compatible_wheels, incompatible_wheels = self._categorize_wheel_files(
280266
directory)
281-
LOG.debug(
282-
"compatible after building wheels (C compiling): %s",
283-
compatible_wheels
284-
)
285267

286268
# Now there is still the case left over where the setup.py has been
287269
# made in such a way to be incompatible with python's setup tools,
@@ -291,9 +273,6 @@ def _download_dependencies(self, directory, requirements_filename):
291273
compatible_wheels, incompatible_wheels = self._apply_wheel_whitelist(
292274
compatible_wheels, incompatible_wheels)
293275
missing_wheels = deps - compatible_wheels
294-
LOG.debug("Final compatible: %s", compatible_wheels)
295-
LOG.debug("Final incompatible: %s", incompatible_wheels)
296-
LOG.debug("Final missing wheels: %s", missing_wheels)
297276

298277
return compatible_wheels, missing_wheels
299278

@@ -306,18 +285,14 @@ def _download_all_dependencies(self, requirements_filename, directory):
306285
self._pip.download_all_dependencies(requirements_filename, directory)
307286
deps = {Package(directory, filename) for filename
308287
in self._osutils.get_directory_contents(directory)}
309-
LOG.debug("Full dependency closure: %s", deps)
310288
return deps
311289

312290
def _download_binary_wheels(self, packages, directory):
313291
# Try to get binary wheels for each package that isn't compatible.
314-
LOG.debug("Downloading missing wheels: %s", packages)
315292
self._pip.download_manylinux_wheels(
316293
[pkg.identifier for pkg in packages], directory)
317294

318295
def _build_sdists(self, sdists, directory, compile_c=True):
319-
LOG.debug("Build missing wheels from sdists "
320-
"(C compiling %s): %s", compile_c, sdists)
321296
for sdist in sdists:
322297
path_to_sdist = self._osutils.joinpath(directory, sdist.filename)
323298
self._pip.build_wheel(path_to_sdist, directory, compile_c)
@@ -562,7 +537,6 @@ def __init__(self, pip, osutils=None):
562537
def _execute(self, command, args, env_vars=None, shim=None):
563538
"""Execute a pip command with the given arguments."""
564539
main_args = [command] + args
565-
LOG.debug("calling pip %s", ' '.join(main_args))
566540
rc, out, err = self._wrapped_pip.main(main_args, env_vars=env_vars,
567541
shim=shim)
568542
return rc, out, err

0 commit comments

Comments
 (0)