-
Notifications
You must be signed in to change notification settings - Fork 104
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
custom pypi repository on the local disk (file://
urls)
#536
Comments
Thanks, it would definitely be great to support this. You have thought much more deeply about this than I have. Ideally we don't implement anything that increases our dependency on Poetry. (I would like to eventually switch away from it.) The requests-file project looks nice and simple. Would the necessary patch be to reroute directories to I would be happy to consider a PR for this. |
Unfortunately yes because poetry issues a request to |
I don't think it would be problematic to vendor a patched |
I submitted #538 as a kind of draft PR |
Hi, |
Checklist
What is the idea?
Since #529 there is support for additional pip repositories. I would like to ask for support of local repositories, specified by a
file://
url like this:Why is this needed?
We require some private wheels for our repo but there is no private registry in place. The easiest thing for us seems to be to put the wheels in git lfs which available for every developer. That way we do not need to operate a private pypi service and we circumvent all the hooks with regards to authentication/user accounts.
Running
conda-lock
with afile://
url triggers an exception by requests:requests.exceptions.InvalidSchema: No connection adapters were found for 'file:///some/path/to//'
.What should happen?
For the user it should not matter if he specifies an
https://
or afile://
url. The end result should be the same assuming that both URLs are valid.Additional Context
There is the requests-file library which hooks into
requests
. Maybe conda-lock could hook that into the processing chain?The main problem I see is that conda-lock would need to ship its own version of
LegacyRepository
which then registers the file adapter for the session returned by itssession
property. A follow-up problem is that poetry issues aGET
to/some/path/to/local/repo/
(instead of/some/path/to/local/repo/index.html
) but I hope that the requests-file project might be open to accept a patch.Of course that is only my idea on how to implement this. It might be easier to write a completely custom repo provider which avoids all the
requests
functionality.The text was updated successfully, but these errors were encountered: