Skip to content

Optionally install build-essential during installation of Python packages #1089

@tomuben

Description

@tomuben

Background

In some build_steps we don't have the Ubuntu package build-essential installed. However, it might be needed during the installation of the Python packages (e.g. if the Python package include native code) of that build step. However, we do want to minimize the final container image size => The package build-essential must not be part of the resulting image of the build step, because manual tests showed it occupies ~50MB.
The solution is to provide a new option to the install script install_via_pip.pl. If this option is set, the install script should install build_essentials first, then install the Python packages, and finally remove build-essential.

Acceptance Criteria

Modify install_via_pip.pl:

  1. Provide a new parameter --install-build-tools-ephemerally
  2. If option is set: Install --unpinned-- version of build_essentials via apt-get install build-tools
  3. After installation of Python packages remove build-tools and pkg-config with
    a) apt-get purge build-essential
    b) apt-get autoremove

New requirment

Also install/remove pkg-config.

Metadata

Metadata

Assignees

Labels

featureProduct feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions