Skip to content

Commit

Permalink
[wheel] Remove vendored libcrypt
Browse files Browse the repository at this point in the history
This library was being pushed on us by python3-config because CPython
guaranteed its availability prior to 3.13 (deprecated in 3.11).
However, Drake has never actually needed it; therefore, excise it from
the list of linked libraries so that we can stop vendoring it.
  • Loading branch information
jwnimmer-tri committed Jan 4, 2025
1 parent e97dc74 commit 5b0bfb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
8 changes: 0 additions & 8 deletions tools/wheel/image/dependencies/projects.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
if(NOT APPLE)
# libxcrypt
set(libxcrypt_version 4.4.25)
set(libxcrypt_url "https://github.com/besser82/libxcrypt/archive/v${libxcrypt_version}/libxcrypt-${libxcrypt_version}.tar.gz")
set(libxcrypt_md5 "4828b1530f5bf35af0b45b35acc4db1d")
list(APPEND ALL_PROJECTS libxcrypt)
endif()

# zlib
set(zlib_version 1.2.11)
set(zlib_url "https://github.com/madler/zlib/archive/v${zlib_version}.zip")
Expand Down
22 changes: 0 additions & 22 deletions tools/wheel/image/dependencies/projects/libxcrypt.cmake

This file was deleted.

6 changes: 6 additions & 0 deletions tools/workspace/python/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ def _get_linkopts(repo_ctx, python_config):
).stdout.strip().split(" ")
linkopts = [linkopt for linkopt in linkopts if linkopt]

# Opt-out of support for the (deprecated) _crypt module. Linking it just
# bloats our wheels for no good reason. Once Python 3.13 is our minimum
# supported version, we can remove this stanza.
if "-lcrypt" in linkopts:
linkopts.remove("-lcrypt")

# Undo whitespace splits for options with a positional argument, e.g., we
# want ["-framework CoreFoundation"] not ["-framework", "CoreFoundation"].
for i in reversed(range(len(linkopts))):
Expand Down

0 comments on commit 5b0bfb2

Please sign in to comment.