Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

pybind11

Open pcchen opened this issue 3 months ago • 3 comments

I just find out that

  • If I use `pip install', then it will automatically install pybind11 (through pip) for me if I don't have pybind11 in the system.
  • If I use cmake, then it will stop if I don't have pybind11 in the system. This behavior is a bit confusing to me. Can we also make pybind11 as an external project in cmake?

pcchen avatar Sep 05 '25 12:09 pcchen

When doing a pip install, pyproject.toml will be referenced and pybind11 is listed as a build system requirement, so it will be automatically pulled.

https://github.com/Cytnx-dev/Cytnx/blob/eac7974bd23b451e9d24bb64b67d63ee5bbca23b/pyproject.toml#L1-L3

When using Cmake directly, you need to install the pybind11 dependency. I don't think including it as an external project is a good idea.

yingjerkao avatar Sep 06 '25 13:09 yingjerkao

I see. We should probably mention this somewhere in the (new) documentation.

pcchen avatar Sep 06 '25 14:09 pcchen

I think if we plan to maintain the Python API only, we can just focus on the installation process for the Python package.

IvanaGyro avatar Sep 07 '25 06:09 IvanaGyro