lambdex
Advanced tools
| #!/usr/bin/env python | ||
| from __future__ import print_function | ||
| import os | ||
| import subprocess | ||
| import sys | ||
| from argparse import ArgumentParser | ||
| def main(dest): | ||
| # N.B.: Pex outputs --version to STDERR under Python 2.7 argparse; so we capture both streams. | ||
| output = subprocess.check_output(args=["pex", "--version"], stderr=subprocess.STDOUT) | ||
| # iN.B.: Older versions of Pex respond to --version with 'pex <version>' whereas newer versions | ||
| # of Pex just respond with '<version>'. | ||
| pex_version = output.decode("utf-8").strip().split(" ", 1)[-1] | ||
| pex_requirement = "pex=={version}".format(version=pex_version) | ||
| print( | ||
| "Using {pex_requirement} to build a Lambdex PEX.".format(pex_requirement=pex_requirement), | ||
| file=sys.stderr, | ||
| ) | ||
| subprocess.check_call( | ||
| args=["pex", "--python", sys.executable, ".", pex_requirement, "-c", "lambdex", "-o", dest] | ||
| ) | ||
| if __name__ == "__main__": | ||
| parser = ArgumentParser() | ||
| parser.add_argument("dest", nargs=1) | ||
| options = parser.parse_args() | ||
| main(options.dest[0]) |
+38
-19
@@ -11,42 +11,61 @@ name: CI | ||
| - check-name: Format | ||
| python-version: 3.9 | ||
| python-version: "3.10" | ||
| tox-env: fmt-check | ||
| - check-name: Packaging | ||
| python-version: 3.9 | ||
| python-version: "3.10" | ||
| tox-env: package | ||
| steps: | ||
| - name: Checkout Lambdex | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v3 | ||
| - name: Setup Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "${{ matrix.python-version }}" | ||
| - name: Check ${{ matrix.check-name }} | ||
| uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511 | ||
| uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb | ||
| with: | ||
| tox-env: ${{ matrix.tox-env }} | ||
| integration-tests: | ||
| name: (${{ matrix.os }}) TOXENV=py${{ join(matrix.python-version, '') }}-int-pre-pex1.6,py${{ join(matrix.python-version, '') }}-int-post-pex1.6 | ||
| name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}-int-${{ matrix.it-selector }}-pex1.6 | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| python-version: [[2, 7], [3, 6], [3, 7], [3, 8], [3, 9]] | ||
| os: [ubuntu-20.04, macos-10.15] | ||
| exclude: | ||
| - os: macos-10.15 | ||
| python-version: [3, 6] | ||
| - os: macos-10.15 | ||
| python-version: [3, 7] | ||
| - os: macos-10.15 | ||
| python-version: [3, 8] | ||
| include: | ||
| - python-version: [2, 7] | ||
| os: macos-11 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [2, 7] | ||
| os: ubuntu-20.04 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [3, 6] | ||
| os: ubuntu-20.04 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [3, 7] | ||
| os: ubuntu-20.04 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [3, 8] | ||
| os: ubuntu-20.04 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [3, 9] | ||
| os: ubuntu-20.04 | ||
| it-selector: "{pre,post}" | ||
| - python-version: [3, 10] | ||
| os: macos-11 | ||
| it-selector: "post" | ||
| - python-version: [3, 10] | ||
| os: ubuntu-20.04 | ||
| it-selector: "post" | ||
| - python-version: [3, 11, "0-rc.2"] | ||
| os: ubuntu-20.04 | ||
| it-selector: "post" | ||
| steps: | ||
| - name: Checkout Lambdex | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v3 | ||
| - name: Setup Python ${{ join(matrix.python-version, '.') }} | ||
| uses: actions/setup-python@v2 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "${{ join(matrix.python-version, '.') }}" | ||
| - name: Run Integration Tests | ||
| uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511 | ||
| uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb | ||
| with: | ||
| tox-env: py${{ join(matrix.python-version, '') }}-int-pre-pex1.6,py${{ join(matrix.python-version, '') }}-int-post-pex1.6 | ||
| tox-env: py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}-int-${{ matrix.it-selector }}-pex1.6 |
@@ -28,4 +28,4 @@ name: Release | ||
| if [[ "${RELEASE_TAG}" =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then | ||
| echo "::set-output name=release-tag::${RELEASE_TAG}" | ||
| echo "::set-output name=release-version::${RELEASE_TAG#v}" | ||
| echo "release-tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT | ||
| echo "release-version=${RELEASE_TAG#v}" >> $GITHUB_OUTPUT | ||
| else | ||
@@ -42,11 +42,11 @@ echo "::error::Release tag '${RELEASE_TAG}' must match 'v\d+.\d+.\d+'." | ||
| - name: Checkout ${{ needs.determine-tag.outputs.release-tag }} | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ needs.determine-tag.outputs.release-tag }} | ||
| - name: Setup Python 3.9 | ||
| uses: actions/setup-python@v2 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.9 | ||
| - name: Publish ${{ needs.determine-tag.outputs.release-tag }} | ||
| uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511 | ||
| uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb | ||
| env: | ||
@@ -53,0 +53,0 @@ FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} |
+4
-0
| # Release Notes | ||
| ## 0.1.7 | ||
| This release brings official support for Python 3.10 and 3.11. | ||
| ## 0.1.6 | ||
@@ -4,0 +8,0 @@ |
@@ -1,1 +0,4 @@ | ||
| requests | ||
| requests<=2.27.1 | ||
| # Pin low to work around Python 3 syntax creeping in. | ||
| certifi<=2021.10.8 |
@@ -1,2 +0,8 @@ | ||
| flask<2 | ||
| requests | ||
| flask==1.1.4 | ||
| requests<=2.27.1 | ||
| # Pin low to work around Python 3 syntax creeping in. | ||
| certifi<=2021.10.8 | ||
| # Work around 'cannot import name 'soft_unicode' from 'markupsafe' by pinning it low. | ||
| MarkupSafe<=2.0.1 |
| # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). | ||
| # Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
| __version__ = "0.1.6" | ||
| __version__ = "0.1.7" |
+7
-4
| Metadata-Version: 2.1 | ||
| Name: lambdex | ||
| Version: 0.1.6 | ||
| Version: 0.1.7 | ||
| Summary: Lambdex turns pex files into aws lambda python functions. | ||
@@ -8,3 +8,3 @@ Home-page: https://github.com/pantsbuild/lambdex | ||
| Author-email: pantsbuild@gmail.com | ||
| Requires-Python: >=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.* | ||
| Requires-Python: >=2.7,<3.12,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.* | ||
| Description-Content-Type: text/markdown | ||
@@ -25,2 +25,4 @@ Classifier: Development Status :: 4 - Beta | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: Programming Language :: Python :: 3.10 | ||
| Classifier: Programming Language :: Python :: 3.11 | ||
| Classifier: Topic :: Software Development :: Build Tools | ||
@@ -31,4 +33,5 @@ Classifier: Topic :: System :: Archiving :: Packaging | ||
| Requires-Dist: pex>=1.1.15 | ||
| Requires-Dist: flask<2 ; extra == "test-gcp-http" and ( python_version < '3.6') | ||
| Requires-Dist: flask~=2.0.0 ; extra == "test-gcp-http" and ( python_version >= '3.6') | ||
| Requires-Dist: flask==1.1.4 ; extra == "test-gcp-http" and ( python_version < '3.6') | ||
| Requires-Dist: flask==2.0.3 ; extra == "test-gcp-http" and ( python_version >= '3.6' and python_version < '3.7') | ||
| Requires-Dist: flask==2.2.2 ; extra == "test-gcp-http" and ( python_version >= '3.7') | ||
| Project-URL: Changelog, https://github.com/pantsbuild/lambdex/blob/main/CHANGES.md | ||
@@ -35,0 +38,0 @@ Provides-Extra: test-gcp-http |
+6
-3
@@ -26,2 +26,4 @@ [build-system] | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Topic :: Software Development :: Build Tools", | ||
@@ -33,8 +35,9 @@ "Topic :: System :: Archiving :: Packaging", | ||
| requires = ["pex>=1.1.15"] | ||
| requires-python = ">=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*" | ||
| requires-python = ">=2.7,<3.12,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*" | ||
| [tool.flit.metadata.requires-extra] | ||
| test-gcp-http = [ | ||
| "flask<2; python_version < '3.6'", | ||
| "flask~=2.0.0; python_version >= '3.6'" | ||
| "flask==1.1.4; python_version < '3.6'", | ||
| "flask==2.0.3; python_version >= '3.6' and python_version < '3.7'", | ||
| "flask==2.2.2; python_version >= '3.7'", | ||
| ] | ||
@@ -41,0 +44,0 @@ |
+13
-4
@@ -28,2 +28,3 @@ [tox] | ||
| {[_integration]commands} | ||
| pex --version | ||
| pex -r {toxinidir}/examples/event_based/requirements.txt -o {toxinidir}/dist/lambda_function.pex | ||
@@ -40,2 +41,3 @@ {toxinidir}/dist/lambdex build -s examples/event_based/example_function.py -H handler -M lambdex_handler.py {toxinidir}/dist/lambda_function.pex | ||
| {[_integration]commands} | ||
| pex --version | ||
| pex -r {toxinidir}/examples/gcp_http/requirements.txt -o {toxinidir}/dist/gcp_http_function.pex | ||
@@ -46,3 +48,4 @@ {toxinidir}/dist/lambdex build -s examples/gcp_http/example_http_function.py -H handler -M main.py {toxinidir}/dist/gcp_http_function.pex | ||
| [testenv:py{27,36,37,38,39}-int-pre-pex1.6] | ||
| # NB: 1.4.8 is the first pre-1.6.0 version to support -c. | ||
| # NB: 1.4.8 is the first pre-1.6.0 version to support -c and Python 3.9 is the last version to | ||
| # support collections.Iterable which 1.4.8 uses. | ||
| deps = | ||
@@ -54,3 +57,3 @@ {[_event_integration]deps} | ||
| [testenv:py{27,36,37,38,39}-int-post-pex1.6] | ||
| [testenv:py{27,36,37,38,39,310,311}-int-post-pex1.6] | ||
| deps = | ||
@@ -71,4 +74,8 @@ {[_event_integration]deps} | ||
| [testenv:pex] | ||
| deps = pex==2.1.43 | ||
| commands = pex . -c lambdex -o {toxinidir}/dist/lambdex | ||
| deps = | ||
| pex==2.1.43; python_version < "3.10" | ||
| # N.B.: This is the lowest version of Pex to support up through Python 3.11. | ||
| pex==2.1.89; python_version >= "3.10" | ||
| commands = | ||
| python scripts/build-lambdex-pex.py {toxinidir}/dist/lambdex | ||
@@ -83,2 +90,4 @@ [testenv:lambdex] | ||
| black==21.4b1 | ||
| # The 8.1.0 release of click breaks black; so we pin. | ||
| click==8.0.1 | ||
| isort==5.8.0 | ||
@@ -85,0 +94,0 @@ commands = |
-34
| #!/usr/bin/env python | ||
| # setup.py generated by flit for tools that don't yet use PEP 517 | ||
| from distutils.core import setup | ||
| packages = \ | ||
| ['lambdex', 'lambdex.bin', 'lambdex.resources'] | ||
| package_data = \ | ||
| {'': ['*']} | ||
| install_requires = \ | ||
| ['pex>=1.1.15'] | ||
| extras_require = \ | ||
| {"test-gcp-http:python_version < '3.6'": ['flask<2'], | ||
| "test-gcp-http:python_version >= '3.6'": ['flask~=2.0.0']} | ||
| entry_points = \ | ||
| {'console_scripts': ['lambdex = lambdex.bin.lambdex:main']} | ||
| setup(name='lambdex', | ||
| version='0.1.6', | ||
| description='Lambdex turns pex files into aws lambda python functions.', | ||
| author='The Lambdex developers', | ||
| author_email='pantsbuild@gmail.com', | ||
| url='https://github.com/pantsbuild/lambdex', | ||
| packages=packages, | ||
| package_data=package_data, | ||
| install_requires=install_requires, | ||
| extras_require=extras_require, | ||
| entry_points=entry_points, | ||
| python_requires='>=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*', | ||
| ) |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
47081
3.89%337
-0.59%