Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ignore] Enable from-source patchelf in wheel builds #19265

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/wheel/image/dependencies/projects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ if(NOT APPLE)
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)

# patchelf
set(patchelf_version 0.12)
set(patchelf_url "https://github.com/NixOS/patchelf/tarball/99c24238981b7b1084313aca8f5c493bb46f302c")
set(patchelf_md5 "9fa63224f9b73060ef6bd37f8effea8c")
Comment on lines +10 to +11
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to test anything, a commit has to be pushed due to the other mechanics of the build. You will need to curl -LO https://github.com/NixOS/patchelf/tarball/${commit} and get the corresponding md5sum of said artifact, otherwise the build will reject well before any errors come up.

list(APPEND ALL_PROJECTS patchelf)
endif()

# zlib
Expand Down
17 changes: 17 additions & 0 deletions tools/wheel/image/dependencies/projects/patchelf.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ExternalProject_Add(patchelf
URL ${patchelf_url}
URL_MD5 ${patchelf_md5}
${COMMON_EP_ARGS}
BUILD_IN_SOURCE 1
PATCH_COMMAND ./bootstrap.sh
CONFIGURE_COMMAND ./configure
--prefix=${CMAKE_INSTALL_PREFIX}
--disable-shared
CFLAGS=-fPIC
CXXFLAGS=-fPIC
BUILD_COMMAND make
INSTALL_COMMAND make install
)

# Note: patchelf is only used at build time, so there is no need to extract the
# license for redistribution.
4 changes: 0 additions & 4 deletions tools/wheel/image/provision-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,3 @@ pip install \
setuptools \
wheel \
auditwheel

if [[ "$(uname)" == "Linux" ]]; then
pip install patchelf
fi