Skip to content
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
16 changes: 7 additions & 9 deletions aws_lambda/aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import boto3
import pip
import yaml
from . import project_template

from .helpers import mkdir, read, archive, timestamp


Expand Down Expand Up @@ -93,15 +93,13 @@ def init(src, minimal=False):
Minimal possible template files (excludes event.json).
"""

path_to_project_template = project_template.__path__[0]
for f in os.listdir(path_to_project_template):
path_to_file = os.path.join(path_to_project_template, f)
if minimal and f == 'event.json':
continue
if f.endswith('.pyc'):
# We don't need the compiled files.
templates_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"project_templates")
for filename in os.listdir(templates_path):
if (minimal and filename == 'event.json') or filename.endswith('.pyc'):
continue
copy(path_to_file, src)
destination = os.path.join(templates_path, filename)
copy(destination, src)


def build(src, local_package=None):
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
url='https://github.com/nficano/python-lambda',
packages=find_packages(),
package_data={
'aws_lambda': ['templates/*'],
'aws_lambda': ['project_templates/*'],
'': ['*.json'],
},
include_package_data=True,
Expand Down