Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/tools/build_config/build_wheels.sh
193988 views
1
#!/bin/bash
2
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
# Copyright (C) 2008-2026 German Aerospace Center (DLR) and others.
4
# This program and the accompanying materials are made available under the
5
# terms of the Eclipse Public License 2.0 which is available at
6
# https://www.eclipse.org/legal/epl-2.0/
7
# This Source Code may also be made available under the following Secondary
8
# Licenses when the conditions for such availability set forth in the Eclipse
9
# Public License 2.0 are satisfied: GNU General Public License, version 2
10
# or later which is available at
11
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
14
# @file build_wheels.sh
15
# @author Michael Behrisch
16
# @date 2026-01-06
17
18
# This script builds the python wheels using cibuildwheel.
19
# It understands one parameter which is the docker image to use.
20
# If it is provided, the docker image needs to contain all dependencies and the build should work
21
# without access to the packages of the distribution (but still needs pypi).
22
23
platform="auto"
24
if [[ $# -ge 1 && "$1" != "local" ]] ; then
25
export CIBW_MANYLINUX_X86_64_IMAGE=$1
26
if [[ "$(uname)" == "Linux" ]] ; then
27
# on Linux we run isolated
28
export CIBW_BEFORE_ALL=""
29
export CIBW_ENVIRONMENT_PASS_LINUX="HTTP_PROXY HTTPS_PROXY"
30
else
31
platform="linux"
32
export CIBW_ENVIRONMENT="SKBUILD_BUILD_TOOL_ARGS=-j2"
33
fi
34
fi
35
cd $(dirname $0)/../..
36
tools/build_config/version.py --pep440 build_config/pyproject/sumolib.toml pyproject.toml
37
python -m build -o wheelhouse
38
tools/build_config/version.py --pep440 build_config/pyproject/traci.toml pyproject.toml
39
python -m build -o wheelhouse
40
tools/build_config/version.py --pep440 build_config/pyproject/eclipse-sumo.toml pyproject.toml
41
pipx run cibuildwheel --platform $platform
42
tools/build_config/version.py --pep440 build_config/pyproject/sumo-data.toml pyproject.toml
43
pipx run cibuildwheel --platform $platform
44
tools/build_config/version.py --pep440 build_config/pyproject/libsumo.toml pyproject.toml
45
pipx run cibuildwheel --platform $platform
46
47