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

Show install command being run by pip and fail when pip install fails #1822

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

amadio
Copy link
Member

@amadio amadio commented Nov 8, 2022

My previous debugging of the problem was wrong, staged installations (with DESTDIR set don't work with the old patch, it only worked when I was using a branch where the version of XRootD was different than what I had installed, so pip didn't complain).

Issue: #1768

@amadio amadio changed the title Fix staged installation of Python bindings Show install command being run by pip and fail when pip install fails Nov 8, 2022
@amadio
Copy link
Member Author

amadio commented Nov 8, 2022

The "joy" of using CMake...

CMake Error at bindings/python/cmake_install.cmake:41 (EXECUTE_PROCESS):
  EXECUTE_PROCESS given unknown argument "COMMAND_ERROR_IS_FATAL".

I will check which version adds that and do it conditionally...

Edit: COMMAND_ERROR_IS_FATAL has been added only in CMake 3.19, so probably out of question to be used in XRootD, which is requiring 3.1 for now. I will find an alternative way to do it.

@simonmichal
Copy link
Contributor

@matthewfeickert : could you please have a look and share your opinion? ;-)

@amadio
Copy link
Member Author

amadio commented Nov 30, 2022

@simonmichal Can you please merge this? I'd like to see the commands in the CI so I can try to debug locally. This only shows the command being issued to install the Python bindings and returns non-zero for a make install that fails.

Copy link
Contributor

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

While I don't really see the need for this (you could just use debug flags instead) there's nothing wrong with it, so sure if this is helpful then go for it.

Not personally a fan of taking commands that span multiple lines and smushing them into 2 lines instead of clearly breaking them out as I had them before, but that's stylistic stuff that doesn't need to hold up a PR.

@amadio
Copy link
Member Author

amadio commented Nov 30, 2022

Adding --verbose still does not show the command that was invoked (i.e. python3 -m pip ..., see an example here), which is what I'd like to see to be able to run the same command out of the CI environment to reproduce the problem. The style is not so important, if @simonmichal also prefers the old formatting I can revert that part. However, failing the install if pip fails needs to go in to avoid silent failures.

@simonmichal
Copy link
Contributor

@amadio : thanks for the PR, looks good!

@simonmichal simonmichal merged commit c74b5e4 into xrootd:master Dec 2, 2022
@amadio amadio deleted the issue-1768 branch December 2, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants