Skip to content

Conversation

raddessi
Copy link

This is a continuation of #679 which was closed because I didn't create a feature branch :/ my apologies.

Closes #398

What do you think about this version? I'm not sure where the best place to put the args at is.. either in the install command as args or in the constraints file.

Comment on lines +27 to +30

[[tool.poetry.source]]
name = "pypi-all-source2"
url = "https://pypi.python.org/all"
Copy link
Author

Choose a reason for hiding this comment

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

poetry export is not actually including this as an extra index, but that seems like an upstream issue.

Comment on lines +262 to +265
requirements_text = self.poetry.export()
constraints = to_constraints(requirements_text)
pip_args = "\n".join(to_global_pip_args(requirements_text))
path.write_text("\n".join([pip_args, constraints]))
Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure if this data should be here or sent as arguments in the install command. Thoughts?

Comment on lines +184 to +185
# args += to_global_pip_args(requirements)

Copy link
Author

Choose a reason for hiding this comment

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

This is where I had the config being injected before. I'll update this based on your opinion of how to best proceed.

@raddessi
Copy link
Author

This current setup produces a constraints file ./.nox/test/tmp/requirements.txt for the example project with contents

--index-url=https://pypi.python.org/simple
--trusted-host=pypi.python.org
first==2.0.2
pycodestyle==2.9.1; python_version >= "3.6"
pyflakes==2.5.0; python_version >= "3.6"
pygments==2.13.0; python_version >= "3.6"

I'm not sure if this index will be read correctly when in the constrains file, I will have to test that.

@MicaelJarniac
Copy link

There's now #1040 too, which seems similar to this.

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