Skip to content

Commit

Permalink
pypi: Add support for Python 3.12
Browse files Browse the repository at this point in the history
- Bump manylinux docker image to first tag that contains Python 3.12

- Explicitly install the setuptools module on Windows and MacOS.
  This was needed specifically for the Python 3.12 builds on those
  platforms.

Fixes PixarAnimationStudios#3116

(Internal change: 2331983)
  • Loading branch information
sunyab authored and pixar-oss committed Jun 28, 2024
1 parent 9aeb535 commit 9f794a0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
26 changes: 24 additions & 2 deletions azure-pypi-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ stages:
Python311:
PYTHON_INTERPRETER: /opt/python/cp311-cp311/bin/python
PYTHON_TAG: cp311
Python312:
PYTHON_INTERPRETER: /opt/python/cp312-cp312/bin/python
PYTHON_TAG: cp312
timeoutInMinutes: 90
pool:
vmImage: Ubuntu-20.04
Expand Down Expand Up @@ -134,6 +137,9 @@ stages:
Python311:
PYTHON_VERSION_SPEC: 3.11
PYTHON_TAG: cp311
Python312:
PYTHON_VERSION_SPEC: 3.12
PYTHON_TAG: cp312
timeoutInMinutes: 90
pool:
vmImage: 'windows-2019'
Expand All @@ -158,7 +164,7 @@ stages:
dir D:\packaging\inst
displayName: "Creating packaging directory"
- script: |
python -m pip install wheel
python -m pip install wheel setuptools
displayName: 'Installing python packages'
- script: |
cd D:\packaging
Expand Down Expand Up @@ -197,6 +203,10 @@ stages:
PYTHON_VERSION_SPEC: 3.11
PYTHON_INTERPRETER: python3.11
PYTHON_TAG: cp311
Python312:
PYTHON_VERSION_SPEC: 3.12
PYTHON_INTERPRETER: python3.12
PYTHON_TAG: cp312
timeoutInMinutes: 180
pool:
vmImage: 'macOS-11'
Expand All @@ -210,7 +220,7 @@ stages:
$(PYTHON_INTERPRETER) build_scripts/build_usd.py --build-args USD,"-DPXR_PY_UNDEFINED_DYNAMIC_LOOKUP=ON -DPXR_BUILD_USD_TOOLS=OFF -DPXR_INSTALL_LOCATION=../pluginfo" --no-materialx --no-imaging --no-examples --no-tutorials --generator Xcode --build-target universal --build $HOME/USDgen/build --src $HOME/USDgen/src $HOME/USDinst -v
displayName: 'Building USD'
- bash: |
$(PYTHON_INTERPRETER) -m pip install delocate~=0.10.2 wheel
$(PYTHON_INTERPRETER) -m pip install delocate~=0.10.2 wheel setuptools
displayName: 'Installing python packages'
- bash: |
mkdir ./packaging
Expand Down Expand Up @@ -298,6 +308,10 @@ stages:
PYTHON_VERSION_SPEC: 3.11
IMAGE: 'Ubuntu-20.04'
PYTHON_INTERPRETER: python3
Linux_Python312:
PYTHON_VERSION_SPEC: 3.12
IMAGE: 'Ubuntu-20.04'
PYTHON_INTERPRETER: python3
Windows_Python36:
PYTHON_VERSION_SPEC: 3.6
IMAGE: 'windows-2019'
Expand All @@ -322,6 +336,10 @@ stages:
PYTHON_VERSION_SPEC: 3.11
IMAGE: 'windows-2019'
PYTHON_INTERPRETER: python
Windows_Python312:
PYTHON_VERSION_SPEC: 3.12
IMAGE: 'windows-2019'
PYTHON_INTERPRETER: python
Mac_Python36:
PYTHON_VERSION_SPEC: 3.6
IMAGE: 'macOS-11'
Expand All @@ -346,6 +364,10 @@ stages:
PYTHON_VERSION_SPEC: 3.11
IMAGE: 'macOS-11'
PYTHON_INTERPRETER: python3
Mac_Python312:
PYTHON_VERSION_SPEC: 3.12
IMAGE: 'macOS-11'
PYTHON_INTERPRETER: python3
timeoutInMinutes: 10
pool:
vmImage: '$(IMAGE)'
Expand Down
7 changes: 1 addition & 6 deletions build_scripts/pypi/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
FROM quay.io/pypa/manylinux2014_x86_64:2022-05-14-b55b680
FROM quay.io/pypa/manylinux2014_x86_64:2023-10-03-72cdc42

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en

WORKDIR /opt/USD

# XXX:
# The above manylinux2014 image contains CMake 3.22, but we require
# 3.27+ for Python 3.11 support. So we install 3.27 manually here.
RUN pipx install --force cmake==3.27.9

CMD bash
2 changes: 1 addition & 1 deletion build_scripts/pypi/package_files/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,5 @@ def windows():
"Environment :: Console",
"Topic :: Multimedia :: Graphics",
],
python_requires='>=3.6, <3.12',
python_requires='>=3.6, <3.13',
)

0 comments on commit 9f794a0

Please sign in to comment.