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

Private python requirements impossible to install due to outdated requirements-parser #319

Closed
SirUli opened this issue Dec 9, 2021 · 8 comments · Fixed by #664
Closed

Comments

@SirUli
Copy link

SirUli commented Dec 9, 2021

When trying to install private python requirements the outdated library requirements-parser is in the way (Probably since it had not been

Our requirements.txt contain a couple lines in the beginning which are allowed for pip:

--index-url=https://some-host.example.com/repository/pypi-proxy/simple
--extra-index-url=https://some-host.example.com/repository/custompy/simple
--trusted-host=some-host.example.com

Both of the open PRs on that repo would fix parts of the required settings.

A couple Links on that:

Not sure which path to go but that is currently pretty much stopping us from using ansible-builder.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Dec 9, 2021
@samdoran samdoran removed the needs_triage New item that needs to be triaged label Dec 14, 2021
@eqrx
Copy link
Contributor

eqrx commented Jan 3, 2022

Hey @SirUli, sorry for the delay on this issue and thank you for the detective work. I have decided to test how dropping the dependency and would like to see if my solution fully covers you use case.

Could you provide me a more complete reproducer? Don't worry if not I would use my local scenario but I want to be sure I do not miss anything :)

Cheers

@eqrx
Copy link
Contributor

eqrx commented Jan 20, 2022

madpah/requirements-parser#62 adds the required functionality to requirements-parser. It solves the problem in my setup. @SirUli can you confirm please?

@SirUli
Copy link
Author

SirUli commented Jan 20, 2022

@eqrx sorry for my delayed reply. Yes now all is wonderful, this fixed the outstanding issue! Now it works, lovely :)

@SirUli SirUli closed this as completed Jan 20, 2022
@SirUli
Copy link
Author

SirUli commented Jan 21, 2022

@eqrx reopening - the issue is that they actually had not added the functionality but just are skipping everything that isn't "supported" and left https://github.com/madpah/requirements-parser/blob/master/requirements/parser.py#L76 which means that private repos stay unsupported.

So the change that happened is actually that the private repos are skipped with a Warning and everything still continues - which is a change but actually doesn't fulfill the original issue ;)

For the reproducer: Basically just add the lines from the top to any of your requirements.txt and check then during the build the requirements.txt that is generated (which actually misses the lines then).

@SirUli SirUli reopened this Jan 21, 2022
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Jan 21, 2022
@eqrx
Copy link
Contributor

eqrx commented Jan 22, 2022

Oh wow, that makes my reproducer look a bit sad :D Thank you for looking into it!
I will (starting monday) help working on requirements-parser for this issue and look for a mitigation for you while this is in the works.

@Shrews Shrews removed the needs_triage New item that needs to be triaged label Jan 25, 2022
@eqrx
Copy link
Contributor

eqrx commented Jan 25, 2022

@SirUli Lets wait for discussion in madpah/requirements-parser#64 and see how we can tackle this problem. Does this work for you?

@SirUli
Copy link
Author

SirUli commented Jan 25, 2022

@SirUli Lets wait for discussion in madpah/requirements-parser#64 and see how we can tackle this problem. Does this work for you?

Absolutely fine - currently this keeps us from adopting ansible-builder but we live also with the current situation. So no worries - this is a bit more tricky than I thought...

@maniac18
Copy link

@eqrx: Any update? I made a workaround by changing the generated Containerfile. Also the ansible-builder should implement this: #211. I used it for the workaround but the PIP_OPTS parameter should also be added to the install-from-bindep script in the python-builder

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

Successfully merging a pull request may close this issue.

5 participants