import OL python-awscrt-0.27.2-1.el10_0

This commit is contained in:
eabdullin 2025-08-12 10:41:32 +00:00
parent e7ed64a85f
commit 3d208d1e18
7 changed files with 86 additions and 57 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
awscrt-0.23.8.tar.gz
SOURCES/awscrt-0.27.2.tar.gz

1
.python-awscrt.metadata Normal file
View File

@ -0,0 +1 @@
9951436161fdbf91db142b85d6aa208614dc2b0b SOURCES/awscrt-0.27.2.tar.gz

View File

@ -1,8 +1,8 @@
diff --git a/test/test_crypto.py b/test/test_crypto.py
index 008b164..d0acfdd 100644
index 628900f..7f2296d 100644
--- a/test/test_crypto.py
+++ b/test/test_crypto.py
@@ -192,15 +192,11 @@ class TestCredentials(NativeResourceTest):
@@ -236,15 +236,11 @@ class TestCredentials(NativeResourceTest):
def test_rsa_signing_roundtrip(self):
param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256,
@ -20,7 +20,25 @@ index 008b164..d0acfdd 100644
h.update(b'totally original test string')
digest = h.digest()
@@ -213,15 +209,11 @@ class TestCredentials(NativeResourceTest):
@@ -257,15 +253,11 @@ class TestCredentials(NativeResourceTest):
def test_rsa_signing_roundtrip_pkcs8(self):
param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256,
- RSASignatureAlgorithm.PSS_SHA256,
- RSASignatureAlgorithm.PKCS1_5_SHA1]
+ RSASignatureAlgorithm.PSS_SHA256]
for p in param_list:
with self.subTest(msg="RSA Signing Roundtrip using algo p", p=p):
- if (p == RSASignatureAlgorithm.PKCS1_5_SHA1):
- h = Hash.sha1_new()
- else:
- h = Hash.sha256_new()
+ h = Hash.sha256_new()
h.update(b'totally original test string')
digest = h.digest()
@@ -275,15 +267,11 @@ class TestCredentials(NativeResourceTest):
def test_rsa_signing_roundtrip_der(self):
param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256,

View File

@ -0,0 +1,20 @@
diff --git a/test/test_http_client.py b/test/test_http_client.py
index f79f39a..7498a96 100644
--- a/test/test_http_client.py
+++ b/test/test_http_client.py
@@ -353,6 +353,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)
@@ -375,6 +376,7 @@ class TestClient(NativeResourceTest):
self.assertEqual(None, connection.close().exception(self.timeout))
+ @unittest.skip("Requires network")
def test_h2_manual_write_exception(self):
url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt")
connection = self._new_h2_client_connection(url)

View File

@ -10,12 +10,11 @@
%global desc %{expand:
Python bindings for the AWS Common Runtime}
Name: python-awscrt
Version: 0.23.8
Version: 0.27.2
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
@ -23,71 +22,75 @@ Summary: Python bindings for the AWS Common Runtime
# - 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
# two tests are checking SHA1 support which is deprecated
Patch1: skip-testing-sha1.patch
# two tests require internet connection, skip them
Patch0: skip-tests-requiring-network.patch
# skip SHA1 in test_crypto
Patch1: skip-SHA1-in-test_crypto.patch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: openssl-devel
BuildRequires: python%{python3_pkgversion}-wheel
BuildRequires: python%{python3_pkgversion}-websockets
# https://bugzilla.redhat.com/show_bug.cgi?id=2180988
ExcludeArch: s390x
# s390x: https://bugzilla.redhat.com/show_bug.cgi?id=2180988
ExcludeArch: %{ix86} s390x
%description
%{desc}
%package -n python%{python3_pkgversion}-awscrt
Summary: %{summary}
%description -n python%{python3_pkgversion}-awscrt
%{desc}
%prep
%autosetup -p1 -n awscrt-%{version}
# relax version requirements
sed -i -e 's/setuptools>=75\.3\.1/setuptools/' -e 's/wheel>=0\.45\.1/wheel/' pyproject.toml
# stay compatible with websockets<13
sed -i 's/websockets\.asyncio\.server/websockets.server/' test/test_websocket.py
%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
## START: Generated by rpmautospec
* Tue Jul 15 2025 Kseniia Nivnia <knivnia@redhat.com> - 0.27.2-1
- Update to version 0.27.2 and revise existing patches Resolves:
RHEL-103640
* Mon Feb 24 2025 Kseniia Nivnia <knivnia@redhat.com> - 0.23.8-1
- Update to 0.23.8 and add skip-testing-sha1.patch

View File

@ -1,12 +0,0 @@
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)

View File

@ -1 +0,0 @@
SHA512 (awscrt-0.23.8.tar.gz) = c8d7b608632a3f09952172c2e3328551e76aa236af39897a392a2c674dda4e3a0fda04094b908a529fd390bf5bf088132eb644b6a4dad4e364e733e6c3e9b28a