Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Add missing dependency 'six' 6️⃣
Browse files Browse the repository at this point in the history
  • Loading branch information
megallo committed Jul 26, 2018
1 parent f7d642d commit 640f278
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eggsecute.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
import zipfile


def collect_single_module_file(module_name):
"""Return a list of tuples of (absolute_file_path, zip_target_path) for a single module file, like six"""
loaded_module = __import__(module_name, globals(), locals(), [], 0)
module_file = loaded_module.__file__
file_path = os.path.basename(module_file)

return [(module_file, file_path)]


def collect_module_files(module_name, relative_path_in_module):
"""Return a list of tuples of (absolute_file_path, zip_target_path)"""
loaded_module = __import__(module_name, globals(), locals(), [], 0)
Expand Down Expand Up @@ -64,6 +73,7 @@ def main(script_path, output_path):
module_files.extend(collect_module_files('dateutil', ''))
module_files.extend(collect_module_files('jmespath', ''))
module_files.extend(collect_module_files('click', ''))
module_files.extend(collect_single_module_file('six'))

# filter out everything but .py's
filtered_files = [x for x in module_files if x[1].endswith(".py") or x[1].endswith(".json") or x[1].endswith(".pem")]
Expand Down

0 comments on commit 640f278

Please sign in to comment.