python-awscrt/python-awscrt.spec
Packit 3b652da714 [packit] 0.19.1 upstream release
Upstream tag: v0.19.1
Upstream commit: 74e0538f

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/python-awscrt.git refs/heads/*:refs/remotes/packit/*
git checkout packit/0.19.1-rawhide-update-pull_from_upstream
```
2023-08-28 19:44:06 +00:00

80 lines
1.7 KiB
RPMSpec

%global desc %{expand:
Python bindings for the AWS Common Runtime}
Name: python-awscrt
Version: 0.19.1
Release: %autorelease
Summary: Python bindings for the AWS Common Runtime
# All files are licensed under Apache-2.0, except:
# - crt/aws-c-common/include/aws/common/external/cJSON.h is MIT
# - crt/aws-c-common/source/external/cJSON.c is MIT
# - crt/s2n/pq-crypto/kyber_r3/KeccakP-brg_endian_avx2.h is BSD-3-Clause
License: Apache-2.0 AND MIT AND BSD-3-Clause
URL: https://github.com/awslabs/aws-crt-python
Source0: %{pypi_source awscrt}
# one test requires internet connection, skip it
Patch0: skip-test-requiring-network.patch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: openssl-devel
BuildRequires: python%{python3_pkgversion}-websockets
# https://bugzilla.redhat.com/show_bug.cgi?id=2180988
ExcludeArch: s390x
%description
%{desc}
%package -n python%{python3_pkgversion}-awscrt
Summary: %{summary}
%description -n python%{python3_pkgversion}-awscrt
%{desc}
%prep
%autosetup -p1 -n awscrt-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%ifarch %{ix86}
# disable SSE2 instructions to prevent a crash in aws-c-common thread handling
# probably caused by a compiler bug
export CFLAGS="%{optflags} -mno-sse2"
%endif
export AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files _awscrt awscrt
%check
PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{python3} -m unittest
%files -n python%{python3_pkgversion}-awscrt -f %{pyproject_files}
%doc README.md
%changelog
%autochangelog