Skip to content

Commit 705f825

Browse files
committed
Drop Boost requirement for Python-free USD; update notes
1 parent 137dbae commit 705f825

File tree

7 files changed

+95
-26
lines changed

7 files changed

+95
-26
lines changed

.github/workflows/test-linux.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
usd: ["v24.08", "v25.05"]
25-
python: ["3.10", "3.12"]
25+
python: ["", "3.10", "3.12"]
2626

27-
name: "USD-${{ matrix.usd }}-py${{ matrix.python }}"
27+
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"
2828

2929
steps:
3030
- uses: actions/checkout@v4
3131

3232
- name: Set up Python ${{ matrix.python }}
33+
if: matrix.python != ''
3334
uses: actions/setup-python@v5
3435
with:
3536
python-version: ${{ matrix.python }}
@@ -38,10 +39,14 @@ jobs:
3839
run: |
3940
sudo apt update
4041
sudo apt install -y libgtest-dev ninja-build
41-
python -m pip install -r ${{github.workspace}}/test/requirements.txt
4242
mkdir -p ${{github.workspace}}/build
4343
mkdir -p ${{runner.temp}}/USD
4444
45+
- name: Install test Python deps
46+
if: matrix.python != ''
47+
run: |
48+
python -m pip install -r ${{github.workspace}}/test/requirements.txt
49+
4550
- name: Download USD
4651
working-directory: ${{runner.temp}}/USD
4752
run: |
@@ -57,6 +62,7 @@ jobs:
5762
sed -i '/BOOST_URL/ s|\.zip"|.zip/download"|' src/build_scripts/build_usd.py
5863
5964
- name: Install USD
65+
if: matrix.python != ''
6066
working-directory: ${{runner.temp}}/USD
6167
run: |
6268
python ./src/build_scripts/build_usd.py . \
@@ -69,7 +75,23 @@ jobs:
6975
--no-materialx \
7076
-v
7177
78+
- name: Install USD (without Python)
79+
if: matrix.python == ''
80+
working-directory: ${{runner.temp}}/USD
81+
run: |
82+
python ./src/build_scripts/build_usd.py . \
83+
--no-tests \
84+
--no-examples \
85+
--no-tutorials \
86+
--no-tools \
87+
--no-docs \
88+
--no-imaging \
89+
--no-materialx \
90+
--no-python \
91+
-v
92+
7293
- name: Configure & Build
94+
if: matrix.python != ''
7395
working-directory: ${{github.workspace}}/build
7496
run: |
7597
export PYTHONPATH="${{runner.temp}}/USD/lib/python"
@@ -80,6 +102,18 @@ jobs:
80102
..
81103
cmake --build . --config Release
82104
105+
- name: Configure & Build (without Python)
106+
if: matrix.python == ''
107+
working-directory: ${{github.workspace}}/build
108+
run: |
109+
cmake \
110+
-D "BUILD_DOCS=OFF" \
111+
-D "BUILD_PYTHON_BINDINGS=OFF" \
112+
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
113+
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
114+
..
115+
cmake --build . --config Release
116+
83117
- name: Check for formatting errors
84118
working-directory: ${{github.workspace}}/build
85119
run: |

.github/workflows/test-windows.yml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,30 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
usd: ["v24.08", "v25.05.01"]
25-
python: ["3.10", "3.12"]
25+
python: ["", "3.10", "3.12"]
2626

27-
name: "USD-${{ matrix.usd }}-py${{ matrix.python }}"
27+
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"
2828

2929
steps:
3030
- uses: actions/checkout@v4
3131

3232
- name: Set up Python ${{ matrix.python }}
33+
if: matrix.python != ''
3334
uses: actions/setup-python@v5
3435
with:
3536
python-version: ${{ matrix.python }}
3637

