Note: This is only slightly adapted from NEURONs scripts.
NMODL wheels are built in a manylinux2014 image. Since the generic docker image is very basic (CentOS 7), a new image, which brings updated cmake3 (3.12), flex and bison was prepared and made available at https://hub.docker.com/r/bluebrain/nmodl (tag: wheel).
Docker is required for building Linux wheels. You can find instructions to setup Docker on Linux here and on OS X here. On Ubuntu system we typically do:
Logout and log back in to have docker service properly configured.
For building the wheel we use the cibuilwwheel
utility, which can be installed using:
Then to build a wheel for the current platform, run:
If you have Docker installed, you can also build the Linux wheels using:
Note that, if you happen to have Podman installed instead of Docker, you can
set CIBW_CONTAINER_ENGINE=podman
to use Podman instead of Docker for this
task.
Furthermore, in order to build wheels on MacOS, you need to install an official CPython installer from python.org.
For a complete list of all available customization options for
cibuildwheel
, please consult the
documentation.
On MacOS, the testing of the wheel is launched automatically when running
cibuildwheel
. On Linux, you will need to test the wheel manually, please
see :ref:`testing-installed-module` for the instructions.
If you have changed the Dockerfile, you can build the new image as:
and then push the image to hub.docker.com as: