forked from pool/python-aws-sam-translator
- version update to 1.45.0 * Feat FURL by @jonife @valerena in #2370 * Feat /tmp config by @slowpokesnail in #2362 * Fix no allowed origin by @c2tarun in #2180 * Raise InvalidEventException when RestApiId/ApiId is not resolved to a string by @aahung in #2213 * Raise a validation exception if the responses section in an openApi definition path is not a dictionary object by @moelasmar in #2214 * chore: Add auto PR labeler by @jfuss in #2219 * Fix DestinationConfig in streaming event sources by @hawflau in #2215 * fix: handle non-dict DefinitionBody path item in _openapi_postprocess by @torresxb1 in #2216 * Run unit tests in parallel by @aahung in #2222 * Handle when HttpApi resource doesn't have properties by @aahung in #2221 * Chore: Only add labels on open of PRs by @jfuss in #2225 * feat: Lambda URLs by @mndeveci in #2231 * Revert "feat: Lambda URLs (#2229)" by @mndeveci in #2233 * Handle when function http event auth is not a string by @aahung in #2234 * chore: bump version to 1.42.0 by @mndeveci in #2235 * Revert "chore: bump version to 1.42.0" by @CoshUS in #2237 * release: 1.42.0 by @mndeveci in #2243 * fix: open api set_path_default_authorizer by @mndeveci in #2248 * Validate swagger path item objects by @aahung in #2251 * Validate swagger method value is a valid dict before processing by @aahung in #2250 * fix: fix validation errors log message that calls join on a string by @torresxb1 in #2245 * [FOSS] hot fix and improvement by @mingkun2020 in #2207 * fix: Check type of resource type is a string by @mildaniel in #2252 * fix: open api set_path_default_authorizer (#2248) by @mndeveci in #2262 * fix: open api set_path_default_authorizer (#2248) by @mndeveci in #2261 * Do not abort SAR loop on throttling by @marekaiv in #2240 * Improve error message for an invalid ResourcePolicy element by @marekaiv in #2271 * Fixing DisableExecuteApiEndpoint property for REST and adding integ t… by @sattigar in #2272 * fix: Py27hash fix by @torresxb1 in #2182 OBS-URL: https://build.opensuse.org/request/show/975199 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:aws/python-aws-sam-translator?expand=0&rev=30
113 lines
3.6 KiB
RPMSpec
113 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package python-aws-sam-translator
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
# Disable tests on SLE-12 due to issues with Python 3.4
|
|
# see: https://github.com/awslabs/serverless-application-model/issues/1255
|
|
%if 0%{?suse_version} < 1500
|
|
%bcond_with test
|
|
%else
|
|
%bcond_without test
|
|
%endif
|
|
%if 0%{?suse_version} >= 1500
|
|
%define skip_python2 1
|
|
%endif
|
|
Name: python-aws-sam-translator
|
|
Version: 1.45.0
|
|
Release: 0
|
|
Summary: AWS SAM template to AWS CloudFormation template translator
|
|
License: Apache-2.0
|
|
URL: https://github.com/awslabs/serverless-application-model
|
|
Source: https://github.com/awslabs/serverless-application-model/archive/v%{version}.tar.gz#/serverless-application-model-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-PyYAML >= 4.2
|
|
Requires: python-boto3 >= 1.5
|
|
Requires: python-docopt >= 0.6.2
|
|
Requires: python-jsonschema >= 3.0
|
|
Requires: python-six >= 1.11
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
BuildArch: noarch
|
|
%if 0%{?suse_version} < 1500
|
|
BuildRequires: python
|
|
%endif
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module PyYAML >= 5.1}
|
|
BuildRequires: %{python_module boto3 >= 1.5}
|
|
BuildRequires: %{python_module coverage >= 4.4.0}
|
|
BuildRequires: %{python_module docopt >= 0.6.2}
|
|
BuildRequires: %{python_module jsonschema >= 3.0}
|
|
BuildRequires: %{python_module parameterized >= 0.6.1}
|
|
BuildRequires: %{python_module pytest >= 3.0.7}
|
|
BuildRequires: %{python_module pytest-cov >= 2.4.0}
|
|
BuildRequires: %{python_module requests >= 2.20.0}
|
|
BuildRequires: %{python_module six >= 1.11}
|
|
%if %{with python2}
|
|
BuildRequires: python-enum34 >= 1.1
|
|
%endif
|
|
# /SECTION
|
|
%ifpython2
|
|
Requires: python-enum34 >= 1.1
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
AWS SAM Translator is a library that transform SAM
|
|
templates into AWS CloudFormation templates
|
|
|
|
%prep
|
|
%setup -q -n serverless-application-model-%{version}
|
|
sed -i -e 's:~=:>=:g' requirements/base.txt
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
install -D -m 755 bin/sam-translate.py %{buildroot}%{_bindir}/sam-translate
|
|
%python_clone -a %{buildroot}%{_bindir}/sam-translate
|
|
|
|
%if %{with test}
|
|
%check
|
|
export LANG=en_US.UTF8
|
|
# test_is_service_supported_positive_4_ec2:
|
|
# samtranslator/region_configuration.py:52: NoRegionFound
|
|
# test_errors_13_error_definitionuri:
|
|
# AssertionError: Expected 7 errors, found 9
|
|
%pytest -k 'not (test_is_service_supported_positive_4_ec2 or test_errors_13_error_definitionuri or test_py27_hash)'
|
|
%endif
|
|
|
|
%post
|
|
%python_install_alternative sam-translate
|
|
|
|
%postun
|
|
%python_uninstall_alternative sam-translate
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/sam-translate
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|