Skip to content

Commit

Permalink
Merge branch 'master' into glib-bump-libmount
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillikers committed Jul 15, 2024
2 parents 1f2c295 + df7edcd commit 32d42d1
Show file tree
Hide file tree
Showing 33 changed files with 824 additions and 335 deletions.
3 changes: 3 additions & 0 deletions recipes/dataframe/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.2.0":
url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.2.0.tar.gz"
sha256: "ca0c27cddf7a77da008d4b85e620e65baf5fcdf107f5e523ec38e7c55d778f7e"
"3.1.0":
url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.1.0.tar.gz"
sha256: "09280a81f17d87d171062210c904c1acd94b1cdcf4c040eaa16cc9d224d526d4"
Expand Down
2 changes: 2 additions & 0 deletions recipes/dataframe/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.2.0":
folder: all
"3.1.0":
folder: all
"3.0.0":
Expand Down
3 changes: 3 additions & 0 deletions recipes/dav1d/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.4.3":
url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.3/dav1d-1.4.3.tar.xz"
sha256: "42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19"
"1.4.1":
url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.1/dav1d-1.4.1.tar.xz"
sha256: "8d407dd5fe7986413c937b14e67f36aebd06e1fa5cfec679d10e548476f2d5f8"
Expand Down
2 changes: 2 additions & 0 deletions recipes/dav1d/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.4.3":
folder: "all"
"1.4.1":
folder: "all"
"1.3.0":
Expand Down
38 changes: 16 additions & 22 deletions recipes/glib/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
sources:
"2.81.0":
url: "https://download.gnome.org/sources/glib/2.81/glib-2.81.0.tar.xz"
sha256: "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4"
"2.78.3":
url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.3.tar.xz"
sha256: "609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21"
"2.78.1":
url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.1.tar.xz"
sha256: "915bc3d0f8507d650ead3832e2f8fb670fce59aac4d7754a7dab6f1e6fed78b2"
"2.78.0":
url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz"
sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30"
"2.77.3":
url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz"
sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61"
"2.77.2":
url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz"
sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6"
"2.77.1":
url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz"
sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03"
"2.77.0":
url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.0.tar.xz"
sha256: "1897fd8ad4ebb523c32fabe7508c3b0b039c089661ae1e7917df0956a320ac4d"
"2.76.3":
url: "https://download.gnome.org/sources/glib/2.76/glib-2.76.3.tar.xz"
sha256: "c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a"
"2.75.3":
url: "https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz"
sha256: "7c517d0aff456c35a039bce8a8df7a08ce95a8285b09d1849f8865f633f7f871"
patches:
"2.81.0":
- patch_file: "patches/dont-use-python-packaging-2.81.0.patch"
patch_type: bugfix
patch_description: replace package.version.Version by internal code
patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352
"2.78.3":
- patch_file: "patches/remove-distutils-2.77.0.patch"
patch_type: bugfix
patch_description: remove distutils
patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133
"2.76.3":
- patch_file: "patches/libintl-discovery.patch"
patch_type: bugfix
patch_description: fix libintl discovery
patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352
"2.75.3":
- patch_file: "patches/libintl-discovery-2.75.3.patch"
- patch_file: "patches/remove-distutils.patch"
patch_type: bugfix
patch_description: fix libintl discovery
patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352
patch_description: remove distutils
patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133
4 changes: 2 additions & 2 deletions recipes/glib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def requirements(self):
self.requires("libiconv/1.17")

def build_requirements(self):
self.tool_requires("meson/1.3.2")
self.tool_requires("meson/[>=1.2.3 <2]")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.1.0")
self.tool_requires("pkgconf/2.2.0")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
148 changes: 148 additions & 0 deletions recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
index 9c409e6..1913b6d 100755
--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@

# GDBus - GLib D-Bus Library
#
diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
index 67ea9f2..2ee1fc8 100644
--- a/gio/gdbus-2.0/codegen/meson.build
+++ b/gio/gdbus-2.0/codegen/meson.build
@@ -31,7 +31,7 @@ gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('MAJOR_VERSION', major_version)
gdbus_codegen_conf.set('MINOR_VERSION', minor_version)
-gdbus_codegen_conf.set('PYTHON', python.full_path())
+gdbus_codegen_conf.set('PYTHON', python_name)
gdbus_codegen_conf.set('DATADIR', glib_datadir)

# Install gdbus-codegen executable
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 6399945..86024d7 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -21,10 +21,9 @@
#
# Author: David Zeuthen <davidz@redhat.com>

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

