codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
245 stars 42 forks source link

Remove usage of distutils, no support for Python 3.12+ #368

Closed Oidlichtnwoada closed 11 months ago

Oidlichtnwoada commented 11 months ago

please remove the usage of distutils to support python 3.12+

from distutils.version import LooseVersion

Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.12.0/x64/bin/keychain", line 5, in from codemagic.tools import Keychain File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/codemagic/tools/init.py", line 1, in 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 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 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 from distutils.version import LooseVersion ModuleNotFoundError: No module named 'distutils' Traceback (most recent call last): File "/Users/runner/work/energy-assistant/energy-assistant/apps/energy-assistant-b2c/ios/App/../../../../scripts/build_helpers.py", line 251, in main() File "/Users/runner/work/energy-assistant/energy-assistant/apps/energy-assistant-b2c/ios/App/../../../../scripts/build_helpers.py", line 247, in main start_requested_job(args, flavor) File "/Users/runner/work/energy-assistant/energy-assistant/apps/energy-assistant-b2c/ios/App/../../../../scripts/build_helpers.py", line 234, in start_requested_job build_ios_app(args.project, flavor) File "/Users/runner/work/energy-assistant/energy-assistant/apps/energy-assistant-b2c/ios/App/../../../../scripts/build_helpers.py", line 189, in build_ios_app subprocess.run('keychain initialize', shell=True, check=True) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'keychain initialize' returned non-zero exit status 1.

priitlatt commented 11 months ago

Duplicate of #369.

priitlatt commented 11 months ago

@Oidlichtnwoada, version 0.47.0 fixes this.

Oidlichtnwoada commented 11 months ago

@priitlatt thank you very much :)