From ca783c1ff3242f0b5a326f7b3d87c1bd065940a7 Mon Sep 17 00:00:00 2001 From: Iskandar Setiadi Date: Wed, 25 Nov 2020 11:05:04 +0900 Subject: [PATCH] Various update and cleanup --- LICENSE | 2 +- README.md | 4 ++-- README.rst | 4 ++-- lambda_local/__init__.py | 2 +- lambda_local/context.py | 2 +- lambda_local/event.py | 2 +- lambda_local/main.py | 2 +- lambda_local/timeout.py | 2 +- setup.py | 5 ++--- tests/__init__.py | 2 +- tests/basic_test.py | 2 +- tests/test_direct_invocations.py | 2 +- wercker.yml | 28 ++++++++++++++++++++++++++++ 13 files changed, 43 insertions(+), 16 deletions(-) diff --git a/LICENSE b/LICENSE index 282b0e8..44eb621 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright (c) 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fb59490..4dc9dd7 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Suppose your project directory is like this: │   │   ├── ... (package content of rx) ... │   │   └── testscheduler.py -│   └── Rx-1.2.3.dist-info +│   └── Rx-1.6.1.dist-info │   ├── DESCRIPTION.rst │   ├── METADATA │   ├── metadata.json @@ -147,7 +147,7 @@ Call a handler function `func` with given `event`, `context` and custom `environ 1. Make sure the 3rd party libraries used in the AWS Lambda function can be imported. ``` bash -pip install rx +pip install rx==1.6.1 ``` 2. To call the lambda function above with your python code: diff --git a/README.rst b/README.rst index 9c5bd6a..8fb606d 100644 --- a/README.rst +++ b/README.rst @@ -75,7 +75,7 @@ Suppose your project directory is like this: │   │   ├── ... (package content of rx) ... │   │   └── testscheduler.py - │   └── Rx-1.2.3.dist-info + │   └── Rx-1.6.1.dist-info │   ├── DESCRIPTION.rst │   ├── METADATA │   ├── metadata.json @@ -164,7 +164,7 @@ Sample .. code:: bash - pip install rx + pip install rx==1.6.1 2. To call the lambda function above with your python code: diff --git a/lambda_local/__init__.py b/lambda_local/__init__.py index 2a21140..2112c24 100644 --- a/lambda_local/__init__.py +++ b/lambda_local/__init__.py @@ -1,7 +1,7 @@ ''' python-lambda-local: Main module -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/context.py b/lambda_local/context.py index dbc287e..c183a3d 100644 --- a/lambda_local/context.py +++ b/lambda_local/context.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' from __future__ import print_function diff --git a/lambda_local/event.py b/lambda_local/event.py index a9d3c98..f76b3ec 100644 --- a/lambda_local/event.py +++ b/lambda_local/event.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/main.py b/lambda_local/main.py index b3645d2..738079f 100644 --- a/lambda_local/main.py +++ b/lambda_local/main.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/timeout.py b/lambda_local/timeout.py index d13c619..a699bc0 100644 --- a/lambda_local/timeout.py +++ b/lambda_local/timeout.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/setup.py b/setup.py index 9c2aa1a..1196146 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ ''' python-lambda-local: Run lambda function in python on local machine. -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' import io @@ -26,8 +26,6 @@ def run_tests(self): version = "0.1.12" TEST_REQUIRE = ['pytest'] -if sys.version_info[0] == 2: - TEST_REQUIRE = ['pytest==4.6.3'] setup(name="python-lambda-local", version=version, @@ -39,6 +37,7 @@ def run_tests(self): 'Programming Language :: Python', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: MIT License' ], keywords="AWS Lambda", diff --git a/tests/__init__.py b/tests/__init__.py index 9e074ad..b3ed574 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,6 +5,6 @@ Organize tests into files, each named xxx_test.py Read more here: http://pytest.org/ -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' diff --git a/tests/basic_test.py b/tests/basic_test.py index 46e81d2..5a79481 100644 --- a/tests/basic_test.py +++ b/tests/basic_test.py @@ -5,7 +5,7 @@ Write each test as a function named test_. Read more here: http://pytest.org/ -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' diff --git a/tests/test_direct_invocations.py b/tests/test_direct_invocations.py index b49eaf7..1a418fd 100644 --- a/tests/test_direct_invocations.py +++ b/tests/test_direct_invocations.py @@ -4,7 +4,7 @@ Meant for use with py.test. -Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) +Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' import json diff --git a/wercker.yml b/wercker.yml index 8e4f3f4..1362f1e 100644 --- a/wercker.yml +++ b/wercker.yml @@ -59,6 +59,34 @@ build-py38: code: | python setup.py test +build-py39: + box: python:3.9-slim + steps: + - script: + name: virtualenv install + code: | + pip install virtualenv + + - virtualenv: + name: setup virtual environment + install_wheel: true + + - script: + name: echo python information + code: | + echo "python version $(python --version) running" + echo "pip version $(pip --version) running" + + - script: + name: build + code: | + python setup.py sdist bdist_wheel + + - script: + name: test + code: | + python setup.py test + deploy: steps: - script: