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

Add CMake flag PIP_OPTIONS to allow for passing specific options to pip during the install #1646

Closed
matthewfeickert opened this issue Mar 13, 2022 · 1 comment · Fixed by #1648

Comments

@matthewfeickert
Copy link
Contributor

matthewfeickert commented Mar 13, 2022

In Issue #1641 @adriansev has explained that for software maintainers installing things at the system level there can be clear reasons why one would want to install the Python bindings with the --ignore-installed pip option (e.g. https://github.com/matthewfeickert/cvmfs-venv#disadvantages) instead of the --force-reinstall option

# Use --force-reinstall to ensure a clean install if a rebuild needs to happen
install(
CODE
"EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -m pip install \
${PIP_INSTALL_VERBOSE_FLAG} \
--force-reinstall \
--prefix \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX} \
${CMAKE_CURRENT_BINARY_DIR}
)"

Instead of trying to guess what users may or may not need, he also points out that by adding a PIP_OPTIONS CMake option this would allow expert users to exactly choose what they want, making it much more adaptable to installs across the board from a local user to a system admin.

This seems like a great idea to me, that should also be easy to implement. 👍

@adriansev
Copy link
Contributor

#1647 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants