mirror of
https://github.com/audacity/conan-recipes.git
synced 2025-12-10 03:56:47 -06:00
Fix crashpad build error with python 3.12+
This commit is contained in:
parent
9c1b5552c0
commit
20c9eb37e0
@ -90,6 +90,16 @@ class CrashpadConan(ConanFile):
|
||||
|
||||
apply_conandata_patches(self)
|
||||
|
||||
# Fix distutils import for Python 3.12+
|
||||
find_mac_sdk = os.path.join(self.source_folder, "third_party", "mini_chromium", "mini_chromium", "build", "find_mac_sdk.py")
|
||||
if os.path.exists(find_mac_sdk):
|
||||
replace_in_file(self, find_mac_sdk,
|
||||
"import distutils.version",
|
||||
"try:\n from packaging import version\n StrictVersion = version.Version\nexcept ImportError:\n from distutils import version as distutils_version\n StrictVersion = distutils_version.StrictVersion")
|
||||
replace_in_file(self, find_mac_sdk,
|
||||
"distutils.version.StrictVersion",
|
||||
"StrictVersion")
|
||||
|
||||
@property
|
||||
def _gn_os(self):
|
||||
if is_apple_os(self):
|
||||
|
||||
@ -3,3 +3,4 @@ pyyaml
|
||||
python-dotenv
|
||||
sentry-cli
|
||||
symstore
|
||||
packaging
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user