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

feat: use pip sources config from poetry #679

Closed
wants to merge 0 commits into from

Conversation

raddessi
Copy link

Thank you for this awesome plugin! I intend this to add the feature you had discussed in #398.

Closes #398

I have a very basic implementation of this set up here. The test suite is still running so I haven't installed and tested with my own projects yet.

I would like your feedback on implementation before I update tests and documentation, and if you could let me know how extensively you would like this tested that would be great :)

Comment on lines 99 to 101
"""Convert the pip sources in to index url args."""
# TODO: add http basic-auth to the urls generated from the poetry config?
index_args = ()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also like your thoughts on this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs here and playing with it I think poetry uses both the user keychain and a fallback file to store those creds.. that could be a big lift to implement.

@raddessi
Copy link
Author

I'm also not sure how to handle sources marked as secondary in poetry. Is it just handled via ordering on the CLI? I don't see much documentation around it online. If you can give me any insights I would appreciate it. Thanks!

@cjolowicz
Copy link
Owner

Thank you for working on this!

I would prefer an approach where we forward pip options from the requirements file generated by Poetry. This has the advantage that we don't duplicate functionality already present in poetry export. Also, it seems preferable to leave the business of interpreting Poetry configuration to Poetry itself.

What do you think?

@raddessi
Copy link
Author

I love the concept. I will have to check and see if the info is in there.. i thought it was not. Do you know of a valid format for including it in a requirements file? I was looking for that info before starting this and did not find anything, but i did not spend too long looking. I will search again

@raddessi
Copy link
Author

Oh wow, it looks like you can just include --index-url directly in the file if I'm reading https://pip.pypa.io/en/stable/reference/requirements-file-format/ correctly. I'll try to find some time to see what it would take to add this to the export file.

@raddessi
Copy link
Author

and as of poetry version 1.1.13 that index url is already included in the export file. Fantastic

@raddessi
Copy link
Author

raddessi commented Sep 13, 2022

Sorry, I had incorrectly set up my changes on main, github decided to close this PR when I had to force push to merge in the recent commits. I'll reopen this from a new branch.

EDIT: continued in #887

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 this pull request may close these issues.

Forward pip options from the exported requirements file
2 participants