-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Plugins using setuptools entry points resolve to system and not setup_requires #2158
Comments
This is with setuptools 46.4.0. |
Setuptools_scm and other setuptools plugins are not intended to be installed system-wide. Why not just not do that? |
I'm not sure, but you can find out by testing with |
I had not ever seen that recommendation anywhere (I would be happy to see guidance to that effect). |
Now that I think about it, your best option is probably to use pip's build isolation to bypass system packages altogether. |
PEP517 is not really an option for us because we need to support editable installs (because the package takes a while to compile). |
I'm able to replicate the issue with:
|
Confirmed - the issue emerges at setuptools 42.
|
I've figured out the issue. When However, because constructing a This patch works around the issue:
|
I've transferred the issue to the setuptools project, as setuptools_scm is just one plugin affected. |
…r to invoking `_install_setup_requires`, broken since v42.0.0. Fixes #2158.
…r to invoking `_install_setup_requires`, broken since v42.0.0. Fixes #2158.
Released as v44.1.1 and v47.1.1. |
Thanks for the quick fix! :) |
Assume that you have e.g. setuptools_scm 3 installed system-wide, and try to to run the following setup.py:
you get the warning
(i.e. the system-wide setuptools_scm was loaded, even though it is too old). One can confirm that the "correct" newer setuptools_scm indeed doesn't get used by changing setup.py to
in which case one gets the same warning and then a traceback
I guess a solution may be e.g. to move the entry point (which is what gets eagerly loaded by setuptools) to a separate package (let's say
_setuptools_scm_helper
) which itself imports setuptools_scm only when actually needed with a pass-through shim so that setuptools only imports_setuptools_scm_helper
and then the correct version of setuptools_scm can be loaded when needed.The text was updated successfully, but these errors were encountered: