Open leeleavitt opened 1 year ago
Hi @leeleavitt, thanks a lot for the feedback!
this requires the user to install poetry, which cumbersome, and not required to lock non conda dependencies
Agreed.
However, conda-lock expects this config to be located at...
There have been some substantial updates to Poetry since we vendored it. It's due for an update (#310). In particular, recent versions of Poetry seem to be using user_config_path
from the platformdirs
package (as opposed to the functions from your links), which probably leads to the discrepancy you note.
However, it would be more convenient and less error-prone if conda-lock could recognize the [[tool.poetry.source]] section in the pyproject.toml file
Yes, there is some great work in this direction by @croth1-liveeo, sitting in the review queue at https://github.com/conda/conda-lock/pull/353. It would be of great help if you could check out that branch and see if it already accomplishes what you have in mind, and to provide feedback there.
Checklist
What happened?
Description:
When following the directions for setting a private repository with
Poetry
using the command (this requires the user to install poetry, which cumbersome, and not required to lock non conda dependencies):The config.toml file is created at
~/Library/Preferences/pypoetry
.However, conda-lock expects this config to be located at
~/Library/Application Support/pypoetry
(see link1, link2).As a workaround, the user can set the
POETRY_CONFIG_DIR
environment variable to~/Library/Application Support/pypoetry
as described in the Poetry documentation.However, it would be more convenient and less error-prone if
conda-lock
could recognize the [[tool.poetry.source]] section in thepyproject.toml
file, where private repository configurations are usually set:Possible Solutions:
Update conda-lock to recognize the [[tool.poetry.source]] section in pyproject.toml. Provide a conda-lock poetry-config option to set the private repository configuration. Recommend a specific version of Poetry that sets the configuration in the Application Support directory, which is the location expected by conda-lock.
Conda Info
Conda Config
Conda list
Additional Context
No response