conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
470 stars 102 forks source link

[Feature Request] Private pypi repository #135

Open horaceg opened 2 years ago

horaceg commented 2 years ago

First of all, conda-lock is amazing and very convenient for prod worflows, thank you for this.

It would be useful for my use-case to add the possibility of installing pip dependencies based on a private repository.

In pyproject.toml with poetry, this is something like

[[tool.poetry.source]]
name = "private"
url = "https://.../packages/pypi/simple"
secondary = true # or false

in requirements.txt, it looks like

--extra-index-url https://.../pypi/simple
my-private-package 
DevshreeG commented 2 years ago

I was about to create similar issue to provide a place to pass index-url and extra-index-url as supported by pip. I am curious if @mariusvniekerk is considering to fix this in upcoming release.

DevshreeG commented 2 years ago

Is it as simple as parsing and passing the index-url to pypi = PyPiRepository() pool = Pool(repositories=[pypi]) as mentioned in 171

I am planning to contribute to this issue, I would like someone to provide me some guidance

shopigarner commented 2 years ago

PR #201 It's not the exact format you mention, but it should work. I think it'll even work pyproject.toml files but I've not tested it. Edit: It will not work with pyproject.toml files, but I think a simple mod would allow that if someone were willing to help me test it.

yjeand commented 1 year ago

Hello, I am facing a similar issue getting conda-lock to work behind my company proxy.

I have found workarounds to get it to work (including a small code change to conda-lock), here is what I did:

This seems to do the trick on my prototype project. I would be interested in contributing the --no-pypi change so I can switch back to the official release of conda-lock, can I do that? Or do you think it is not a good solution?