shell: /bin/bash -e {0}
env:
CERTIFICATE_PRIVATE_KEY: ***
APP_STORE_CONNECT_KEY_IDENTIFIER: ***
APP_STORE_CONNECT_ISSUER_ID: ***
APP_STORE_CONNECT_PRIVATE_KEY: ***
BUNDLE_ID: de.codingbrain.sharezone.app
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/Current/bin/app-store-connect", line 5, in <module>
from codemagic.tools import AppStoreConnect
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/codemagic/tools/__init__.py", line 1, in <module>
from .android_app_bundle import AndroidAppBundle
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/codemagic/tools/android_app_bundle.py", line 12, in <module>
from codemagic.models import AndroidSigningInfo
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/codemagic/models/__init__.py", line 6, in <module>
from .code_sign_entitlements import CodeSignEntitlements
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/codemagic/models/code_sign_entitlements.py", line 8, in <module>
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
Error: Process completed with exit code 1.
It seems like with Python 3.12 the distutils package was removed:
PEP 632: Remove the distutils package. See the migration guide for advice replacing the APIs it provided. The third-party Setuptools package continues to provide distutils, if you still require it in Python 3.12 and beyond.
For these modules or types, use the standards-defined Python Packaging Authority packages specified:
distutils.version — use the packaging package
So I guess the distutils package needs to be removed and be replaced with the packaging package.
Note: I copied the above text from the migration guide only partially - maybe there are other usages of the distutils package which need to be replaced in a different way. See the migration guide document for more information.
A current workaround for the issue is to install the third-party setuptools package (I'm still testing it out, will provide feedback if it worked for me in the near future. EDIT: Seems to be working.)
When running the following command on
macos-13
runners on GitHub...we very often face the following error:
It seems like with Python 3.12 the
distutils
package was removed:The the migration guide says the following:
So I guess the
distutils
package needs to be removed and be replaced with thepackaging
package.Note: I copied the above text from the migration guide only partially - maybe there are other usages of the
distutils
package which need to be replaced in a different way. See the migration guide document for more information.A current workaround for the issue is to install the third-party
setuptools
package (I'm still testing it out, will provide feedback if it worked for me in the near future. EDIT: Seems to be working.)