Skip to content

Commit

Permalink
Merge pull request #1212 from wingtk/fix-distutils-python312
Browse files Browse the repository at this point in the history
Fix GLib Build Failure with Python 3.12
  • Loading branch information
danyeaw authored Jan 20, 2024
2 parents 2bef3f6 + 520280d commit 6801ced
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
25 changes: 25 additions & 0 deletions gvsbuild/patches/glib/python-312-distutils-to-packaging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Subject: [PATCH] Replace distutils with packaging
---
Index: gio/gdbus-2.0/codegen/utils.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
--- a/gio/gdbus-2.0/codegen/utils.py (revision e93fd4cfc39167cf0ceb9c531238d9800d3d9edb)
+++ b/gio/gdbus-2.0/codegen/utils.py (date 1705782834785)
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>

-import distutils.version
+import packaging.version
import os
import sys

@@ -166,4 +166,4 @@
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (packaging.version.Version(v), key[1])
1 change: 1 addition & 0 deletions gvsbuild/projects/glib.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(self):
],
patches=[
"glib-package-installation-directory.patch",
"python-312-distutils-to-packaging.patch",
],
)

Expand Down
2 changes: 1 addition & 1 deletion gvsbuild/projects/openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self):
self,
"openssl",
version="3.0.8",
archive_url="https://www.openssl.org/source/openssl-{version}.tar.gz",
archive_url="https://www.openssl.org/source/old/{major}.{minor}/openssl-{version}.tar.gz",
hash="6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e",
dependencies=[
"openssl-base",
Expand Down
10 changes: 0 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gvsbuild"
version = "2024.1.0"
version = "2024.1.1"
description = "GTK stack for Windows"
authors = ["Ignacio Casal Quinteiro <qignacio@amazon.com>", "Dan Yeaw <dan@yeaw.me>"]
license = "GPL-2.0-only"
Expand Down

0 comments on commit 6801ced

Please sign in to comment.