1
0
python-aws-sam-translator/python-aws-sam-translator.spec
Robert Schweikert 96f2b2c579 Accepting request 1096714 from home:glaubitz:branches:devel:languages:python:aws
- Update to 1.68.0
  * chore: Upgrade ruff to 0.0.263 and enable more rules by @aahung in (#3127)
  * docs: mention what transform tests are by @hoffa in (#3129)
  * chore(schema): update by @github-actions in (#3131)
  * Merge main to develop by @ssenchenko in (#3136)
  * feat: actionable error on non-ARN policy by @hoffa in (#3132)
  * chore(schema): update by @github-actions in (#3137)
  * feat(SimpleTable): add PointInTimeRecoverySpecification by @hoffa in (#3138)
  * chore(schema): update by @github-actions in (#3139)
  * chore: mark test_request_parameters_open_api as @nonblocking by @hoffa in #(3141)
  * chore(schema): update by @github-actions in (#3143)
  * docs: remove automatic type/bug label by @hoffa in (#3147)
  * chore(schema): update by @github-actions in (#3148)
  * chore: update bundled managed policies by @hoffa in (#3149)
  * chore(schema): update by @github-actions in (#3150)
  * AppSync Api -> Lambda connector by @ssenchenko in (#3145)
  * Revert "feat: actionable error on non-ARN policy (#3132)" by @hoffa in (#3153)
  * chore: add Policies test with every type by @hoffa in (#3155)
  * Release 1.68.0 (to main) by @GavinZZ in (#3185)
- from version 1.67.0
  * chore(schema): update by @github-actions in (#3104)
  * chore: Enable termination protection for companion stacks by @GavinZZ in (#3105)
  * chore(schema): update by @github-actions in (#3108)
  * fix: Availability Dip Fix for MergeDefinitions property by @GavinZZ in (#3115)
  * chore(schema): update by @github-actions in (#3116)
  * chore: bundle aws-cn AWS managed policies by @hoffa in (#3117)
  * Merge main to develop by @xazhao in (#3119)
  * fix: Add ScheduleV2 OmitName to omit generated Name in
    Scheduler::Schedule by @aahung in (#3120)
  * chore: Use importlib.metadata to get package version by @aahung in (#3121)

OBS-URL: https://build.opensuse.org/request/show/1096714
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:aws/python-aws-sam-translator?expand=0&rev=40
2023-07-05 12:16:14 +00:00

111 lines
3.7 KiB
RPMSpec

#
# spec file for package python-aws-sam-translator
#
# Copyright (c) 2023 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/
#
# 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.68.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
Patch0: skip-tests-require-network.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-boto3 >= 1.19.5
Requires: python-jsonschema >= 3.2
Requires: python-pydantic >= 1.8
Requires: (python-typing_extensions >= 4.4.0 if python-base < 3.7)
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.4}
BuildRequires: %{python_module boto3 >= 1.19.5}
BuildRequires: %{python_module coverage >= 5.3}
BuildRequires: %{python_module docopt >= 0.6.2}
BuildRequires: %{python_module jsonschema >= 3.2}
BuildRequires: %{python_module parameterized >= 0.7.4}
BuildRequires: %{python_module pydantic >= 1.8}
BuildRequires: %{python_module pytest >= 3.0.7}
BuildRequires: %{python_module pytest-cov >= 2.10.1}
BuildRequires: %{python_module pytest-rerunfailures}
BuildRequires: %{python_module requests >= 2.24.0}
%python_subpackages
%description
AWS SAM Translator is a library that transform SAM
templates into AWS CloudFormation templates
%prep
%autosetup -p1 -n serverless-application-model-%{version}
sed -i -e 's:~=:>=:g' requirements/base.txt
# Remove the __init__.py file from bin to avoid installation of this
# folder in python_sitelib
# https://github.com/aws/serverless-application-model/issues/2588
rm bin/__init__.py
%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}/samtranslator
%{python_sitelib}/aws_sam_translator-%{version}*-info
%changelog