Skip to content

Conversation

@4134N4
Copy link
Contributor

@4134N4 4134N4 commented Nov 19, 2025

Updated Appleseed to build with Python 3. Namely, Appleseed now builds with Python 3 with

WITH_BENCH=ON
WITH_CLIENT=ON
WITH_STUDIO=ON
WITH_TOOLS=ON
WITH_PYTHON3_BINDINGS=ON
WITH_EMBREE=ON

(and WITH_PYTHON2_BINDINGS=OFF).

This PR also includes the commits of @geckguy in PR "Updated all the python files to Python3" #2924

It was tested (CLI unit tests and runtestsuite.py) on Ubuntu 22.04 (for Python 3.10 and Python 2.7 -- checking if Python 2 bindings still worked) and on Ubuntu 24.04 (for Python 3.12).

geckguy and others added 6 commits October 30, 2025 11:10
And removed added files.
Added OpenEXR_ROOT to OCIO cmake command. Else it causes problems on on Ubuntu 24.04.
Python3 update /w geckguy branch into "default" Feat/python3 update branch.
WITH_TOOLS=ON
WITH_PYTHON2_BINDINGS=ON
WITH_PYTHON3_BINDINGS=OFF
WITH_PYTHON2_BINDINGS=OFF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does appleseed even support the Python2 bindings now? If not, the option should be completely removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appleseed should still build and work with Python 2 Bindings as before.

With the preprocessor I check

#if PY_MAJOR_VERSION == 2
    // Python 2 Compatible Code
#endif
#if PY_MAJOR_VERSION == 3
    // Python 3 Compatible Code
#endif

And in cmake I check for either WITH_PYTHON2_BINDINGS and WITH_PYTHON3_BINDINGS respectively.

I've tested this on Ubuntu 22 (where Python 2 is still supported).


So the bindings can still support Python 2. The Python scripts however only support Python 3.

@geckguy
Copy link

geckguy commented Nov 26, 2025

Thanks for taking this forward! @4134N4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants