Skip to content

Commit

Permalink
v14
Browse files Browse the repository at this point in the history
Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Apr 15, 2024
1 parent 2cd428d commit f500a09
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ jobs:
with:
python-version: '3.x'

- name: Setup ext environment
run: |
EXT_PATH=/usr/local
echo "EXT_PATH=$EXT_PATH" >> $GITHUB_ENV
- name: Install pybind11
run: share/ci/scripts/install_pybind11.sh 2.9.2 $EXT_PATH

- name: Create sdist
# Only create it once.
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
33 changes: 33 additions & 0 deletions share/ci/scripts/install_pybind11.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

set -ex

PYBIND11_VERSION="$1"
INSTALL_TARGET="$2"

git clone https://github.com/pybind/pybind11.git
cd pybind11

if [ "$PYBIND11_VERSION" == "latest" ]; then
LATEST_TAG=$(git describe --abbrev=0 --tags)
git checkout tags/${LATEST_TAG} -b ${LATEST_TAG}
else
git checkout tags/v${PYBIND11_VERSION} -b v${PYBIND11_VERSION}
fi

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DPYBIND11_INSTALL=ON \
-DPYBIND11_TEST=OFF \
../.
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf pybind11

0 comments on commit f500a09

Please sign in to comment.