#!/bin/bash1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2# Copyright (C) 2008-2026 German Aerospace Center (DLR) and others.3# This program and the accompanying materials are made available under the4# terms of the Eclipse Public License 2.0 which is available at5# https://www.eclipse.org/legal/epl-2.0/6# This Source Code may also be made available under the following Secondary7# Licenses when the conditions for such availability set forth in the Eclipse8# Public License 2.0 are satisfied: GNU General Public License, version 29# or later which is available at10# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later1213# @file build_wheels.sh14# @author Michael Behrisch15# @date 2026-01-061617# This script builds the python wheels using cibuildwheel.18# It understands one parameter which is the docker image to use.19# If it is provided, the docker image needs to contain all dependencies and the build should work20# without access to the packages of the distribution (but still needs pypi).2122platform="auto"23if [[ $# -ge 1 && "$1" != "local" ]] ; then24export CIBW_MANYLINUX_X86_64_IMAGE=$125if [[ "$(uname)" == "Linux" ]] ; then26# on Linux we run isolated27export CIBW_BEFORE_ALL=""28export CIBW_ENVIRONMENT_PASS_LINUX="HTTP_PROXY HTTPS_PROXY"29else30platform="linux"31export CIBW_ENVIRONMENT="SKBUILD_BUILD_TOOL_ARGS=-j2"32fi33fi34cd $(dirname $0)/../..35tools/build_config/version.py --pep440 build_config/pyproject/sumolib.toml pyproject.toml36python -m build -o wheelhouse37tools/build_config/version.py --pep440 build_config/pyproject/traci.toml pyproject.toml38python -m build -o wheelhouse39tools/build_config/version.py --pep440 build_config/pyproject/eclipse-sumo.toml pyproject.toml40pipx run cibuildwheel --platform $platform41tools/build_config/version.py --pep440 build_config/pyproject/sumo-data.toml pyproject.toml42pipx run cibuildwheel --platform $platform43tools/build_config/version.py --pep440 build_config/pyproject/libsumo.toml pyproject.toml44pipx run cibuildwheel --platform $platform454647