public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Alexandre Salim <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/mcrouter] epel10: Update to snapshot from 20210629
Date: Thu, 08 Oct 2026 07:36:06 GMT	[thread overview]
Message-ID: <179144496619.1.7478288221724375.rpms-mcrouter-b5843e54bb2d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/mcrouter
            Branch : epel10
            Commit : b5843e54bb2dbf050ec2536fc1f378fda389614a
            Author : Michel Alexandre Salim <salimma@fedoraproject.org>
            Date   : 2021-07-19T16:34:25-07:00
            Stats  : +143/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/mcrouter/c/b5843e54bb2dbf050ec2536fc1f378fda389614a?branch=epel10

            Log:
            Update to snapshot from 20210629
Patch out usage of distutils (deprecated in Python 3.10)

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>

---
diff --git a/mcrouter-0.41.0-no_distutils.patch b/mcrouter-0.41.0-no_distutils.patch
new file mode 100644
index 0000000..b0b7319
--- /dev/null
+++ b/mcrouter-0.41.0-no_distutils.patch
@@ -0,0 +1,139 @@
+From 0699b41e6bdaf0a63052448b36de82d1c6a32e2a Mon Sep 17 00:00:00 2001
+From: Michel Alexandre Salim <salimma@fedoraproject.org>
+Date: Mon, 19 Jul 2021 16:22:00 -0700
+Subject: [PATCH] Stop using distutils
+
+distutils is deprecated in Python 3.10 and will be removed in 3.12.
+
+Most of the usages here can be replaced by using `sysconfig`; one
+fallback no longer exists and simply has to be removed.
+
+Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
+---
+ mcrouter/m4/ax_python_devel.m4 | 49 +++++++++++++++-------------------
+ 1 file changed, 21 insertions(+), 28 deletions(-)
+
+diff --git a/mcrouter/m4/ax_python_devel.m4 b/mcrouter/m4/ax_python_devel.m4
+index ef86fcb4..da68881b 100644
+--- a/mcrouter/m4/ax_python_devel.m4
++++ b/mcrouter/m4/ax_python_devel.m4
+@@ -135,17 +135,17 @@ variable to configure. See ``configure --help'' for reference.
+ 	fi
+ 
+ 	#
+-	# Check if you have distutils, else fail
++	# Check if you have sysconfig, else fail
+ 	#
+-	AC_MSG_CHECKING([for the distutils Python package])
+-	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+-	if test -z "$ac_distutils_result"; then
++	AC_MSG_CHECKING([for the sysconfig Python library])
++	ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`
++	if test -z "$ac_sysconfig_result"; then
+ 		AC_MSG_RESULT([yes])
+ 	else
+ 		AC_MSG_RESULT([no])
+-		AC_MSG_ERROR([cannot import Python module "distutils".
++		AC_MSG_ERROR([cannot import Python module "sysconfig".
+ Please check your Python installation. The error was:
+-$ac_distutils_result])
++$ac_sysconfig_result])
+ 		PYTHON_VERSION=""
+ 	fi
+ 
+@@ -154,10 +154,10 @@ $ac_distutils_result])
+ 	#
+ 	AC_MSG_CHECKING([for Python include path])
+ 	if test -z "$PYTHON_CPPFLAGS"; then
+-		python_path=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_inc ());"`
+-		plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
++		python_path=`$PYTHON -c "import sysconfig; \
++			print (sysconfig.get_paths()[['include']]);"`
++		plat_python_path=`$PYTHON -c "import sysconfig; \
++			print (sysconfig.get_paths()[['platinclude']]);"`
+ 		if test -n "${python_path}"; then
+ 			if test "${plat_python_path}" != "${python_path}"; then
+ 				python_path="-I$python_path -I$plat_python_path"
+@@ -181,7 +181,7 @@ $ac_distutils_result])
+ 
+ # join all versioning strings, on some systems
+ # major/minor numbers could be in different list elements
+-from distutils.sysconfig import *
++from sysconfig import get_config_var
+ e = get_config_var('VERSION')
+ if e is not None:
+ 	print(e)
+@@ -204,8 +204,8 @@ EOD`
+ 		ac_python_libdir=`cat<<EOD | $PYTHON -
+ 
+ # There should be only one
+-import distutils.sysconfig
+-e = distutils.sysconfig.get_config_var('LIBDIR')
++import sysconfig
++e = sysconfig.get_config_var('LIBDIR')
+ if e is not None:
+ 	print (e)
+ EOD`
+@@ -213,8 +213,8 @@ EOD`
+ 		# Now, for the library:
+ 		ac_python_library=`cat<<EOD | $PYTHON -
+ 
+-import distutils.sysconfig
+-c = distutils.sysconfig.get_config_vars()
++import sysconfig
++c = sysconfig.get_config_vars()
+ if 'LDVERSION' in c:
+ 	print ('python'+c[['LDVERSION']])
+ else:
+@@ -230,13 +230,6 @@ EOD`
+ 			# use the official shared library
+ 			ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
+ 			PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
+-		else
+-			# old way: use libpython from python_configdir
+-			ac_python_libdir=`$PYTHON -c \
+-			  "from distutils.sysconfig import get_python_lib as f; \
+-			  import os; \
+-			  print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
+-			PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
+ 		fi
+ 
+ 		if test -z "PYTHON_LIBS"; then
+@@ -254,8 +247,8 @@ EOD`
+ 	#
+ 	AC_MSG_CHECKING([for Python site-packages path])
+ 	if test -z "$PYTHON_SITE_PKG"; then
+-		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_lib(0,0));"`
++		PYTHON_SITE_PKG=`$PYTHON -c "import sysconfig; \
++			print (sysconfig.get_paths()[['platlib']]);"`
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_SITE_PKG])
+ 	AC_SUBST([PYTHON_SITE_PKG])
+@@ -265,8 +258,8 @@ EOD`
+ 	#
+ 	AC_MSG_CHECKING(python extra libraries)
+ 	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
+-	   PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
+-                conf = distutils.sysconfig.get_config_var; \
++	   PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import sysconfig; \
++                conf = sysconfig.get_config_var; \
+                 print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
+@@ -277,8 +270,8 @@ EOD`
+ 	#
+ 	AC_MSG_CHECKING(python extra linking flags)
+ 	if test -z "$PYTHON_EXTRA_LIBS"; then
+-		PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+-			conf = distutils.sysconfig.get_config_var; \
++		PYTHON_EXTRA_LIBS=`$PYTHON -c "import sysconfig; \
++			conf = sysconfig.get_config_var; \
+ 			print (conf('LINKFORSHARED'))"`
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
+-- 
+2.31.1
+

