- Remove python_module macro definition - Update to 1.54.0 * chore: fix custom domain integration tests for feature toggle by @hnnasit in #2517 * Revert "chore: fix custom domain integration tests for feature toggle" by @hnnasit in #2518 * Release 1.52.0 (to develop) by @aws-sam-cli-bot in #2523 * Release 1.53.0 (to develop) by @aws-sam-cli-bot in #2530 * chore: rerun failing tests by @hoffa in #2527 * docs: update PR template by @hoffa in #2531 * chore: run tests with GitHub workflow by @hoffa in #2535 * chore: pylint fix by @GavinZZ in #2538 * chore: remove AppVeyor by @hoffa in #2539 * Add Integration Test Deployer Logging Improvements by @awood45 in #2543 * Upgrade Pylint Version and Fix Pylint Issues by @GavinZZ in #2540 * Add ability to set State of EventBridge Rule by @sebastiankasprzak in #2524 * Add Integ Test Skip Flag for EventBus by @awood45 in #2545 * chore: Enable more pylint rules and fixes pylint issues by @GavinZZ in #2544 * chore: add CodeQL by @hoffa in #2541 * Enable more pylint rules and fixes pylint issues by @GavinZZ in #2547 * fix: Correct kafka property names in generated event source mapping by @aahung in #2549 * Enable more pylint rules and fixes pylint issues by @GavinZZ in #2548 * chore: Add transform test creation script by @GavinZZ in #2551 * chore: Add JSON formatter and format all JSON files in tests by @aahung in #2553 * Do not change input file and exit if hardcoded partition used by @GavinZZ in #2554 * feat: replace DependsOn to connector by its generated logical IDs by @hoffa OBS-URL: https://build.opensuse.org/request/show/1035705 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:aws/python-aws-sam-translator?expand=0&rev=36
108 lines
3.6 KiB
RPMSpec
108 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/
|
|
#
|
|
|
|
|
|
# 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.54.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(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 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
|