Big Bird 2890
Big Bird 2890

Reputation: 21

Generate Conda Package Directly Using Maturin

I was wondering if it is possible to generate a Conda package directly using Maturin.

I understand that Maturin generates a .whl file which can then be used to generate a Conda package. However, I am curious if there is a way to skip this step and automatically generate the Conda package directly using the conda-build recipe command.

I have tried using the bld.bat & build.sh scripts with the maturin build command nested inside these scripts however that seems to fail.

python_rust_project/
├── Cargo.toml
├── README.md
├── recipe/
│   ├── bld.bat
│   ├── build.sh
│   └── meta.yaml
├── src/
│   ├── lib.rs
│   └── functions.rs
├── python/
│   ├── __init__.py
│   └── example.py
└── pyproject.toml

I understand this error is not entirely helpful.

(base) %SRC_DIR%>call "C:\Users\AppData\Local\miniforge3\Scripts\..\condabin\conda.bat" activate --stack "%BUILD_PREFIX
python: can't open file 'C:\\Users\\AppData\\Local\\miniforge3\\conda-bld\\lib_1724372107656\\work\\build.sy
BuildScriptException: Command '['cmd.exe', '/d', '/c', 'conda_build.bat']' returned non-zero exit status 2.

Upvotes: 2

Views: 125

Answers (0)

Related Questions