mechmotum / cyipopt

Cython interface for the interior point optimzer IPOPT
Eclipse Public License 2.0
227 stars 54 forks source link

Now picks up Windows Ipopt binary files that are adjacent to setup.py (restores regression) #220

Closed moorepants closed 11 months ago

moorepants commented 11 months ago

At some point we disabled the appveyor windows CI run that would download an official Ipopt windows release and test building against that. In our documentation it implies that you can take the contents of that Ipopt zip file and place them adjacent to the setup.py file and they'd get picked up.

https://cyipopt.readthedocs.io/en/stable/install.html#from-source-on-windows says: "After Ipopt is extracted, the bin, lib and include folders should be in the root cyipopt directory, i.e. adjacent to the setup.py file." but it seems like we removed the support for this and it isn't present here:

https://github.com/mechmotum/cyipopt/blob/master/setup.py#L187

This adds back the functionality as well as a Github action to test that it works.

moorepants commented 11 months ago

Getting this on windows:

  cyipopt/cython\ipopt_wrapper.c(760): fatal error C1083: Cannot open include file: 'IpoptConfig.h': No such file or directory
moorepants commented 11 months ago

If I use "cython<3" in the mamba install command on windows and put it in quotes bash seems to pick up the < as a bash operator. Maybe a bug in bash on windows?

moorepants commented 11 months ago

I don't understand why the windows builds in CI have been working without setting "IPOPTWINDIR=USECONDAFORGEIPOPT" before. Maybe pkg-config on Windows works?

moorepants commented 11 months ago

I don't understand why the windows builds in CI have been working without setting "IPOPTWINDIR=USECONDAFORGEIPOPT" before. Maybe pkg-config on Windows works?

Maybe it was working with conda forge ipopts that had the ipopt binary file (pkg-config) would pick it up, but now that binary is not in the windows conda forge builds, so it fails.

moorepants commented 11 months ago

Squash + merge is fine for this one. Lot's of noise trying to get CI to run.