Skip to content

Commit c829019

Browse files
Raise minimum Python version to 3.9 (#2326)
This changelist raises the minimum Python version in MaterialX to 3.9, allowing the integration of new releases of PyBind11 and NanoBind in the future. Previously, the minimum Python version in MaterialX was 3.6, and recent releases of PyBind11 and NanoBind no longer support Python versions before 3.8.
1 parent d43dbd9 commit c829019

5 files changed

Lines changed: 22 additions & 28 deletions

File tree

.github/workflows/main.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21-
- name: Linux_GCC_10_Python37
21+
- name: Linux_GCC_10_Python39
2222
os: ubuntu-22.04
2323
compiler: gcc
2424
compiler_version: "10"
25-
python: 3.7
25+
python: 3.9
2626
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON -DMATERIALX_BUILD_MONOLITHIC=ON
2727

2828
- name: Linux_GCC_14_Python312
@@ -46,11 +46,11 @@ jobs:
4646
coverage_analysis: ON
4747
cmake_config: -DMATERIALX_COVERAGE_ANALYSIS=ON -DMATERIALX_BUILD_RENDER=OFF -DMATERIALX_BUILD_PYTHON=OFF
4848

49-
- name: Linux_Clang_13_Python37
49+
- name: Linux_Clang_13_Python39
5050
os: ubuntu-22.04
5151
compiler: clang
5252
compiler_version: "13"
53-
python: 3.7
53+
python: 3.9
5454
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
5555

5656
- name: Linux_Clang_18_Python313
@@ -97,18 +97,11 @@ jobs:
9797
python: None
9898
cmake_config: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=`xcrun --sdk iphoneos --show-sdk-path` -DCMAKE_OSX_ARCHITECTURES=arm64
9999

100-
- name: Windows_VS2019_Win32_Python37
100+
- name: Windows_VS2019_Win32_Python39
101101
os: windows-2019
102102
architecture: x86
103-
python: 3.7
104-
cmake_config: -G "Visual Studio 16 2019" -A "Win32" -DMATERIALX_BUILD_SHARED_LIBS=ON
105-
106-
- name: Windows_VS2022_x64_Python312
107-
os: windows-2022
108-
architecture: x64
109-
python: 3.12
110-
cmake_config: -G "Visual Studio 17 2022" -A "x64"
111-
upload_shaders: ON
103+
python: 3.9
104+
cmake_config: -G "Visual Studio 16 2019" -A "Win32"
112105

113106
- name: Windows_VS2022_x64_Python313
114107
os: windows-2025
@@ -117,6 +110,13 @@ jobs:
117110
cmake_config: -G "Visual Studio 17 2022" -A "x64"
118111
test_shaders: ON
119112

113+
- name: Windows_VS2022_x64_SharedLibs
114+
os: windows-2025
115+
architecture: x64
116+
python: None
117+
cmake_config: -G "Visual Studio 17 2022" -A "x64" -DMATERIALX_BUILD_SHARED_LIBS=ON
118+
upload_shaders: ON
119+
120120
steps:
121121
- name: Sync Repository
122122
uses: actions/checkout@v4
@@ -282,7 +282,7 @@ jobs:
282282
uses: actions/upload-artifact@v4
283283
if: matrix.upload_shaders == 'ON'
284284
with:
285-
name: Reference_Shaders_${{ matrix.name }}
285+
name: MaterialX_ReferenceShaders
286286
path: build/bin/reference/
287287

288288
- name: Upload Renders
@@ -356,7 +356,7 @@ jobs:
356356

357357
sdist:
358358
name: Python SDist
359-
runs-on: ubuntu-22.04
359+
runs-on: ubuntu-24.04
360360
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
361361
outputs:
362362
sdist_filename: ${{ steps.generate.outputs.filename }}
@@ -391,8 +391,8 @@ jobs:
391391
strategy:
392392
fail-fast: false
393393
matrix:
394-
python-minor: ['7', '8', '9', '10', '11', '12']
395-
os: ['ubuntu-22.04', 'windows-2022', 'macos-14-large']
394+
python-minor: ['9', '10', '11', '12']
395+
os: ['ubuntu-24.04', 'windows-2022', 'macos-15']
396396

397397
steps:
398398
- name: Sync Repository
@@ -429,7 +429,7 @@ jobs:
429429
CIBW_BUILD_VERBOSITY: 1
430430
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
431431
# CIBW_BUILD_FRONTEND: build # https://github.com/pypa/build
432-
MACOSX_DEPLOYMENT_TARGET: '10.15'
432+
MACOSX_DEPLOYMENT_TARGET: '11.0'
433433

434434
- name: Install Wheel
435435
run: python -m pip install MaterialX --find-links wheelhouse --no-index

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ endif()
3333

3434
project(MaterialX VERSION ${MATERIALX_LIBRARY_VERSION})
3535

36-
option(MATERIALX_BUILD_PYTHON "Build the MaterialX Python package from C++ bindings. Requires Python 3.6 or greater." OFF)
36+
option(MATERIALX_BUILD_PYTHON "Build the MaterialX Python package from C++ bindings. Requires Python 3.9 or greater." OFF)
3737
option(MATERIALX_BUILD_VIEWER "Build the MaterialX Viewer." OFF)
3838
option(MATERIALX_BUILD_GRAPH_EDITOR "Build the MaterialX Graph Editor." OFF)
3939
option(MATERIALX_BUILD_DOCS "Create HTML documentation using Doxygen. Requires that Doxygen be installed." OFF)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The MaterialX codebase requires a compiler with support for C++17, and can be bu
2727
- GCC 8 or newer
2828
- Clang 5 or newer
2929

30-
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.
30+
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.9 and greater.
3131

3232
## MaterialX Viewer
3333

documents/DeveloperGuide/MainPage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The MaterialX codebase requires a compiler with support for C++17, and can be bu
1818
- GCC 8 or newer
1919
- Clang 5 or newer
2020

21-
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.
21+
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.9 and greater.
2222

2323
## Building MaterialX
2424

source/PyMaterialX/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
3535
endif()
3636
endif()
3737

38-
# Add proper postfix for Python 2.7 on Windows when using a Debug interpreter:
39-
set(MATERIALX_PYTHON_DEBUG_POSTFIX "")
40-
if(MSVC AND PYTHON_IS_DEBUG AND (PYBIND11_PYTHON_VERSION VERSION_LESS 3.0))
41-
set(MATERIALX_PYTHON_DEBUG_POSTFIX "_d")
42-
endif()
43-
4438
add_subdirectory(PyMaterialXCore)
4539
add_subdirectory(PyMaterialXFormat)
4640
if (MATERIALX_BUILD_GEN_GLSL OR MATERIALX_BUILD_GEN_OSL OR MATERIALX_BUILD_GEN_MDL OR MATERIALX_BUILD_GEN_MSL)

0 commit comments

Comments
 (0)