Initial package
Resolves: RHEL-12453 Signed-off-by: Major Hayden <mhayden@redhat.com>
This commit is contained in:
parent
c54c97bb0b
commit
db63067637
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/awscrt-0.16.16.tar.gz
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
86
python-awscrt.spec
Normal file
86
python-awscrt.spec
Normal file
@ -0,0 +1,86 @@
|
||||
%global desc %{expand:
|
||||
Python bindings for the AWS Common Runtime}
|
||||
|
||||
|
||||
Name: python-awscrt
|
||||
Version: 0.16.16
|
||||
Release: 1%{?dist}
|
||||
|
||||
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
|
||||
Patch1: 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
|
||||
* Wed Apr 26 2023 Nikola Forró <nforro@redhat.com> - 0.16.16-1
|
||||
- New upstream release 0.16.16
|
||||
|
||||
* Wed Mar 22 2023 Nikola Forró <nforro@redhat.com> - 0.16.13-2
|
||||
- Workaround a crash on %%ix86
|
||||
|
||||
* Thu Mar 16 2023 Nikola Forró <nforro@redhat.com> - 0.16.13-1
|
||||
- Initial package
|
12
skip-test-requiring-network.patch
Normal file
12
skip-test-requiring-network.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/test/test_http_client.py b/test/test_http_client.py
|
||||
index 5af87b6..dd2631a 100644
|
||||
--- a/test/test_http_client.py
|
||||
+++ b/test/test_http_client.py
|
||||
@@ -347,6 +347,7 @@ class TestClient(NativeResourceTest):
|
||||
tls_connection_options=tls_conn_opt)
|
||||
return connection_future.result(self.timeout)
|
||||
|
||||
+ @unittest.skip("Requires network")
|
||||
def test_h2_client(self):
|
||||
url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt")
|
||||
connection = self._new_h2_client_connection(url)
|
Loading…
Reference in New Issue
Block a user