-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix invalid header path when --root
is set
#8881
Conversation
4479542
to
7959ef5
Compare
7959ef5
to
5f2df9f
Compare
5f2df9f
to
9ed55ef
Compare
0338073
to
9b0f5df
Compare
This is ready for review. I simplified the test case to only check whether the installed files are all under the same virtual environment base installation as otherwise the test would have to account for the different locations used across platforms and interpreter implementations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK to me, however, this is touching the legacy code and I'm not 100% sure about the de-facto setuptools <-> pip contract around this area.
(anything marked with nit:
is a nitpick and doesn't need discussion/addressing unless you agree with it and making that change isn't too much work)
cf00cbb
to
51c0eec
Compare
Thanks @pradyunsg, I've updated the PR. |
@pradyunsg Do you know of anyone else who could better review the change? It would be amazing if this could be part of the next release. This issue breaks all users who rely on the |
Could you rebase this PR on the current master branch? Chris is definitely the best person I can think of. |
When we invoke setuptools with a `--root`, the header directory we take from the Scheme object already contains the root as a prefix. Passing both `--root` and `--install-headers` will result in setuptools adding the root prefix twice in the header path. As the Scheme object already has all directories relative to `--root`, we can pass these separately with the `--install-*` setuptools arguments and drop the `--root` argument. As the specific locations differ across interpreters and platforms, the included test only checks that scripts, headers and library contents are installed under the specified package root. This is not the case without the fix, as some files will be installed under the duplicated root path, outside the test `venv`.
51c0eec
to
ae31ac8
Compare
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
This PR is not relevant anymore in light of #8477 (comment). |
When we invoke setuptools with a
--root
, the header directory we takefrom the Scheme object already contains the root as a prefix. Passing
both
--root
and--install-headers
will result in setuptools addingthe root prefix twice in the header path.
As the Scheme object already has all directories relative to
--root
,we can pass these separately with the
--install-*
setuptoolsarguments and drop the
--root
argument.Closes: #8477