-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: .toml
support for creating env
#14057
Conversation
We require contributors to sign our Contributor License Agreement and we don't have one on file for @harnvo. In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#966), and ping the bot to refresh the PR. |
I feel this type of support would belong better in a Python-specific plugin like the one we are implementing at |
Thanks for your insight.
Not sure if I have understood everything correctly. "Having support for IMO, having another
I would agree having more plugin hooks is a less hacky way for implementing this feature. However, I believe the biggest problem lies in the fact that |
@conda-bot check |
These days you can install the One key aspect to remember is that I don't have a clear idea of what you are trying to achieve when you say "Add support for pyproject.toml". I can see several possible strategies:
I'm not trying to be dismissive, but I am more interested in seeing this implemented at the right level, with the right scope, and maybe as a plugin (which could be eventually be included by default as a conda dependency; being a plugin doesn't have to mean it's not part of the "core" experience). I appreciate the prototypes because the inform the conversation, I think we would benefit from discussing the scope back in the originating issue. |
Aside from the other concerns raised, I feel obliged to point out that the consensus on the python.org forums e.g. in this thread or this one is that the I.e. PyPI packages must specify their own dependencies there, as should things being built, but it should not be used to provide arbitrary lists of dependencies required to be installed in an environment to run or work on some project. PEP-735 is being worked on to provide a standardized way for precisely this, and once it's passed, maybe conda could support that in some form. But while I don't know enough about packaging for conda distribution to know how conda packages specify their own dependencies (perhaps it's also in So for now I think it is a really bad idea to try and make conda support dependency specification within Hence my suggestion in the issue you linked as to how |
I disagree with the forums; why not allow such a list to be directly installed? Deliberately unhelpful. We could have a general facility for installing a list of requirements given an arbitrary key within thing-that-can-be-parsed-as-a-dict (toml, json, yaml). "install <file.toml> --from-key tool.conda.requirements or --from-key forbidden-by-forums.requirements" |
Yeah I know, it does seem a bit pointlessly stubborn. But those discussions are settled it seems, and surely it would also be pretty deliberately unhelpful to move now, while a standardization effort is ongoing, to actively support the one way in which such lists of dependencies definitely won't be included in a |
I agree with this general idea. However, this does not solve his concern IMO.
|
Description
Fixes #10633
This is another PR to support
pyproject.toml
The code was largely taken from #12666.
My modification includes:
pyproject.toml
:This is to alleviate concerns from #12666 (comment).
pyproject.toml
from real-world projects as test cases.TODO list
requires-python
to build environmentI would like to include this feature. However, as specified by python's documentation, it's grammar is not compatible with conda.
Note that in practice most project uses either
>=x.x
,<=x.x
or==x.x
, so having support for this feat would not be problematic for most projects. So far I have never seen any python projects using grammars not handleable by conda.pyproject.toml
if conda could not findenvironment.yml
Checklist - did you ...
news
directory (using the template) for the next release's release notes?