Skip to content
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

[Feature Request] Private pypi repository #135

Open
horaceg opened this issue Jan 31, 2022 · 4 comments
Open

[Feature Request] Private pypi repository #135

horaceg opened this issue Jan 31, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@horaceg
Copy link

horaceg commented Jan 31, 2022

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
Copy link

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
Copy link

DevshreeG commented Apr 25, 2022

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
Copy link
Contributor

shopigarner commented Jun 27, 2022

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
Copy link
Contributor

yjeand commented Nov 29, 2022

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:

  • following these instructions, taking care to execute the command from a directory with no pyproject.toml (to make sure poetry writes to its global configuration file)
  • making a small code change in conda-lock to add a --no-pypi switch, otherwise conda-lock attempts to make requests to pypi.org (in addition to the private repo) which leads to a crash when the company proxy blocks them

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants