|
|
7931ba5 |
Name: python-aws-sam-translator
|
|
|
7931ba5 |
Summary: Transform SAM templates into AWS CloudFormation templates
|
|
|
6e3ece7 |
Version: 1.87.0
|
|
|
7931ba5 |
Release: %autorelease
|
|
|
7931ba5 |
|
|
|
1c4e7e7 |
License: Apache-2.0
|
|
|
7931ba5 |
URL: https://github.com/aws/serverless-application-model
|
|
|
7931ba5 |
# We use the GitHub tarball instead of the PyPI tarball to get documentation
|
|
|
7931ba5 |
# and tests.
|
|
|
b05cb46 |
Source: %{url}/archive/v%{version}/serverless-application-model-%{version}.tar.gz
|
|
|
7931ba5 |
|
|
|
b0df0aa |
# Downstream-only: omit coverage arguments for pytest
|
|
|
b0df0aa |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
b0df0aa |
Patch: python-aws-sam-translator-1.73.0-no-coverage.patch
|
|
|
b0df0aa |
|
|
|
a238c40 |
# Failing tests on warnings makes sense for upstream CI, but is too strict for
|
|
|
a238c40 |
# distribution packaging, where warnings may arise at any time from updated
|
|
|
a238c40 |
# dependencies.
|
|
|
a238c40 |
Patch: python-aws-sam-translator-1.73.0-no-warning-error.patch
|
|
|
a238c40 |
|
|
|
edf94f6 |
BuildArch: noarch
|
|
|
edf94f6 |
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
|
|
edf94f6 |
ExcludeArch: %{ix86}
|
|
|
7931ba5 |
|
|
|
7931ba5 |
BuildRequires: python3-devel
|
|
|
7931ba5 |
|
|
|
c101476 |
# Because most of the dependencies in the “dev” extra (from
|
|
|
c101476 |
# requirements/dev.txt) are unwanted or have version bounds that need to be
|
|
|
c101476 |
# loosened, we list them manually rather than generating BuildRequires from the
|
|
|
c101476 |
# “dev” extra.
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# Omitted dependencies in the following group are due to:
|
|
|
c101476 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
c101476 |
#
|
|
|
c101476 |
# coverage>=5.3,<8
|
|
|
c101476 |
# pytest-cov>=2.10,<5
|
|
|
c101476 |
# pytest-xdist>=2.5,<4
|
|
|
c101476 |
BuildRequires: %{py3_dist pytest-xdist} >= 2.5
|
|
|
c101476 |
# pytest-env>=0.6,<1
|
|
|
c101476 |
BuildRequires: %{py3_dist pytest-env} >= 0.6
|
|
|
c101476 |
# pytest-rerunfailures>=9.1,<12
|
|
|
c101476 |
BuildRequires: %{py3_dist pytest-rerunfailures} >= 9.1
|
|
|
c101476 |
# pyyaml~=6.0
|
|
|
c101476 |
BuildRequires: %{py3_dist pyyaml} >= 6
|
|
|
e9b51f4 |
# ruff~=0.1.0
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# Test requirements
|
|
|
c101476 |
# pytest>=6.2,<8
|
|
|
c101476 |
BuildRequires: %{py3_dist pytest} >= 6.2
|
|
|
c101476 |
# parameterized~=0.7
|
|
|
c101476 |
BuildRequires: %{py3_dist parameterized} >= 0.7
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# We cannot run the integration tests because they interact with AWS.
|
|
|
c101476 |
#
|
|
|
c101476 |
# Integration tests
|
|
|
c101476 |
# dateparser~=1.1
|
|
|
c101476 |
# boto3>=1.23,<2
|
|
|
c101476 |
# tenacity~=8.0
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# The description in requirements/dev.txt is not quite correct; requests is
|
|
|
c101476 |
# actually another integration test dependency (see above).
|
|
|
c101476 |
#
|
|
|
c101476 |
# Requirements for examples
|
|
|
c101476 |
# requests~=2.28
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
c101476 |
#
|
|
|
c101476 |
# formatter
|
|
|
e9b51f4 |
# black==23.10.1
|
|
|
c101476 |
# ruamel.yaml==0.17.21 # It can parse yaml while perserving comments
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
c101476 |
#
|
|
|
c101476 |
# type check
|
|
|
182cc2a |
# mypy~=1.3.0
|
|
|
c101476 |
# ----------
|
|
|
c101476 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
c101476 |
#
|
|
|
c101476 |
# types
|
|
|
c101476 |
# boto3-stubs[appconfig,serverlessrepo]>=1.19.5,==1.*
|
|
|
c101476 |
# types-PyYAML~=6.0
|
|
|
c101476 |
# types-jsonschema~=3.2
|
|
|
c101476 |
|
|
|
7931ba5 |
%global common_description %{expand:
|
|
|
7931ba5 |
%{summary}.
|
|
|
7931ba5 |
|
|
|
7931ba5 |
AWS Serverless Application Model (SAM) is an open-source framework for building
|
|
|
7931ba5 |
serverless applications.}
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%description %{common_description}
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%package -n python3-aws-sam-translator
|
|
|
7931ba5 |
Summary: %{summary}
|
|
|
7931ba5 |
|
|
|
7581842 |
# The bundled version is quite close to upstream. It has some “ignore” type
|
|
|
7581842 |
# annotations added, some if statements were reordered (apparently to put this
|
|
|
7581842 |
# library’s common case first for performance), and an LRU cache layer was
|
|
|
7581842 |
# added.
|
|
|
7581842 |
#
|
|
|
7581842 |
# When the type annotations were the only difference, we unbundled this as a
|
|
|
7581842 |
# downstream patch. Now we bundle again, but we have asked upstream about a
|
|
|
7581842 |
# path to unbundling—a request which was mandated by
|
|
|
7581842 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling:
|
|
|
7581842 |
#
|
|
|
7581842 |
# Path to using upstream py27hash as a dependency?
|
|
|
7581842 |
# https://github.com/aws/serverless-application-model/issues/2815
|
|
|
5001d40 |
#
|
|
|
5001d40 |
# Upstream refused: “Unfortunately due to how the SAM transform is consumed
|
|
|
5001d40 |
# this would be a little tricky, so unless there's customer impact, it's not
|
|
|
5001d40 |
# something we're looking to change at this time.”
|
|
|
7581842 |
Provides: bundled(python3dist(py27hash)) = 1.0.2
|
|
|
7581842 |
|
|
|
3878206 |
Obsoletes: python-aws-sam-translator-doc < 1.54.0-1
|
|
|
9e93f82 |
|
|
|
3878206 |
%description -n python3-aws-sam-translator %{common_description}
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%prep
|
|
|
f9ae8c9 |
%autosetup -n serverless-application-model-%{version} -p1
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%generate_buildrequires
|
|
|
c101476 |
%pyproject_buildrequires
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%build
|
|
|
7931ba5 |
%pyproject_wheel
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%install
|
|
|
7931ba5 |
%pyproject_install
|
|
|
7931ba5 |
%pyproject_save_files samtranslator
|
|
|
3878206 |
# Bug: Source directory bin/ is installed into site-packages
|
|
|
3878206 |
# https://github.com/aws/serverless-application-model/issues/2588
|
|
|
3878206 |
rm -rvf '%{buildroot}%{python3_sitelib}/bin'
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%check
|
|
|
c101476 |
# See Makefile target “test”. We cannot run the integration tests because they
|
|
|
7931ba5 |
# interact with AWS.
|
|
|
a1ff81f |
AWS_DEFAULT_REGION=us-east-1 PYTHONPATH="${PWD}" %pytest -k "${k-}" -n auto
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%files -n python3-aws-sam-translator -f %{pyproject_files}
|
|
|
7581842 |
# pyproject-rpm-macros handles LICENSE/NOTICE/THIRD_PARTY_LICENSES; verify with
|
|
|
7581842 |
# “rpm -qL -p …”
|
|
|
7931ba5 |
%doc CODE_OF_CONDUCT.md
|
|
|
7931ba5 |
%doc CONTRIBUTING.md
|
|
|
7931ba5 |
%doc DESIGN.md
|
|
|
7931ba5 |
%doc HOWTO.md
|
|
|
7931ba5 |
%doc README.md
|
|
|
3878206 |
# Contains a handful of reStructuredText files:
|
|
|
3878206 |
%doc docs/
|
|
|
7931ba5 |
|
|
|
7931ba5 |
|
|
|
7931ba5 |
%changelog
|
|
|
7931ba5 |
%autochangelog
|