nlopt-python icon indicating copy to clipboard operation
nlopt-python copied to clipboard

Build for Apple M1 macs

Open cortadocodes opened this issue 1 year ago • 5 comments

Contents

  • Add macos-14 to OS matrix in build workflow so nlopt is built for Apple M1 macs too

cortadocodes avatar May 02 '24 15:05 cortadocodes

any activity on this? I also would like to see a build for M1 :)

VIPQualityPost avatar May 18 '24 03:05 VIPQualityPost

Unfortunately I haven't heard from the maintainer so I can't make any more progress on this

cortadocodes avatar May 20 '24 08:05 cortadocodes

Upvote. @DanielBok ? Can you have a quick look at this?

afedynitch avatar May 29 '24 01:05 afedynitch

I'll take a look at it

DanielBok avatar Jun 03 '24 01:06 DanielBok

I have done some investigation over the past few days to figure out what is causing these builds to fail. Looking at the logs I found two issues (1) swig not found and (2) numpy not found. I solved the swig issue by simply not installing it with pip and relying on the version installed by brew (maybe this is suboptimal, not sure). I solved the numpy issue after searching for a very long time and eventually found this issue https://github.com/numpy/numpy/issues/2434 which recommends to add numpy to setup_requires in setup.py. That indeed fixed that issue as well and I can now say that I have successfully built nlopt wheels for py310, 311 and 312 on macos-14 (arm64).

My fork is here where I have published the aforementioned wheels as well. https://github.com/jdegenstein/nlopt-python/tree/patch-1

jdegenstein avatar Jun 05 '24 13:06 jdegenstein

Hi all, sorry it took a while, just had a newborn. I added macos-14 into the build for 2.8.0, see this PR. Managed to get macos working following tips from @jdegenstein 🙏

DanielBok avatar Aug 28 '24 01:08 DanielBok

Thanks @DanielBok and congratulations!

cortadocodes avatar Aug 28 '24 09:08 cortadocodes