poetry icon indicating copy to clipboard operation
poetry copied to clipboard

repository source should support a file system link to a index file like pip's --index-url for usage without a web server

Open harrandt opened this issue 1 year ago • 3 comments

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

I somehow understand the discussions and reluctance here and here about pip's find-links and why it will not be added, even if this would be very useful for company repositories which don't want to maintain a webserver.

But pip --index-url allows to pass a local html file, like file:///c:/wheelhouse/simple/index.html or c:\wheelhouse\simple\index.html.

Tools like piprepo create a index.html file with links to the local file system. This might not be as convenient as 'find-links', but it serves the same purpose.

Poetry's source could be able to deal with these these local files (Simple API Repository and Single Page Link Source). A source could use the attribute path separate the use cases.

Examples for usage:

[[tool.poetry.source]]
name = "foo"
path = "file:///C:/wheelhouse/simple/index.html"

[[tool.poetry.source]]
name = "foo"
url = "C:\wheelhouse\simple\index.html"

[[tool.poetry.source]]
name = "foo"
url = "file:///C:/wheelhouse/simple/index.html"

harrandt avatar Jan 29 '24 12:01 harrandt

find-links feature request duplicates #5983 please close

dimbleby avatar Jan 29 '24 12:01 dimbleby

This feature is explicitly not about find-links but rather index-url. There is no need to iterate a directory or guess around, you get the explicit links to the packages.

harrandt avatar Jan 29 '24 14:01 harrandt

hmm, well there's existing discussion of this feature in #5983, not sure it was worth splitting

either way I don't suppose it's likely to happen unless you want to step up with a merge request.

stackoverflow suggests that it might not be so hard, suggest experimenting with something along those lines if this is something you want to see

dimbleby avatar Jan 29 '24 16:01 dimbleby