mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.98k stars 359 forks source link

Using conda-build with micromamba? #2412

Open abalter opened 1 year ago

abalter commented 1 year ago

Troubleshooting docs

Search tried in issue tracker

conda-build

Latest version of Mamba

Tried in Conda?

Not applicable

Describe your issue

For the question "tried in conda" I answered "Not applicable" because that's basically my question.

Can I use conda-build with mamba?

I'm using micromamba. I installed conda-build successfully.

(base) balter@spectre:~$ which conda-build
/home/balter/micromamba/bin/conda-build

However, trying to follow the conda-build manual, I get this:

(base) balter@spectre:~$ conda skeleton cran fansi
The following arguments were not expected: fansi cran skeleton
Run with --help for more information.
(base) balter@spectre:~$ conda-build skeleton cran fansi
Glob /home/balter/skeleton did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/skeleton did not match in root_dir /home/balter
Glob /home/balter/cran did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/cran did not match in root_dir /home/balter
Glob /home/balter/fansi did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/fansi did not match in root_dir /home/balter
Traceback (most recent call last):
  File "/home/balter/micromamba/bin/conda-build", line 11, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/cli/main_build.py", line 495, in main
    execute(sys.argv[1:])
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/cli/main_build.py", line 475, in execute
    outputs = api.build(
              ^^^^^^^^^^
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/api.py", line 178, in build
    raise ValueError(f'No valid recipes found for input: {recipe_paths_or_metadata}')
ValueError: No valid recipes found for input: ['skeleton', 'cran', 'fansi']

Do I have to use genuine conda to use conda-build?

mamba info / micromamba info

(base) balter@spectre:~$ micromamba info

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

            environment : base (active)
           env location : /home/balter/micromamba
      user config files : /home/balter/.mambarc
 populated config files : /home/balter/.mambarc
                          /home/balter/.condarc
       libmamba version : 1.4.0
     micromamba version : 1.4.0
           curl version : libcurl/7.88.1 OpenSSL/3.1.0 zlib/1.2.13 zstd/1.5.2 libssh2/1.10.0 nghttp2/1.52.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       virtual packages : __unix=0=0
                          __linux=5.10.102=0
                          __glibc=2.35=0
                          __archspec=1=x86_64
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
       base environment : /home/balter/micromamba
               platform : linux-64

Logs

(base) balter@spectre:~$ conda skeleton cran fansi
The following arguments were not expected: fansi cran skeleton
Run with --help for more information.
(base) balter@spectre:~$ conda-build skeleton cran fansi
Glob /home/balter/skeleton did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/skeleton did not match in root_dir /home/balter
Glob /home/balter/cran did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/cran did not match in root_dir /home/balter
Glob /home/balter/fansi did not match in root_dir /home/balter
ERROR:conda_build.utils:Glob /home/balter/fansi did not match in root_dir /home/balter
Traceback (most recent call last):
  File "/home/balter/micromamba/bin/conda-build", line 11, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/cli/main_build.py", line 495, in main
    execute(sys.argv[1:])
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/cli/main_build.py", line 475, in execute
    outputs = api.build(
              ^^^^^^^^^^
  File "/home/balter/micromamba/lib/python3.11/site-packages/conda_build/api.py", line 178, in build
    raise ValueError(f'No valid recipes found for input: {recipe_paths_or_metadata}')
ValueError: No valid recipes found for input: ['skeleton', 'cran', 'fansi']

environment.yml

(base) balter@spectre:~$ conda env export --from-history
name: base
channels:
- bioconda
- conda-forge
dependencies:
- beautifulsoup4
- bioconductor-deseq
- conda-build
- jupyterlab
- jupytext
- nb_conda_kernels
- r-blogdown
- r-bookdown
- r-distill
- r-essentials
- r-kableextra
- r-pkgdown
- r-quarto
- r-rpostgres
- r-tictoc
- r-tidytable

~/.condarc

(base) balter@spectre:~$ cat .mambarc
channels:
  - conda-forge
  - bioconda

(base) balter@spectre:~$ cat .condarc
channels:
  - conda-forge
  - bioconda
jonashaag commented 1 year ago

I don’t think Micromamba is supported just yet but you can use Mamba: https://github.com/mamba-org/boa

abalter commented 1 year ago

I happend to just see that a bit ago. But it doesn't seem to work with skeleton. I want to make a conda recipe for a cran package. There actually is one already for this package, but it's from Anaconda in the "r" channel. I was going to see if I could build it for conda-forge. https://anaconda.org/r/r-comorbidity

jaimergp commented 1 year ago

You can use grayskull for that! But I see you already started in https://github.com/conda-forge/staged-recipes/pull/22389 :)

mfansler commented 1 year ago

@jaimergp the preference for Conda Forge recipe submissions of CRAN packages is conda_r_skeleton_helper. While grayskull's R support is interesting, it is not at parity with conda_r_skeleton_helper such that using it leads to extra work for the Conda Forge R team.