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
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include LICENSE
include requirements/base.txt
include requirements/prod.txt
include requirements/dev.txt
include requirements/tools.txt
recursive-include samcli/local/init/templates *
recursive-include samcli/lib *.json
recursive-include samcli/commands/local/lib/generated_sample_events *.json
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
init:
SAM_CLI_DEV=1 pip install -e '.[dev]'
SAM_CLI_DEV=1 pip install -e .
Copy link
Contributor

@sriram-mv sriram-mv Apr 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have silently changed the contract of make init now, to always build the latest from lambda-builders in develop. this can have issues when there is a breaking change in lambda builders develop, but the corresponding component to fix sam cli has not yet been merged.

we need to keep this in mind and fix it.

SAM_CLI_DEV=1 pip install -r requirements/dev.txt
SAM_CLI_DEV=1 pip install -r requirements/tools.txt

test:
# Run unit tests
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ dateparser~=0.7
python-dateutil~=2.6
pathlib2~=2.3.2; python_version<"3.4"
requests==2.20.1
aws_lambda_builders==0.2.1
serverlessrepo==0.1.8
20 changes: 3 additions & 17 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
coverage==4.3.4
flake8==3.3.0
tox==2.2.1
pytest-cov==2.4.0
# astroid > 2.0.4 is not compatible with pylint1.7
astroid>=1.5.8,<2.1.0
pylint==1.7.2

# Test requirements
pytest==3.0.7
py==1.4.33
mock==2.0.0
parameterized==0.6.1
pathlib2==2.3.2; python_version<"3.4"
futures==3.2.0; python_version<"3.2.3"
# Py3.2 backport
backports.tempfile==1.0
# Following are "dev" version of libraries that SAM CLI consumes for development purposes.
# For production releases, see prod.txt where these libraries are pinned to a particular version
-e git://github.com/awslabs/aws-lambda-builders.git@develop#egg=aws_lambda_builders
4 changes: 4 additions & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SAM CLI depends on these libraries that the team authors/controls. Pinning them to particular version here
# for production usage.

aws_lambda_builders==0.2.1
17 changes: 17 additions & 0 deletions requirements/tools.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
coverage==4.3.4
flake8==3.3.0
tox==2.2.1
pytest-cov==2.4.0
# astroid > 2.0.4 is not compatible with pylint1.7
astroid>=1.5.8,<2.1.0
pylint==1.7.2

# Test requirements
pytest==3.0.7
py==1.4.33
mock==2.0.0
parameterized==0.6.1
pathlib2==2.3.2; python_version<"3.4"
futures==3.2.0; python_version<"3.2.3"
# Py3.2 backport
backports.tempfile==1.0
13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@ def read_version():
return re.search(r"__version__ = '([^']+)'", content).group(1)


base_reqs = read_requirements("base.txt")
prod_reqs = read_requirements("prod.txt")

requirements = base_reqs + prod_reqs
cmd_name = "sam"

if os.getenv("SAM_CLI_DEV"):
# We are installing in a dev environment
cmd_name = "samdev"

# Don't install prod requirements for dev release
requirements = base_reqs

setup(
name='aws-sam-cli',
version=read_version(),
Expand All @@ -52,10 +60,7 @@ def read_version():
'{}=samcli.cli.main:cli'.format(cmd_name)
]
},
install_requires=read_requirements('base.txt'),
extras_require={
'dev': read_requirements('dev.txt')
},
install_requires=requirements,
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
Expand Down