Skip to content

Commit

Permalink
Merge branch 'main' into pybindb
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed May 17, 2022
2 parents bc54978 + de23d56 commit d346f07
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ build:
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-w
-DCMAKE_CUDA_FLAGS=-w
-DCMAKE_CUDA_ARCHITECTURES="75;86"
-DACTS_BUILD_PLUGIN_EXATRKX=ON
-DACTS_BUILD_EXAMPLES_EXATRKX=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
Expand All @@ -86,7 +87,7 @@ test:
stage: test
dependencies:
- build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v22
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v23
tags:
- docker-gpu-nvidia
script:
Expand Down
3 changes: 1 addition & 2 deletions Examples/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ else()
endif()

add_custom_target(ActsPythonGlueCode)
configure_file(setup.sh.in ${_python_dir}/setup.sh COPYONLY)
configure_file(setup.sh.in ${_python_dir}/setup.sh @ONLY)
install(FILES setup.sh.in DESTINATION "python" RENAME setup.sh)


foreach(f ${py_files})
set(_target ${_python_dir}/acts/${f})
get_filename_component(_dir ${_target} DIRECTORY)
Expand Down
29 changes: 27 additions & 2 deletions Examples/Python/setup.sh.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
python_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# This file is part of the Acts project.
#
# Copyright (C) 2021-2022 CERN for the benefit of the Acts project
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

export PYTHONPATH=$python_dir:$PYTHONPATH
# This script sets up the ACTS Python bindings in the environment in a somewhat
# robust way.

if [ -n "$ZSH_VERSION" ]; then
export PYTHONPATH=${0:a:h}:$PYTHONPATH
elif [ -n "$BASH_VERSION" ]; then
python_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
export PYTHONPATH=$python_dir:$PYTHONPATH
else
# If the current shell is not ZSH or Bash, we can't guarantee that the
# script will work, so we throw an error.
echo "ERROR: neither ZSH nor Bash was detected, other shells are not supported. The environment has not been modified."
exit 1
fi

# This message might seem excessive, but the Acts bindings are only installed
# for one Python version, and it is not trivial for the user to find out which.
# Thus, we let them know explicitly so they can more easily debug any potential
# import errors.
echo "INFO: Acts Python @Python_VERSION_MAJOR@.@Python_VERSION_MINOR@ bindings setup complete."

0 comments on commit d346f07

Please sign in to comment.