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-build replacement #47

Closed
analog-cbarber opened this issue Sep 4, 2023 · 8 comments
Closed

conda-build replacement #47

analog-cbarber opened this issue Sep 4, 2023 · 8 comments
Assignees
Labels
new feature Entirely new feature (e.g. new subcommand)

Comments

@analog-cbarber
Copy link
Collaborator

analog-cbarber commented Sep 4, 2023

Add a new conda-build subcommand that acts as a drop-in replacement for the real conda-build
for suitable pure-python recipes.

This would:

  1. Process the jinja templates
  2. Copy the sources into a build tree like conda-build does
  3. Would change the pip install command to pip wheel to build the wheel
  4. Use whl2conda build to build the package
  5. If there is a test section, would use whl2conda install to build the environment
  6. Would run the tests
  7. If everything is fine, would use whl2conda install --conda-bld to put in build directory

There should be additional options to use whl2conda dependency renames instead of
the conda recipe dependencies.

@analog-cbarber analog-cbarber self-assigned this Sep 4, 2023
@analog-cbarber analog-cbarber added the enhancement New feature or request label Sep 4, 2023
@analog-cbarber
Copy link
Collaborator Author

We could add options to the subcommands to use information from a
conda-build recipe and also add a test subcommand and implement
the build from those parts.

@analog-cbarber analog-cbarber added new feature Entirely new feature (e.g. new subcommand) and removed enhancement New feature or request labels Sep 10, 2023
@analog-cbarber
Copy link
Collaborator Author

Should display elapsed time at the end.

@analog-cbarber
Copy link
Collaborator Author

Conda build repo is at: https://github.com/conda/conda-build

@analog-cbarber
Copy link
Collaborator Author

analog-cbarber commented Sep 10, 2023

The jinja templates and environment markers in the meta.yaml file can be rendered using
the conda_build render api: (source)

from conda_build import api
md, needs_download, needs_rerender = api.render(recipe_path)

Conda build depends on conda, so it can only be installed in the base environment, so this would have to
be run in a base environment subprocess and the rendered recipe saved in JSON or yaml format.

@analog-cbarber
Copy link
Collaborator Author

analog-cbarber commented Sep 15, 2023

There appears to be a conda render subcommand that is part of conda-build, so we should just use that.

@analog-cbarber
Copy link
Collaborator Author

analog-cbarber commented Sep 23, 2023

It appears that conda render copies the sources into conda-bld/<project-name>_<timestamp>/work and leaves it there.

@analog-cbarber
Copy link
Collaborator Author

A basic version of this feature is on main (perhaps I should have left it on a branch).

I should add tickets for remaining issues to make production ready.

@analog-cbarber
Copy link
Collaborator Author

The initial prototype has been done, so I am going to close this.

There will be other issues and a milestone track the production-ready feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Entirely new feature (e.g. new subcommand)
Projects
None yet
Development

No branches or pull requests

1 participant