From nobody Sun Dec 22 06:12:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1694451177; cv=none; d=zohomail.com; s=zohoarc; b=lvpvO9X76S+LnMDhN8xZlcLW9bUS+Atm7XY6LqwW9SY4Ps8ngEeryL0FcPiN6dy/M0QNFni/PD0mJor4B7wkqu3qyE9YfyaMeBou07APQ0cPHfFP8+vsRChKkf+QMyLYCvMylwtC6ZklBA0zSd6riB6EBdUVm1ei4lOVt7+yg4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694451177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uWR3yQmcKWDwWpf/I8JOHNwbnGjcKvY7WPldaM6ij1o=; b=UVaHrHdOZzj+63iSJUiYQ/4DIJjOKALQYRVwwKpgud18E5c0sXbiX74BcYNHBAdWIC8j9H4BRHCpEw+hAPBYYNH1L+HyQYkWukE3lOUyakIK07ZxV3+ZPbY3MfEk/vGfLO0bQ44L0R0K0beDrLkLKmO1J/bp2P3L30uiTVATPuo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1694451177053970.5163911677731; Mon, 11 Sep 2023 09:52:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.599656.935180 (Exim 4.92) (envelope-from ) id 1qfk9N-0006pZ-OT; Mon, 11 Sep 2023 16:52:37 +0000 Received: by outflank-mailman (output) from mailman id 599656.935180; Mon, 11 Sep 2023 16:52:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfk9N-0006pN-Lf; Mon, 11 Sep 2023 16:52:37 +0000 Received: by outflank-mailman (input) for mailman id 599656; Mon, 11 Sep 2023 16:52:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfk9M-0005g0-WE for xen-devel@lists.xenproject.org; Mon, 11 Sep 2023 16:52:37 +0000 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [2a00:1450:4864:20::32e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9c20fdec-50c3-11ee-8785-cb3800f73035; Mon, 11 Sep 2023 18:52:36 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40061928e5aso53549715e9.3 for ; Mon, 11 Sep 2023 09:52:36 -0700 (PDT) Received: from EMEAENG6DZjqCfH.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id b13-20020a05600c11cd00b003fefcbe7fa8sm10578124wmi.28.2023.09.11.09.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 09:52:35 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9c20fdec-50c3-11ee-8785-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1694451156; x=1695055956; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uWR3yQmcKWDwWpf/I8JOHNwbnGjcKvY7WPldaM6ij1o=; b=UnDFuBzVwIiL0zjptQVPXdQM75uq/gQ7nO34vRXYwU/AzYYCGvJxstL2dkE7X0hUlD UwbYYe6l9IbQkFG87v8PsNrq8+Dld4XRug3Q8y9UNVLJiYPT7IXBPn8WoRtc1ccQZZMO hS/1jgXyhRU2xs7nltCdCZi0I1HG3ZbX5TH3g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694451156; x=1695055956; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uWR3yQmcKWDwWpf/I8JOHNwbnGjcKvY7WPldaM6ij1o=; b=B9YOwVBAkwCSSmAdWWiL9hVZnQ5sgnJaw8XtqP6Q0hA9NEnP+aoLNodP7At2VSp1yd GmRFF1K1Y3NfOxgdek64FpswSw2A+T0cQeCvOMie+afa1O9YMvGfRavtIpAKmaY3mSV/ lrqH9mkvqBhhzwoeIcmJ8xYtmfutlw5JnfI39Ha58ZsRWnebqzwftxML8Fm2AMD8/xno J/x8dSWGXLkKVtEAYgCrD01YgjlJgLPNc5YPrnBSNnLxxaQW4CcuXRQgwHMtV0tImIsN MP6mVoXk8ka0qvezQ7kmpFFVc18WhgBNvszTIX21Nl896tADMh4fNoFJ7hRQuimX6MRy SmBA== X-Gm-Message-State: AOJu0Yx/uLnuFwlcbEodpiHYxvbiraSNT+1RoRykb18b88oJrDV+m6t+ cxHkf30tQOQCkg0QVZXl5b+AC7EYSM0/iZ8JQ20= X-Google-Smtp-Source: AGHT+IGynlsdxSx0n9nKQMoLGfszC3U0usQq/40SvyrYxDrncH8NI7OwUIA4E8qeWqIKxlIdJ/SBJA== X-Received: by 2002:a1c:ed08:0:b0:3fe:2a98:a24c with SMTP id l8-20020a1ced08000000b003fe2a98a24cmr7875975wmh.26.1694451155696; Mon, 11 Sep 2023 09:52:35 -0700 (PDT) From: Javi Merino To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , George Dunlap , Andrew Cooper , Wei Liu , Anthony PERARD , Juergen Gross Subject: [XEN PATCH v2 3/5] tools: don't use distutils in configure nor Makefile Date: Mon, 11 Sep 2023 17:51:02 +0100 Message-ID: <7b3ecf211f60e0d6f7a4d146b62f9c28eff003f5.1694450145.git.javi.merino@cloud.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1694451177844100003 From: Marek Marczykowski-G=C3=B3recki Python distutils is deprecated and is going to be removed in Python 3.12. The distutils.sysconfig is available as sysconfig module in stdlib since Python 3.2, so use that directly. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- m4/python_devel.m4 | 28 ++++++++++++++-------------- tools/libs/stat/Makefile | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/m4/python_devel.m4 b/m4/python_devel.m4 index bbf1e0354b..bb60857b03 100644 --- a/m4/python_devel.m4 +++ b/m4/python_devel.m4 @@ -5,21 +5,21 @@ ac_previous_libs=3D$LIBS AC_PATH_PROG([pyconfig], [$PYTHON-config], [no]) AS_IF([test x"$pyconfig" =3D x"no"], [ dnl For those that don't have python-config - CPPFLAGS=3D"$CFLAGS `$PYTHON -c 'import distutils.sysconfig; \ - print("-I" + distutils.sysconfig.get_config_var("INCLUDEPY"))'`" - CPPFLAGS=3D"$CPPFLAGS `$PYTHON -c 'import distutils.sysconfig; \ - print(distutils.sysconfig.get_config_var("CFLAGS"))'`" - LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ - print("-L" + distutils.sysconfig.get_python_lib(plat_specific=3D1,\ + CPPFLAGS=3D"$CFLAGS `$PYTHON -c 'import sysconfig; \ + print("-I" + sysconfig.get_config_var("INCLUDEPY"))'`" + CPPFLAGS=3D"$CPPFLAGS `$PYTHON -c 'import sysconfig; \ + print(sysconfig.get_config_var("CFLAGS"))'`" + LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import sysconfig; \ + print("-L" + sysconfig.get_python_lib(plat_specific=3D1,\ standard_lib=3D1) + "/config")'`" - LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ - print(distutils.sysconfig.get_config_var("LINKFORSHARED"))'`" - LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ - print(distutils.sysconfig.get_config_var("LDFLAGS"))'`" - LIBS=3D"$LIBS `$PYTHON -c 'import distutils.sysconfig; \ - print(distutils.sysconfig.get_config_var("LIBS"))'`" - LIBS=3D"$LIBS `$PYTHON -c 'import distutils.sysconfig; \ - print(distutils.sysconfig.get_config_var("SYSLIBS"))'`" + LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import sysconfig; \ + print(sysconfig.get_config_var("LINKFORSHARED"))'`" + LDFLAGS=3D"$LDFLAGS `$PYTHON -c 'import sysconfig; \ + print(sysconfig.get_config_var("LDFLAGS"))'`" + LIBS=3D"$LIBS `$PYTHON -c 'import sysconfig; \ + print(sysconfig.get_config_var("LIBS"))'`" + LIBS=3D"$LIBS `$PYTHON -c 'import sysconfig; \ + print(sysconfig.get_config_var("SYSLIBS"))'`" ], [ dnl If python-config is found use it CPPFLAGS=3D"$CFLAGS `$PYTHON-config --cflags`" diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index ee5c42bf7b..a968eaff48 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -73,8 +73,8 @@ $(PYLIB): $(PYSRC) python-bindings: $(PYLIB) $(PYMOD) =20 pythonlibdir =3D $(shell $(PYTHON) -c \ - 'import distutils.sysconfig as cfg; \ - print(cfg.get_python_lib(False, False, prefix=3D"$(prefix)"))') + 'import sysconfig; \ + print(sysconfig.get_python_lib("platlib", vars=3D{"platbase": "$(= prefix)"}))') =20 .PHONY: install-python-bindings install-python-bindings: $(PYLIB) $(PYMOD) --=20 2.41.0