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

Support conversion of .conda format with conda convert #5620

Open
2 tasks done
atteggiani opened this issue Feb 12, 2025 · 0 comments
Open
2 tasks done

Support conversion of .conda format with conda convert #5620

atteggiani opened this issue Feb 12, 2025 · 0 comments
Labels
type::feature request for a new feature or capability

Comments

@atteggiani
Copy link

atteggiani commented Feb 12, 2025

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

Overview

When trying to convert a .conda package using conda convert, I got an error similar to the following:

File "/Users/username/anaconda3/lib/python3.9/site-packages/conda_build/api.py", line 382, in convert
    raise RuntimeError("cannot convert: %s" % package_file)
RuntimeError: cannot convert: name_of_package.conda

This is also clear by looking around line 382 of the api.py source code that raised the issue:

if package_file.endswith("tar.bz2"):
return conda_convert(
package_file,
output_dir=output_dir,
show_imports=show_imports,
platforms=platforms,
force=force,
verbose=verbose,
quiet=quiet,
dry_run=dry_run,
dependencies=dependencies,
)
elif package_file.endswith(".whl"):
raise RuntimeError(
"Conversion from wheel packages is not implemented yet, stay tuned."
)
else:
raise RuntimeError(f"cannot convert: {package_file}")

There is no mention to .conda format.

Steps to reproduce the error

The error can be reproduced with any attempt to convert a .conda format built package using:

conda convert name_of_package.conda ...

Why is this needed?

Since conda-build 25.1.0 .conda is the new default package format.

Therefore, I think it would be useful to be able to use conda convert directly on a .conda format package.

What should happen?

The command:

conda convert package_name.conda ...

should successfully convert a .conda format package, as it does for the tar.bz2 format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant