Skip to content

Commit

Permalink
Update openssl 1.1 to 3 (#316)
Browse files Browse the repository at this point in the history
* Update openssl to 3

* openssl update 3
  • Loading branch information
aparnajyothi-y authored Nov 5, 2024
1 parent d8ae6ee commit 7069021
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions builders/macos-python-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ class macOSPythonBuilder : NixPythonBuilder {
### and then add the appropriate paths for the header and library files to configure command.
### Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
if ($this.Version -lt "3.7.0") {
$env:LDFLAGS = "-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include"
$env:LDFLAGS = "-L/usr/local/opt/openssl@3/lib -L/usr/local/opt/zlib/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@3/include -I/usr/local/opt/zlib/include"
} else {
$configureString += " --with-openssl=/usr/local/opt/openssl@1.1"
$configureString += " --with-openssl=/usr/local/opt/openssl@3"

# For Python 3.7.2 and 3.7.3 we need to provide PATH for zlib to pack it properly. Otherwise the build will fail
# with the error: zipimport.ZipImportError: can't decompress data; zlib not available
Expand Down
6 changes: 3 additions & 3 deletions tests/sources/python-config-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
if os_type == 'Darwin':
### Validate openssl links
if version_major == 3 and version_minor < 7:
expected_ldflags = '-L/usr/local/opt/openssl@1.1/lib'
expected_ldflags = '-L/usr/local/opt/openssl@3/lib'
ldflags = sysconfig.get_config_var('LDFLAGS')

if not expected_ldflags in ldflags:
print('Invalid ldflags: %s; Expected: %s' % (ldflags, expected_ldflags))
exit(1)
else:
expected_openssl_includes = '-I/usr/local/opt/openssl@1.1/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl@1.1/lib'
expected_openssl_includes = '-I/usr/local/opt/openssl@3/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl@3/lib'

openssl_includes = sysconfig.get_config_var('OPENSSL_INCLUDES')
openssl_ldflags = sysconfig.get_config_var('OPENSSL_LDFLAGS')
Expand Down

0 comments on commit 7069021

Please sign in to comment.