Closed karthikbekalp closed 1 week ago
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Is there a change we could make to OJD that would let things work without this hack? If so, let's open an issue in its repo.
Hmm, it might not be very straightforward. Ideally if one is using site packages then it should ideally generally work unless there are differences in the versions for python. I'll see if there is an issue in OJD regardless.
What was the problem/requirement? (What/Why)
I observed that while building the Cinema 4D adaptor in Python 3.12, we would break Cinema 4D's python. This is because Cinema 4D's python was using Python 3.11 and it was failing to import modules that were compiled from Python 3.12.
What was the solution? (How)
Credits to @mwiebe for helping out with the fix. We essentially only import
deadline
andopenjd
modules that the adaptor needs.This is similar to how Maya does it: https://github.com/aws-deadline/deadline-cloud-for-maya/blob/mainline/src/deadline/maya_adaptor/MayaAdaptor/adaptor.py#L373-L383
What is the impact of this change?
Now the adaptor and Cinema 4D's python versions can be different but it would still work.
How was this change tested?
To test this was a multi-step process:
First I submitted a conda build that would use Python 3.12 for building the Cinema 4D adaptor recipe with these changes as a patch. Cinema 4D python installs the dependencies (pywin32) that it needs.
Next I submitted a simple job to a farm that used this new conda package and confirmed that everything worked as expected.
Was this change documented?
Is this a breaking change?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.