-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
852101e
commit e192f74
Showing
2 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -384,7 +384,34 @@ def install_prerequisite | |
|
||
# Python 3.12 doesn't have the distutils module | ||
def setup_correct_python | ||
target = '/usr/local/Cellar/glib/2.78.3/share/glib-2.0/codegen/utils.py' | ||
patch = <<~DIFF | ||
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py | ||
index 02046108dae49efb140c6438b03b80a73770d2c0..08f1ba9731d0582015ef9807eb739a3efa410e0d 100644 | ||
--- a/gio/gdbus-2.0/codegen/utils.py | ||
+++ b/gio/gdbus-2.0/codegen/utils.py | ||
@@ -19,7 +19,7 @@ | ||
# | ||
# Author: David Zeuthen <[email protected]> | ||
-import distutils.version | ||
+import packaging.version | ||
import os | ||
import sys | ||
@@ -166,4 +166,4 @@ def version_cmp_key(key): | ||
v = str(key[0]) | ||
else: | ||
v = "0" | ||
- return (distutils.version.LooseVersion(v), key[1]) | ||
+ return (packaging.version.Version(v), key[1]) | ||
DIFF | ||
|
||
Dir.chdir("/usr/local/Cellar/glib/2.78.3/share/glib-2.0") do | ||
_, status = Open3.capture2("patch", "-p3", stdin_data: patch) | ||
raise "Failed to execute 'patch' command" unless status.success? | ||
end | ||
|
||
puts `cat /usr/local/Cellar/glib/2.78.3/share/glib-2.0/codegen/utils.py` | ||
end | ||
|
||
class Qemu < Host::Qemu | ||
|