-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Installing packages with relative paths fails -- discussion #939
Comments
/cc @vphilippon |
See #914 also |
Apologies, I just submitted a query on this issue... and didn't make the connection. The user should determine when/whether local packages should be added to the pipfile explicitly rather than automatically detecting and installing which could cause issues/complications for projects in development. The above mentioned |
* Issues - pypa#949, pypa#939, pypa#936 and to a lesser extent pypa#817 pypa#540 and more * Fixed: Local file path installation (resolves in pipfile as relative path) * Pass file:// URI to Requirements library for resolving TODO: * Ignore non-explicit directory paths lacking os.sep or ./ * Add tests
* Issues - pypa#949, pypa#939, pypa#936 and to a lesser extent pypa#817 pypa#540 and more * Fixed: Local file path installation (resolves in pipfile as relative path) * Pass file:// URI to Requirements library for resolving TODO: * Ignore non-explicit directory paths lacking os.sep or ./ * Add tests
Closing this -- resolved via #958 |
See #936 -- basically boils down to
is_file
checks for local files. This issue is to open a broader discussion for the proper way to handle checks for local files during installation. Previously we have had several issues (#817, #540 for instance) where users needed to install a local sdist in the project directory (in that case a file, properly speaking, as atar.gz
or a.zip
), and a relative path to a local directory containing a validsetup.py
(e.g.pipenv install -e ../somedirectory/
or the equivalent ofpip install -e ../...
).As a consequence we currently are mainly checking only that a path exists locally before attempting to install it as a local path, no matter whether the user supplied a preceding
./
if it is in the current / project directory (we could require this), or whether the path is a file which can be installed with pip, or, if it is a directory, if that directory contains a python package at all and if so, if it can be installed with pip.Essentially I would propose that we start the discussion with this set of options and whether they are suitable/viable:
file://
URIs, but we budged on this because pip allows local paths and because users often use this syntax. We could enforce a local path 'uri' by enforcing./
and../
syntax and asking if the user meant./path
if we find a matching one before proceedingpip install
as we are doing now, but instead of failing and pretending to succeed, we could figure out a way to fail silently and proceed to pypi or whatever repository the user has chosen. This seems like the most idiomatic approach potentially, although I'm not sure how complex the implementation is.setup.py
in any directory that matches a requested path and, if it is missing, dont bother trying to install that directory and just query the repositoryI personally am only opposed to the first option, I don't really have strong feelings on the others and could see one or any combination of those working well. There could easily be other options I'm not considering. I'd be curious to hear what others have to say
/cc @krismolendyke @kennethreitz @erinxocon @nateprewitt (when you guys have time)
The text was updated successfully, but these errors were encountered: