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

Conda recipe integration with pyproject.toml #178

Closed
michaelcdevin opened this issue Jan 6, 2023 · 3 comments
Closed

Conda recipe integration with pyproject.toml #178

michaelcdevin opened this issue Jan 6, 2023 · 3 comments
Assignees
Labels
CI Continuous integration (and development) upstream Related to a dependency of our package

Comments

@michaelcdevin
Copy link
Collaborator

Conda-forge has jinja2 templating allowing it to read name, version number, and dependencies from the setup.py file of a Python package into the Conda recipe meta.yaml file, allowing it to auto-populate for each release. However, WecOptTool builds from a pyproject.toml file as per PEP518 instead of a setup.py file, and conda-forge does not yet have the jinja2 templating for this, requiring us to manually update the Conda recipe with each new WecOptTool release.

It appears that pyproject.toml support was in the works last year, but there is no evidence of progress on it since June 2022.

Other users have succeeded with some workarounds with getting meta.yaml and pyproject.toml to cooperate (conda-forge/conda-forge.github.io#1174), but I am yet to have success with these.

We need to investigate whether there’s an easy workaround to automate this. Alternatively, if/when support has been added to conda-forge, we need to update our Conda recipe with the new jinja2 templating so we do not have to manually update this in the future.

@michaelcdevin michaelcdevin added the enhancement New feature or request label Jan 6, 2023
@michaelcdevin michaelcdevin self-assigned this Jan 6, 2023
@michaelcdevin
Copy link
Collaborator Author

Conda now supports loading data from poetry using the load_file_data function (see the conda-build docs), which looks like it can go a long way to do what we're looking for here. Will investigate.

@michaelcdevin
Copy link
Collaborator Author

Will be fixed in conda-forge/wecopttool-feedstock#8. Updated meta.yaml file is written, but having some issues with the conda-forge linter.

@cmichelenstrofer cmichelenstrofer added upstream Related to a dependency of our package CI Continuous integration (and development) and removed enhancement New feature or request labels Apr 15, 2023
@michaelcdevin
Copy link
Collaborator Author

As per discussion in conda-forge/wecopttool-feedstock#8, there is no easy way to implement this, and there still has not been any upstream movement on this almost two years later. Given that the Conda feedstock for WecOptTool is pretty automated at this point anyway and #388 documents what to do if you do need to a manual PR, I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration (and development) upstream Related to a dependency of our package
Projects
None yet
Development

No branches or pull requests

2 participants