diff --git a/mcrouter.spec b/mcrouter.spec
index 7f2ec13..c0bfacf 100644
--- a/mcrouter.spec
+++ b/mcrouter.spec
@@ -19,6 +19,8 @@ Summary:        Memcached protocol router for scaling memcached deployments
 License:        MIT
 URL:            %{forgeurl}
 Source0:        %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz
+# distutils deprecated in Python 3.10
+Patch0:         %{name}-0.41.0-no_distutils.patch
 
 # Folly is known not to work on big-endian CPUs
 # https://bugzilla.redhat.com/show_bug.cgi?id=1892151
@@ -103,8 +105,9 @@ pushd %{name}
 %{_bindir}/*
 
 %changelog
-* Mon Jul 12 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.41.0-4.20210629git67eda71
+* Mon Jul 19 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.41.0-4.20210629git67eda71
 - Update to snapshot from 20210629
+- Patch out usage of distutils (deprecated in Python 3.10)
 
 * Mon May 10 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.41.0-4.20210508git806072e
 - Update to snapshot from 20210508

             reply	other threads:[~2026-10-08  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  7:36 Michel Alexandre Salim [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-08  7:36 [rpms/mcrouter] epel10: Update to snapshot from 20210629 Michel Alexandre Salim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179144496619.1.7478288221724375.rpms-mcrouter-b5843e54bb2d@fedoraproject.org \
    --to=salimma@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox