New upstream release 0.16.16
This commit is contained in:
parent
d3cc5f5085
commit
a5edb034c9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/awscrt-0.16.13.tar.gz
|
||||
/awscrt-0.16.16.tar.gz
|
||||
|
@ -3,8 +3,8 @@ Python bindings for the AWS Common Runtime}
|
||||
|
||||
|
||||
Name: python-awscrt
|
||||
Version: 0.16.13
|
||||
Release: 2%{?dist}
|
||||
Version: 0.16.16
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: Python bindings for the AWS Common Runtime
|
||||
# All files are licensed under Apache-2.0, except:
|
||||
@ -16,9 +16,6 @@ URL: https://github.com/awslabs/aws-crt-python
|
||||
|
||||
Source0: %{pypi_source awscrt}
|
||||
|
||||
# https://github.com/awslabs/aws-crt-python/pull/456
|
||||
Patch0: use-system-libcrypto.patch
|
||||
|
||||
# one test requires internet connection, skip it
|
||||
Patch1: skip-test-requiring-network.patch
|
||||
|
||||
@ -32,7 +29,7 @@ BuildRequires: openssl-devel
|
||||
BuildRequires: python%{python3_pkgversion}-websockets
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2180988
|
||||
ExcludeArch: s390x
|
||||
ExcludeArch: s390x
|
||||
|
||||
|
||||
%description
|
||||
@ -79,6 +76,9 @@ PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{py
|
||||
|
||||
|
||||
%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
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (awscrt-0.16.13.tar.gz) = 4f5d3309c2e12f64b74b264a24a3e341f9b6e03579ca0b8631ca065577b863381bc85491d7619f820ba3196961289c2ef82f5cd3cedde1e5247600de24afcdfe
|
||||
SHA512 (awscrt-0.16.16.tar.gz) = 5c94d6a33efc6000361283dc59d49a09bf7943c317fb5ef29bea3d7bc265420ae147510417fe7c0901fe71f3e5baf6235044b994a6cc03278a332c34df2b6e91
|
||||
|
@ -1,77 +0,0 @@
|
||||
diff --git a/crt/CMakeLists.txt b/crt/CMakeLists.txt
|
||||
index a2aa142..2484781 100644
|
||||
--- a/crt/CMakeLists.txt
|
||||
+++ b/crt/CMakeLists.txt
|
||||
@@ -29,10 +29,14 @@ include(CTest)
|
||||
# On Unix we use S2N for TLS and AWS-LC crypto.
|
||||
# (On Windows and Apple we use the default OS libraries)
|
||||
if(UNIX AND NOT APPLE)
|
||||
- set(DISABLE_GO ON CACHE BOOL "Build without using Go, we don't want the extra dependency")
|
||||
- set(DISABLE_PERL ON CACHE BOOL "Build without using Perl, we don't want the extra dependency")
|
||||
- set(BUILD_LIBSSL OFF CACHE BOOL "Don't need libssl, only need libcrypto")
|
||||
- add_subdirectory(aws-lc)
|
||||
+ option(USE_OPENSSL "Set this if you want to use your system's OpenSSL compatible libcrypto" OFF)
|
||||
+
|
||||
+ if(NOT USE_OPENSSL)
|
||||
+ set(DISABLE_GO ON CACHE BOOL "Build without using Go, we don't want the extra dependency")
|
||||
+ set(DISABLE_PERL ON CACHE BOOL "Build without using Perl, we don't want the extra dependency")
|
||||
+ set(BUILD_LIBSSL OFF CACHE BOOL "Don't need libssl, only need libcrypto")
|
||||
+ add_subdirectory(aws-lc)
|
||||
+ endif()
|
||||
|
||||
set(UNSAFE_TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "")
|
||||
add_subdirectory(s2n)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index e85948c..d7c6291 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -121,6 +121,10 @@ def get_cmake_path():
|
||||
raise Exception("CMake must be installed to build from source.")
|
||||
|
||||
|
||||
+def using_system_libcrypto():
|
||||
+ return os.getenv('AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO') == '1'
|
||||
+
|
||||
+
|
||||
class AwsLib:
|
||||
def __init__(self, name, extra_cmake_args=[], libname=None):
|
||||
self.name = name
|
||||
@@ -132,8 +136,9 @@ class AwsLib:
|
||||
# They're built along with the extension.
|
||||
AWS_LIBS = []
|
||||
if sys.platform != 'darwin' and sys.platform != 'win32':
|
||||
- # aws-lc produces libcrypto.a
|
||||
- AWS_LIBS.append(AwsLib('aws-lc', libname='crypto'))
|
||||
+ if not using_system_libcrypto():
|
||||
+ # aws-lc produces libcrypto.a
|
||||
+ AWS_LIBS.append(AwsLib('aws-lc', libname='crypto'))
|
||||
AWS_LIBS.append(AwsLib('s2n'))
|
||||
AWS_LIBS.append(AwsLib('aws-c-common'))
|
||||
AWS_LIBS.append(AwsLib('aws-c-sdkutils'))
|
||||
@@ -182,6 +187,9 @@ class awscrt_build_ext(setuptools.command.build_ext.build_ext):
|
||||
f'-DCMAKE_BUILD_TYPE={build_type}',
|
||||
])
|
||||
|
||||
+ if using_system_libcrypto():
|
||||
+ cmake_args.append('-DUSE_OPENSSL=ON')
|
||||
+
|
||||
if sys.platform == 'darwin':
|
||||
# build lib with same MACOSX_DEPLOYMENT_TARGET that python will ultimately
|
||||
# use to link everything together, otherwise there will be linker warnings.
|
||||
@@ -298,13 +306,13 @@ def awscrt_ext():
|
||||
extra_link_args += ['-framework', 'Security']
|
||||
|
||||
else: # unix
|
||||
- # linker will prefer shared libraries over static if it can find both.
|
||||
- # force linker to choose static variant by using using "-l:libcrypto.a" syntax instead of just "-lcrypto".
|
||||
- libraries = [':lib{}.a'.format(x) for x in libraries]
|
||||
# OpenBSD doesn't have librt; functions are found in libc instead.
|
||||
if not sys.platform.startswith('openbsd'):
|
||||
libraries += ['rt']
|
||||
|
||||
+ if using_system_libcrypto():
|
||||
+ libraries += ['crypto']
|
||||
+
|
||||
# hide the symbols from libcrypto.a
|
||||
# this prevents weird crashes if an application also ends up using
|
||||
# libcrypto.so from the system's OpenSSL installation.
|
Loading…
Reference in New Issue
Block a user