Skip to content

feat: Packaging python wheels

Use cibuildwheel to get various linux wheels for labRemote and ship it to the pypi registry available on gitlab. This is accessible via something like

(testing) [pixdaq@itkpix-daq-05 ~]$ pip install --index-url https://gitlab.cern.ch/api/v4/projects/113080/packages/pypi/simple --no-deps labRemote
Looking in indexes: https://gitlab.cern.ch/api/v4/projects/113080/packages/pypi/simple
Collecting labRemote
  Downloading https://gitlab.cern.ch/api/v4/projects/113080/packages/pypi/files/e0e9a7ea2ed78c11dfc48b5bdecfd0d3063c9c8f2f4fc9dc5651559e1b16fe8c/labRemote-1.1.dev359%2Bg58d11cb-cp37-cp37m-manylinux2010_x86_64.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 215 kB/s 
Installing collected packages: labRemote
Successfully installed labRemote-1.1.dev359+g58d11cb
WARNING: You are using pip version 20.1.1; however, version 21.1.1 is available.
You should consider upgrading via the '/home/pixdaq/testing/bin/python3 -m pip install --upgrade pip' command.

Notes:

  • some add_subdirectory are disabled when running SKBUILD (that is, when building a python package) as we want to keep the wheel as small as possible and only include libraries that are actually being used with python bindings
  • the CI is reorganized to be a bit more efficient and fail faster when possible. All checks are performed first before builds can actually happen. The docker image and various wheels + source distribution are during the package stage.
  • deployment to pypi is done using a CI_JOB_TOKEN which means it should be deployable by anyone with developer access to the repository, so it should be ok for forks, and as long as it's merged appropriately by someone with permissions, it should work for the upstream repo.
Edited by Giordon Holtsberg Stark

Merge request reports