Skip to content

Commit f2d247e

Browse files
Restore modern Python versions to CI (#2525)
This changelist restores support for modern Python versions to the GitHub CI for MaterialX, replacing a CMake call to `setup.py` with `pip install`. Additionally, the minimum Python version in our root `pyproject.toml` file has been raised from 3.6 to 3.9, aligning with the current minimum version of Python required by MaterialX.
1 parent 131d9f5 commit f2d247e

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
python: 3.9
2626
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON -DMATERIALX_BUILD_MONOLITHIC=ON
2727

28-
- name: Linux_GCC_14_Python39
28+
- name: Linux_GCC_14_Python312
2929
os: ubuntu-24.04
3030
compiler: gcc
3131
compiler_version: "14"
32-
python: 3.9
32+
python: 3.12
3333

34-
- name: Linux_GCC_14_Python311
34+
- name: Linux_GCC_14_Python313
3535
os: ubuntu-24.04
3636
compiler: gcc
3737
compiler_version: "14"
38-
python: 3.11
38+
python: 3.13
3939
test_render: ON
4040

4141
- name: Linux_GCC_CoverageAnalysis
@@ -53,32 +53,32 @@ jobs:
5353
python: 3.9
5454
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
5555

56-
- name: Linux_Clang_18_Python311
56+
- name: Linux_Clang_18_Python313
5757
os: ubuntu-24.04
5858
compiler: clang
5959
compiler_version: "18"
60-
python: 3.11
60+
python: 3.13
6161
clang_format: ON
6262

63-
- name: MacOS_Xcode_15_Python39
63+
- name: MacOS_Xcode_15_Python311
6464
os: macos-14
6565
compiler: xcode
6666
compiler_version: "15.4"
6767
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
68-
python: 3.9
68+
python: 3.11
6969

70-
- name: MacOS_Xcode_15_Python311
70+
- name: MacOS_Xcode_16_Python312
7171
os: macos-15
7272
compiler: xcode
7373
compiler_version: "16.1"
74-
python: 3.11
74+
python: 3.12
7575
test_shaders: ON
7676

77-
- name: MacOS_Xcode_16_Python311
77+
- name: MacOS_Xcode_16_Python313
7878
os: macos-15
7979
compiler: xcode
8080
compiler_version: "16.1"
81-
python: 3.11
81+
python: 3.13
8282
static_analysis: ON
8383
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
8484

@@ -103,10 +103,10 @@ jobs:
103103
python: 3.9
104104
cmake_config: -G "Visual Studio 17 2022" -A "Win32"
105105

106-
- name: Windows_VS2022_x64_Python311
106+
- name: Windows_VS2022_x64_Python313
107107
os: windows-2025
108108
architecture: x64
109-
python: 3.11
109+
python: 3.13
110110
cmake_config: -G "Visual Studio 17 2022" -A "x64"
111111
test_shaders: ON
112112

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ authors = [
1313
{ name="Contributors to the MaterialX project", email="materialx-discussion@lists.aswf.io" },
1414
]
1515
readme = "README.md"
16-
requires-python = ">=3.6"
16+
requires-python = ">=3.9"
1717

1818
classifiers = [
1919
"Programming Language :: Python :: 3",

python/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ endif()
1414
if(MATERIALX_INSTALL_PYTHON AND PYTHON_EXECUTABLE AND NOT SKBUILD)
1515
set(SETUP_PY "${CMAKE_INSTALL_PREFIX}/python/setup.py")
1616
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in" "${SETUP_PY}")
17-
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install clean --all)")
17+
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install . WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/python)")
1818
endif()

0 commit comments

Comments
 (0)