# pylint: disable=too-few-public-methods
class Color:
@@ -161,11 +160,35 @@ def lookup_brief_docs(annotations):
def version_cmp_key(key):
# If the 'since' version is 'UNRELEASED', compare higher than anything else
# If it is empty put a 0 in its place as this will
- # allow LooseVersion to work and will always compare lower.
+ # allow _parse_version() to work and will always compare lower.
if key[0] == "UNRELEASED":
v = "9999"
elif key[0]:
v = str(key[0])
else:
v = "0"
- return (packaging.version.Version(v), key[1])
+ return (_parse_version(v), key[1])
+
+
+def _parse_version(version):
+ """
+ Parse a version string into a list of integers and strings.
+
+ This function takes a version string and breaks it down into its component parts.
+ It separates numeric and non-numeric segments, converting numeric segments to integers.
+
+ Args:
+ version (str): The version string to parse.
+
+ Returns:
+ list: A list where each element is either an integer (for numeric parts)
+ or a string (for non-numeric parts).
+
+ Example:
+ >>> parseversion("1.2.3a")
+ [1, 2, 3, 'a']
+ >>> parseversion("2.0.0-rc1")
+ [2, 0, 0, 'rc1']
+ """
+ blocks = re.findall(r"(\d+|\w+)", version)
+ return [int(b) if b.isdigit() else b for b in blocks]
diff --git a/glib/gtester-report.in b/glib/gtester-report.in
index 0745d53..b8291d2 100644
--- a/glib/gtester-report.in
+++ b/glib/gtester-report.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#! /usr/bin/env @PYTHON@
# GLib Testing Framework Utility -*- Mode: python; -*-
# Copyright (C) 2007 Imendio AB
# Authors: Tim Janik
diff --git a/glib/meson.build b/glib/meson.build
index b2dd569..5c29bb7 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -502,7 +502,7 @@ endif

report_conf = configuration_data()
report_conf.set('GLIB_VERSION', glib_version)
-report_conf.set('PYTHON', python.full_path())
+report_conf.set('PYTHON', python_name)
configure_file(
input: 'gtester-report.in',
output: 'gtester-report',
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 0578b74..aa5af43 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@

# pylint: disable=too-many-lines, missing-docstring, invalid-name

diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 7e794e9..e10b910 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@

# If the code below looks horrible and unpythonic, do not panic.
#
diff --git a/gobject/meson.build b/gobject/meson.build
index 78b732b..2129aaf 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -87,7 +87,7 @@ python_tools = [

python_tools_conf = configuration_data()
python_tools_conf.set('VERSION', glib_version)
-python_tools_conf.set('PYTHON', python.full_path())
+python_tools_conf.set('PYTHON', python_name)

foreach tool: python_tools
tool_bin = configure_file(
diff --git a/meson.build b/meson.build
index bcc2887..6cca73d 100644
--- a/meson.build
+++ b/meson.build
@@ -2457,7 +2457,9 @@ endif

glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)

-python = import('python').find_installation(modules: ['packaging'])
+python = import('python').find_installation()
+# used for '#!/usr/bin/env <name>'
+python_name = 'python3'

python_version = python.language_version()
python_version_req = '>=3.7'
49 changes: 0 additions & 49 deletions recipes/glib/all/patches/libintl-discovery-2.75.3.patch

This file was deleted.

51 changes: 51 additions & 0 deletions recipes/glib/all/patches/remove-distutils-2.77.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 0204610..f8d758c 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>

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

@@ -159,11 +159,35 @@ def lookup_brief_docs(annotations):
def version_cmp_key(key):
# If the 'since' version is 'UNRELEASED', compare higher than anything else
# If it is empty put a 0 in its place as this will
- # allow LooseVersion to work and will always compare lower.
+ # allow _parse_version() to work and will always compare lower.
if key[0] == "UNRELEASED":
v = "9999"
elif key[0]:
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (_parse_version(v), key[1])
+
+
+def _parse_version(version):
+ """
+ Parse a version string into a list of integers and strings.
+
+ This function takes a version string and breaks it down into its component parts.
+ It separates numeric and non-numeric segments, converting numeric segments to integers.
+
+ Args:
+ version (str): The version string to parse.
+
+ Returns:
+ list: A list where each element is either an integer (for numeric parts)
+ or a string (for non-numeric parts).
+
+ Example:
+ >>> parseversion("1.2.3a")
+ [1, 2, 3, 'a']
+ >>> parseversion("2.0.0-rc1")
+ [2, 0, 0, 'rc1']
+ """
+ blocks = re.findall(r"(\d+|\w+)", version)
+ return [int(b) if b.isdigit() else b for b in blocks]
Loading

0 comments on commit 32d42d1

Please sign in to comment.