3738
- name: Create Build Environment
3839
run: |
3940
vcpkg install --triplet=x64-windows gtest
40-
python -m pip install -r ${{github.workspace}}\test\requirements.txt
4141
cmake -E make_directory ${{github.workspace}}\build
4242
cmake -E make_directory ${{runner.temp}}\USD
4343
44+
- name: Install test Python deps
45+
if: matrix.python != ''
46+
run: |
47+
python -m pip install -r ${{github.workspace}}/test/requirements.txt
48+
4449
- name: Download USD
4550
working-directory: ${{runner.temp}}/USD
4651
shell: cmd
@@ -58,6 +63,7 @@ jobs:
5863
sed -i '/BOOST_URL/ s|\.zip"|.zip/download"|' src/build_scripts/build_usd.py
5964
6065
- name: Install USD
66+
if: matrix.python != ''
6167
working-directory: ${{runner.temp}}/USD
6268
shell: cmd
6369
run: |
@@ -75,7 +81,28 @@ jobs:
7581
--no-materialx ^
7682
-v
7783
84+
- name: Install USD (without Python)
85+
if: matrix.python == ''
86+
working-directory: ${{runner.temp}}/USD
87+
shell: cmd
88+
run: |
89+
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
90+
set VCPKG_TARGET_TRIPLET=x64-windows
91+
set CMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%/scripts/buildsystems/vcpkg.cmake
92+
python ./src/build_scripts/build_usd.py . ^
93+
--generator "Visual Studio 17 2022" ^
94+
--no-tests ^
95+
--no-examples ^
96+
--no-tutorials ^
97+
--no-tools ^
98+
--no-docs ^
99+
--no-imaging ^
100+
--no-materialx ^
101+
--no-python ^
102+
-v
103+
78104
- name: Configure & Build
105+
if: matrix.python != ''
79106
shell: bash
80107
working-directory: ${{github.workspace}}/build
81108
run: |
@@ -91,6 +118,23 @@ jobs:
91118
..
92119
cmake --build . --config Release
93120
121+
- name: Configure & Build (without Python)
122+
if: matrix.python == ''
123+
shell: bash
124+
working-directory: ${{github.workspace}}/build
125+
run: |
126+
export PATH="${{runner.temp}}/USD/bin;${{runner.temp}}/USD/lib;${PATH}"
127+
cmake \
128+
-G "Visual Studio 17 2022" -A x64 \
129+
-D "CMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" \
130+
-D "VCPKG_TARGET_TRIPLET=x64-windows" \
131+
-D "BUILD_DOCS=OFF" \
132+
-D "BUILD_PYTHON_BINDINGS=OFF" \
133+
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
134+
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
135+
..
136+
cmake --build . --config Release
137+
94138
- name: Check for formatting errors
95139
shell: bash
96140
working-directory: ${{github.workspace}}/build

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ if(BUILD_PYTHON_BINDINGS)
105105
CACHE INTERNAL "Python library path.")
106106
endif()
107107

108-
# usd::usd target always requres Boost::Boost
109-
if (NOT TARGET Boost::Boost)
110-
find_package(Boost REQUIRED)
111-
endif()
112-
113108
add_subdirectory(src)
114109

115110
if (BUILD_TESTS)

cmake/modules/FindUSD.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ if(USD_INCLUDE_DIR AND EXISTS "${USD_INCLUDE_DIR}/pxr/pxr.h")
8585
# if internal Boost.Python is not explicitly disabled
8686
if (USD_VERSION VERSION_LESS "0.25.5" OR _use_external_boost_python)
8787
set(USD_USE_INTERNAL_BOOST_PYTHON OFF CACHE INTERNAL "")
88-
list(APPEND USD_DEPENDENCIES "Boost::boost")
8988
if (BUILD_PYTHON_BINDINGS)
90-
list(APPEND USD_DEPENDENCIES "Boost::python")
89+
list(APPEND USD_DEPENDENCIES "Boost::boost" "Boost::python")
9190
endif()
9291
endif()
9392

doc/sphinx/release/release_notes.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ Release Notes
77
.. release:: 0.9.0
88
:date: Upcoming
99

10-
.. change:: changed
10+
.. change:: changed
1111

1212
Performance improvements for the Merge operation.
1313

1414
.. change:: fixed
1515

16-
Improved cmake packaging when building against a Python-free USD.
16+
Removed the :term:`Boost` dependency for OpenUSD versions prior to
17+
25.05 when Python bindings aren’t needed.
1718

1819
.. release:: 0.8.4
1920
:date: 2025-07-30

src/unf/broker.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ BrokerPtr Broker::Create(const UsdStageWeakPtr& stage)
4343
return Registry[stage];
4444
}
4545

46-
const UsdStageWeakPtr
47-
Broker::GetStage() const {
48-
return _stage;
49-
}
46+
const UsdStageWeakPtr Broker::GetStage() const { return _stage; }
5047

5148
bool Broker::IsInTransaction() { return _mergers.size() > 0; }
5249

src/unf/notice.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)
6565
{
6666
// Update resyncChanges if necessary.
6767
for (auto& path : notice._resyncChanges) {
68-
const auto iter = std::find(_resyncChanges.begin(), _resyncChanges.end(), path);
69-
if (iter == _resyncChanges.end())
70-
{
68+
const auto iter =
69+
std::find(_resyncChanges.begin(), _resyncChanges.end(), path);
70+
if (iter == _resyncChanges.end()) {
7171
_resyncChanges.emplace_back(std::move(path));
7272
}
7373
}
@@ -80,8 +80,7 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)
8080
{
8181
const auto it = std::find(
8282
_resyncChanges.begin(), _resyncChanges.end(), primPath);
83-
if (it != _resyncChanges.end())
84-
continue;
83+
if (it != _resyncChanges.end()) continue;
8584
}
8685

8786
// Skip if an ancestor of the path is already in resyncedPaths.
@@ -96,8 +95,8 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)
9695

9796
// Add infoChanges, when not already available
9897
{
99-
const auto it = std::find(
100-
_infoChanges.begin(), _infoChanges.end(), path);
98+
const auto it =
99+
std::find(_infoChanges.begin(), _infoChanges.end(), path);
101100
if (it == _infoChanges.end()) {
102101
_infoChanges.push_back(std::move(path));
103102
}

0 commit comments

Comments
 (0)