Skip to content

Commit 0173bba

Browse files
committed
Added support for lib64 site packages
Fixed issue with lib64 site packages not being included in lambda package. Lib64 packages will not be copied if the lib64 directory is determined to be a symlink. This commit also removes any use of the shutil copytree method in favor of the copy_tree method in the local utils package.
1 parent 5c9c7fd commit 0173bba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lambda_uploader/package.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,20 @@ def package(self):
9797

9898
# Copy site packages into package base
9999
LOG.info('Copying site packages')
100+
100101
site_packages = 'lib/python2.7/site-packages'
102+
lib64_site_packages = 'lib64/python2.7/site-packages'
101103
if sys.platform == 'win32' or sys.platform == 'cygwin':
104+
lib64_site_packages = 'lib64\\site-packages'
102105
site_packages = 'lib\\site-packages'
103106

104-
shutil.copytree(os.path.join(self._pkg_venv, site_packages),
107+
utils.copy_tree(os.path.join(self._pkg_venv, site_packages),
105108
package)
109+
lib64_path = os.path.join(self._pkg_venv, lib64_site_packages)
110+
if not os.path.islink(lib64_path):
111+
LOG.info('Copying lib64 site packages')
112+
utils.copy_tree(lib64_path, package)
113+
106114
utils.copy_tree(self._path, package, ignore=[TEMP_WORKSPACE_NAME])
107115
self._create_zip(package)
108116

0 commit comments

Comments
 (0)