-
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
Check in prepare_linked_requirement for an existing directory used by --src is setuptools-specific #8333
Comments
I also suspect that So I'd agree to remove all use of that option, make it a hidden option, and warn if it is used, orienting users to |
I'm on board for deprecating |
Noting that |
Also noting so others don’t need to trace the discussion again: Unfortunately no reasons were given for why the deprecation was reversed. It was also mentioned in #906 (comment) that the feature can be adequately replaced by setting environment variables. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It would be great if someone could help with this since Pradyun has a lot to do in the next week -- @pfmoore @xavfernandez @chrahunt could one of you step up? |
@brainwane I'm not sure what the actionable item is here. The issue is saying "always use a temporary directory" but the discussion seemed to veer off into "deprecate I might be able to take a look at the former over the weekend, but I don't want to get sucked into the politics of deprecating Also, I'm not clear why this is a priority? It seems like more of a "nice to have" activity. I'll try to check the linked issues later today to see if that gives me a clue. |
@pfmoore This is already deprecated -- we basically need to remove the deprecation for this that's marked |
Not related to the above discussion, but I noticed this issue is getting into the #8368 trouble, where unsuspected users link and comment here when they see any compilation failure unrelated to the |
@uranusjr I don't think we really need to do anything on that front here, but we should keep that in mind for future deprecations. |
@pradyunsg Thanks, I'll try to check that out over the weekend. |
Great - thank you, @pfmoore, that helps a lot. |
#9049 submitted for this. It removes the Checking We should probably refactor that code at some stage so we can rip out the
I'm in favour of (1) as the simplest option, but if someone prefers (2) I'm OK with that. |
Can anybody open a master issue explaining pros and cons for deprecating PRO --build Using TMP/TEMP or TMPDIR environment variable is fine as long as it is documented in The minor argument for that is to implement a build dir management class. Right now every |
We were using Edit: I am trying now with |
What platform are you on? Different systems use different environment variables to control the temporary directory's location. |
Linux in my case. But, we should document how to do this in every environment properly. |
IIRC most Linux distros use |
fpm uses Related: jordansissel/fpm#1831 |
Closing this to consolidate into #7555. |
Okay, no, this got fixed in #10082, where this check was switched to a much more general check that is about "is this directory installable". |
Environment
Description
In
pip._internal.operations.prepare
, the methodprepare_linked_requirement
checks for a previous build directory by looking forsetup.py
. This check is setuptools-specific, and won't work for general PEP 517 backends.As a result of various refactorings, this code is only called when
--build
is specified. In all other cases, we use a temporary build directory.Expected behavior
In practice, it's not clear that there is any benefit in trying to use the build directory here. We should drop this check and just use a temporary directory, so there's no chance of a clash.
Additional discussion occurred in #8283, here and here in particular.
Update
The
--build-directory
option is now removed. This means that the only place where pip still uses aTemporaryDirectory
with an explicit pre-defined path is in support of editable installs, which are setuptools-specific. So checking forsetup.py
is acceptable in that context.Someone may wish to consider how we handle of the
--src
option at some point. This is what leads toTemporaryDirectory
needing apath
argument, and ultimately to this check, and it may be possible to refactor that code path to avoid using theTemporaryDirectory
class for something which definitely isn't temporary...When editable support is standardised, pip will need to implement the new standard. At that point, all of the code relating to editable installs will be reviewed, and this check (and the use of
TemporaryDirectory
) can be cleaned up then, if it still remains.The text was updated successfully, but these errors were encountered: