CyLP icon indicating copy to clipboard operation
CyLP copied to clipboard

cibuildwheel windows

Open mkoeppe opened this issue 1 year ago • 2 comments

mkoeppe avatar Oct 27 '23 03:10 mkoeppe

For the Windows wheels, we need to build with Visual Studio, which is a whole different beast. I doubt that cibuildhwheel can be used (and may not really be needed anyway, since things are actually a bit easier on Windows). Two possible ways of doing this are

  • Build Cbc more or less using the formula here,
  • Set COIN_INSTALL_DIR to the prefix of that build
  • Install micromamba, miniforge3, or the like (I guess?) and create virtual environments for each python version we want with the build package.
  • Do python -m build in each virtual environment.
  • Upload wheels to Pypi

Alternatively, we can download the pre-built Visual Studio binary from here and avoid the initial build of Cbc (there is an alpha implementation in coinbrew for downloading binaries, but maybe best to do it manually for now). This did not work for me when trying to build wheels locally on my machine because of some toolset conflict, but it will probably be fine if building the wheel on the exact same runner that Cbc was built on.

tkralphs avatar Oct 27 '23 14:10 tkralphs

Thanks a lot for the references. I'll try with the binaries.

mkoeppe avatar Oct 27 '23 17:10 mkoeppe