Closed Doggie52 closed 4 years ago
@Doggie52, sorry I missed your message. I believe there's a way to generate the osx wheels. The issue is that I don't have a mac to test out the builds.
The general idea is quite similar to the windows and linux builds.
cmake -DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DNLOPT_GUILE=OFF \
-DNLOPT_MATLAB=OFF \
-DNLOPT_OCTAVE=OFF \
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
..
make && make install
This is done with gcc on linux. I think you can use clang for the same effect with mac.
2. Then copy the binary in <path>/<to>/lib/python<PY.VER>/site-packages/* over to the
nlopt module folder.
3. Build the package via `python setup.py bdist_wheel --python-tag cp${PY_VER} --plat-name macosx_10_9_x86_64`
You don't have to use `auditwheel`. That is a tool to convert a linux binary to manylinux binary as there are many flavours of linux.
You should be done then. While the binaries look similar, you'll have to compile a separate one for each version of python. e.g. I compile py37 and py38 separately.
@Doggie52, we've added builds for osx now
Hey, would be great to see Mac OSX support for this. I tried running
build.sh
on my machine and got to this stage:Fair enough, that may not be the intended way of generating the wheels but as there are no Mac wheels built on pypi, I suspect it's not officially supported yet.