From patchwork Wed Nov 2 14:00:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13028154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 957F7C43217 for ; Wed, 2 Nov 2022 14:01:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbiKBOBX (ORCPT ); Wed, 2 Nov 2022 10:01:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbiKBOA6 (ORCPT ); Wed, 2 Nov 2022 10:00:58 -0400 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3AE464EF for ; Wed, 2 Nov 2022 07:00:44 -0700 (PDT) Received: by mail-qk1-x72d.google.com with SMTP id l9so11727181qkk.11 for ; Wed, 02 Nov 2022 07:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=kqDtXeFfWv2gZhDvQ4womtLYb+MTsxI4bWvw4H/ch84=; b=mAr0tvyFlIeiabYazfKYJoTrABSThe5+eYLaLG4bqCj03smD1r5SmVHlmxNlgMIHJP eXPXKCUzzeBDKoPofB9HTe4JbggJS6Haron8NB1KR+pvpoG97Wdos+rVfCVGme8DZRn1 e5fye2iIaGCNmcXaLmFmKTaD5sle7sxD5eAa4ER+SEXMPWz7awafEXSvU8rpKERgcDfG ItXj+AXKmQ7n+vn/v8sX0QUTVuQn/Z53YjOJLr7z9Uv/LEycybqp6S8NAx+/XKt3ZSn/ 3ljiGf3qhDhu/VPEAUhajgiQjKLUuGYVCLM4YWqDG2nNyT8wVJ3qsZLwyEVaXMZuAlYn 69JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=kqDtXeFfWv2gZhDvQ4womtLYb+MTsxI4bWvw4H/ch84=; b=U+ZTOUduGd5E5csBqCYsEurPde/PulY65EjxY6WT43582HfBo793CDAX/ifdOAPwBA 0j9gkxxbGkFypL8dtgmcz1kqv0MomBEFnMDUkqQb9MEf4hsCWAiwbl+x3T7qrV5pd2Dd FFV3x+erPctS+OwSZp20hWrpgK41zuOPQAtz0ilGMLnjIUzKKh+yn5KcwdxUya4KLjVM /ujYFsxKvMpmdF/lX14lZ0VTStjImmvziQ9T/WY9Ev6PFppYJ6rh2X5BZQvba5XePPiE x92spzLVjUZqzDVqKJ2gtitDavhEfqHN7COJY/pj6bGkek+ztYGN/TtrKrf53BJyys7B ljow== X-Gm-Message-State: ACrzQf0PuNZoDGTIFi8qSSpT0tiQhpZNCNxaV6Ku6FeZc5UIUibE+XRf pi0U5TEuIbOtu/3SPOKMqG3lE5hR06g= X-Google-Smtp-Source: AMsMyM7OzM/2a8mqBQLhkzAd1aUaMalinHOXYi5ss+n+E+Hq2NLPRlgVxey1TpbZomrYTW+koPy/7g== X-Received: by 2002:a05:620a:132e:b0:6fa:5082:f870 with SMTP id p14-20020a05620a132e00b006fa5082f870mr5279442qkj.391.1667397643629; Wed, 02 Nov 2022 07:00:43 -0700 (PDT) Received: from electric.. (c-73-200-155-132.hsd1.md.comcast.net. [73.200.155.132]) by smtp.gmail.com with ESMTPSA id q6-20020a37f706000000b006ce0733caebsm8449846qkj.14.2022.11.02.07.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:00:42 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 1/5 v2] libselinux: Remove dependency on the Python module distutils Date: Wed, 2 Nov 2022 10:00:35 -0400 Message-Id: <20221102140039.914518-2-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102140039.914518-1-jwcart2@gmail.com> References: <20221102140039.914518-1-jwcart2@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org The distutils package is deprecated and scheduled to be removed in Python 3.12. Use the setuptools and sysconfig modules instead. Signed-off-by: James Carter --- libselinux/src/Makefile | 2 +- libselinux/src/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 49b7d60a..dc284832 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -14,7 +14,7 @@ SHLIBDIR ?= /lib INCLUDEDIR ?= $(PREFIX)/include PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) -PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))") +PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") PYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])') RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') diff --git a/libselinux/src/setup.py b/libselinux/src/setup.py index 71e69a10..6cbe3a0e 100644 --- a/libselinux/src/setup.py +++ b/libselinux/src/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -from distutils.core import Extension, setup +from setuptools import Extension, setup setup( name="selinux", From patchwork Wed Nov 2 14:00:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13028156 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E978C433FE for ; Wed, 2 Nov 2022 14:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbiKBOBZ (ORCPT ); Wed, 2 Nov 2022 10:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231287AbiKBOA7 (ORCPT ); Wed, 2 Nov 2022 10:00:59 -0400 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13AB6DFED for ; Wed, 2 Nov 2022 07:00:45 -0700 (PDT) Received: by mail-qk1-x72d.google.com with SMTP id 8so11749997qka.1 for ; Wed, 02 Nov 2022 07:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=VJgLaJIHQwsJdTBM+S8HMlIfnDte9qMBTNt2CXSUjDg=; b=mGIxBPssMn8sXzUhHSoWFBhwxO+z+AMcOa3zZLPXv6wbBZMvhB0zG4MO7SRaPezpfT ptiQeW2gmH/B5toP8FQ9399wbM7me1INTcdNgPgjKg7GndoUaS/TVZtNknaE13uhQddR HzFasS4demOM9mQqBKjcC8KEOPglloDiBlZ6nUCz5e0UIQRHwcv2QZaxj83NtwT07PD+ +40iw4ygNBcmMMcgAjcTafR68/1pDcrVRaLxhG5+aq2RlmGJdDENNlKIbiORyJ470ybM 2LxxssE+7GouRjGlCZhD89HN1QMFxMgefa5iGrGVOWfMyYI4phlqXqgx/4AodRTQ22mm 468w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=VJgLaJIHQwsJdTBM+S8HMlIfnDte9qMBTNt2CXSUjDg=; b=EYolX2S7pPUrvphQSZz4G0ICwdGF0o/RGLa4IhujnM4uSZrjQk5ydlJcdyXJDipvnx M0/k5fI30+DsYc/mYr155bgsSJdrOcl0izkBnUO7AQthpcjWrFJIp3ifeEj5ddQ7gn+t VsggZ8yjyrm3BZTswTsaIPDkIqSBDXYu/Aj6EEgE8bg8/Im1Vs+HvuBEmvSTP4JGeFnN 6eVDPunb38p69xBG1Iiv17HttUKcSTR/RYLTLjK9Us44kr+9Njsl9e9N4a+99gDinZhV ImvN/zd7AgJeVvo6INukim/KtXRa3UunkCchLtAKyL9L7BcNsMpv1Tf8dxhmaIaEJ7pI jx3A== X-Gm-Message-State: ACrzQf0fNfS1Rk9NXkB/P/Px2t+VlmPdDuC6EF7qWwtThH5R/6digTvY F2NCd/mws4XcK8WBwsgygFnY2GJ9nFQ= X-Google-Smtp-Source: AMsMyM4qjwaBbEnF/PH1Gd6XXdmg0qRLPjzpo3EMfUltlfTo8ZXiIVWtisyz456eE0+0iBlU99KvqA== X-Received: by 2002:ae9:f406:0:b0:6fa:395d:1480 with SMTP id y6-20020ae9f406000000b006fa395d1480mr9533754qkl.555.1667397644591; Wed, 02 Nov 2022 07:00:44 -0700 (PDT) Received: from electric.. (c-73-200-155-132.hsd1.md.comcast.net. [73.200.155.132]) by smtp.gmail.com with ESMTPSA id q6-20020a37f706000000b006ce0733caebsm8449846qkj.14.2022.11.02.07.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:00:43 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 2/5 v2] libsemanage: Remove dependency on the Python module distutils Date: Wed, 2 Nov 2022 10:00:36 -0400 Message-Id: <20221102140039.914518-3-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102140039.914518-1-jwcart2@gmail.com> References: <20221102140039.914518-1-jwcart2@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org The distutils package is deprecated and scheduled to be removed in Python 3.12. Use the sysconfig module instead. Signed-off-by: James Carter --- libsemanage/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index 01df0181..589e4a70 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -14,7 +14,7 @@ INCLUDEDIR ?= $(PREFIX)/include SYSCONFDIR ?= /etc PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) -PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))") +PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") PYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])') RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') From patchwork Wed Nov 2 14:00:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13028157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6B77C433FE for ; Wed, 2 Nov 2022 14:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbiKBOBe (ORCPT ); Wed, 2 Nov 2022 10:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiKBOBA (ORCPT ); Wed, 2 Nov 2022 10:01:00 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA406FAC1 for ; Wed, 2 Nov 2022 07:00:46 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id cg5so2578025qtb.12 for ; Wed, 02 Nov 2022 07:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=s45UYosyp2pmL626PE9So0JOZBWS1orQGfOv5LNw67c=; b=IxnRr6Vs7C5OnbYQ/d+61UvENf/hSvl4uX9+PCVYvsdagCilAL/zRe7qxs1BC38Dtv Ph88sS6JRZWKASTTzCVG7hfar3obmrRv8ixjfU78F/fB5fEkfutfG2n/hRgOUn4wvOtJ CrJyw52dSvPDAvd2XBj82UhzuYo+FN9LamsAT29F98Qag2pcux75H3FQkR5G+xSzbQzR 3aLe/m/yGQe9PrCj4Nl1rUaXwAKIHoe9Jyw0QBhBTUMuJ6uuyZP7/fmifhndlkvGlFKR FF5HcTE/4fI22DsLrNcTHciCGpcBx4XW12pM5mWaoe5TsxAns6cX9P8K5OtmZaH0Mwk5 n2uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=s45UYosyp2pmL626PE9So0JOZBWS1orQGfOv5LNw67c=; b=aOJJv7gnwcgr7y7u86KpVp1em4qUsZS5xreOe5Kq0cLJYhSQGlO8YGVpeiwVydyF6X oDUuYJ2jVKDiEohQX0VnFSmOpeNpZ11YzsbSMfeDwE8SAJn+f5E++yeXArtLFK/d6j/v TZDU/2LB8ycxX6lpNohLH8xLTXFZPmF4EPfH+1WUnE6kLDf/7CZULbarP9D8Qwjh1c5r 7habiOy7GyILg8OWyoG3wyZkzGOH9OyE2t4DQfNt9I+fJkwdDQRnhXCVBfyQcy9jdko3 nKadNkuhNdtiGtEn+oc82yt3D+7DStfz2s/gnRUgz+V8HVp/TRptlfwOUSx8FBNfKnbv zerg== X-Gm-Message-State: ACrzQf3O51fC8Y8y7eMLkGOk935/0ekCCRegJK7H815eDeTsOqOrO87X 0hjkwsh4jumc2XZMH3e/AkGh4VQr+Ns= X-Google-Smtp-Source: AMsMyM6MBVWI4Qc5KxfhwH0c0otLZRKoaQJkoLcQnEm5pT7zsHjJNZtMkUE8IkotBOQSmXLL0eoIRg== X-Received: by 2002:a05:622a:2590:b0:3a5:456d:6740 with SMTP id cj16-20020a05622a259000b003a5456d6740mr2473087qtb.560.1667397645562; Wed, 02 Nov 2022 07:00:45 -0700 (PDT) Received: from electric.. (c-73-200-155-132.hsd1.md.comcast.net. [73.200.155.132]) by smtp.gmail.com with ESMTPSA id q6-20020a37f706000000b006ce0733caebsm8449846qkj.14.2022.11.02.07.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:00:44 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 3/5 v2] python: Remove dependency on the Python module distutils Date: Wed, 2 Nov 2022 10:00:37 -0400 Message-Id: <20221102140039.914518-4-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102140039.914518-1-jwcart2@gmail.com> References: <20221102140039.914518-1-jwcart2@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org The distutils package is deprecated and scheduled to be removed in Python 3.12. Use the setuptools and sysconfig modules instead. Signed-off-by: James Carter --- v2: Use sysconfig.get_path('purelib'... since original used get_python_lib(prefix=... instead of get_python_lib(plat_specific=1, prefix=... python/semanage/Makefile | 2 +- python/sepolgen/src/sepolgen/Makefile | 2 +- python/sepolicy/sepolicy/gui.py | 2 +- python/sepolicy/setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/semanage/Makefile b/python/semanage/Makefile index 024e9640..b53ee33d 100644 --- a/python/semanage/Makefile +++ b/python/semanage/Makefile @@ -5,7 +5,7 @@ LINGUAS ?= ru PREFIX ?= /usr SBINDIR ?= $(PREFIX)/sbin MANDIR = $(PREFIX)/share/man -PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))") +PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") PACKAGEDIR ?= $(PYTHONLIBDIR) BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions diff --git a/python/sepolgen/src/sepolgen/Makefile b/python/sepolgen/src/sepolgen/Makefile index cac8def7..a1039227 100644 --- a/python/sepolgen/src/sepolgen/Makefile +++ b/python/sepolgen/src/sepolgen/Makefile @@ -1,6 +1,6 @@ PREFIX ?= /usr PYTHON ?= python3 -PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))") +PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") PACKAGEDIR ?= /$(PYTHONLIBDIR)/sepolgen all: diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py index 5bdbfeba..63f2371f 100644 --- a/python/sepolicy/sepolicy/gui.py +++ b/python/sepolicy/sepolicy/gui.py @@ -77,7 +77,7 @@ def cmp(a, b): return 1 return (a > b) - (a < b) -import distutils.sysconfig +import sysconfig ADVANCED_LABEL = (_("Advanced >>"), _("Advanced <<")) ADVANCED_SEARCH_LABEL = (_("Advanced Search >>"), _("Advanced Search <<")) OUTBOUND_PAGE = 0 diff --git a/python/sepolicy/setup.py b/python/sepolicy/setup.py index b0f9650d..c8220664 100644 --- a/python/sepolicy/setup.py +++ b/python/sepolicy/setup.py @@ -2,7 +2,7 @@ # Author: Thomas Liu # Author: Dan Walsh -from distutils.core import setup +from setuptools import setup setup( name="sepolicy", From patchwork Wed Nov 2 14:00:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13028158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10CE8C433FE for ; Wed, 2 Nov 2022 14:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231299AbiKBOBm (ORCPT ); Wed, 2 Nov 2022 10:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231315AbiKBOBK (ORCPT ); Wed, 2 Nov 2022 10:01:10 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 830C9FD21 for ; Wed, 2 Nov 2022 07:00:47 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id h21so6332553qtu.2 for ; Wed, 02 Nov 2022 07:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=qGtzrxIutUYob6LwzVdL1wyAuWgx7uTaMGUCm6wkCiU=; b=AqrEYBOcS6CU429Lb0M5cqOYb5TvZ+AuhKtn0d3QFquJvALKiedTKUlbYUw7OWnHCg bwz3aRrULnQazBe1IJNQnqKPCzH+1QJfDSOJh1QMFJWaDPTriWNWv1RrEXHy5Rrzq4Jq kyHI8l/DyFQ/+oKi0TBgDaw5yCCY8oJdsCV7+pR/OhmJQQ5W8Oymwv2WgY2z2OvZ0+Qo Kvr/RpOpWLdn0O1/VPh9aYzcHtQx3QCKFJQWDoiYesFCXodOUw72Cg6ejXDgI4JptdYR 3IxeujucyuHEDVFUvftK9NJUf4rTXGwFh/lz6gSOlLj/PdKx33Ls8Nm+mueJZF8hphHT rwhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=qGtzrxIutUYob6LwzVdL1wyAuWgx7uTaMGUCm6wkCiU=; b=7/9MWjqTDOoXNdq8CWYHfkB2MhPueOXPKW0NE1CH30hAIfZexy62zNG9nERu4RQmjU oGODQIiJTxsNzRZdB7JdO/hQQ7hsAFfoLOffHlCMaLj8bvPRZ1eqipW6rioSBiUBn2dS Ku6BBOZN6yRM7R/rk392obSoan0qUt00urIS+dNRY26VZxLUwWCiJX084zvaKIugY+da BhLXMz0oyEfEAn/YyZx4jqroBrQFq+kdkySCnw0iUNSbojRs3wUw0cKNs/V4DKJa5s1d wTJpERYaGY2lL9OFAFMKagTDvQDAl4wjCWSLt7NRl4pKjiwFQj8EIb/TtJp9KAOzs2fF LpkA== X-Gm-Message-State: ACrzQf2gHyaYBaK4MGrNg7Q6xXyBjXpbq5r+drKzZ66RLYP/HFIKPnHu aJm9BK23Z4MYSFS1yB66MtfAMNQAMCc= X-Google-Smtp-Source: AMsMyM4ZP3VGMEyKJeczVy4AwEi6N/3fmkwYVRBTF1YM7vONQQIx3SnE2z8Za3BM1RbiiPGZ/PKi1w== X-Received: by 2002:ac8:58c2:0:b0:398:f5c4:9bed with SMTP id u2-20020ac858c2000000b00398f5c49bedmr19489607qta.367.1667397646557; Wed, 02 Nov 2022 07:00:46 -0700 (PDT) Received: from electric.. (c-73-200-155-132.hsd1.md.comcast.net. [73.200.155.132]) by smtp.gmail.com with ESMTPSA id q6-20020a37f706000000b006ce0733caebsm8449846qkj.14.2022.11.02.07.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:00:45 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 4/5 v2] scripts: Remove dependency on the Python module distutils Date: Wed, 2 Nov 2022 10:00:38 -0400 Message-Id: <20221102140039.914518-5-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102140039.914518-1-jwcart2@gmail.com> References: <20221102140039.914518-1-jwcart2@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org The distutils package is deprecated and scheduled to be removed in Python 3.12. Use the sysconfig module instead. Signed-off-by: James Carter --- scripts/env_use_destdir | 2 +- scripts/run-scan-build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/env_use_destdir b/scripts/env_use_destdir index 8274013e..89d989a2 100755 --- a/scripts/env_use_destdir +++ b/scripts/env_use_destdir @@ -43,7 +43,7 @@ if [ -n "${SBINDIR:-}" ] ; then PATH="$DESTDIR$SBINDIR:$PATH" fi -NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(plat_specific=1, prefix='/usr'))"):$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")" +NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '/usr', 'base': '/usr'}))"):$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")" if [ -n "${PYTHONPATH:-}" ] ; then # Prefix the PYTHONPATH with the new directories export PYTHONPATH="$NEW_PYTHONPATH:$PYTHONPATH" diff --git a/scripts/run-scan-build b/scripts/run-scan-build index 77e02ca9..931ffd2a 100755 --- a/scripts/run-scan-build +++ b/scripts/run-scan-build @@ -21,7 +21,7 @@ fi # Make sure to use the newly-installed libraries when running tests export LD_LIBRARY_PATH="$DESTDIR/usr/lib:$DESTDIR/lib" export PATH="$DESTDIR/usr/sbin:$DESTDIR/usr/bin:$DESTDIR/sbin:$DESTDIR/bin:$PATH" -export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")" +export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")" export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')" if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then From patchwork Wed Nov 2 14:00:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13028164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6D06C43217 for ; Wed, 2 Nov 2022 14:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231230AbiKBOBq (ORCPT ); Wed, 2 Nov 2022 10:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbiKBOBR (ORCPT ); Wed, 2 Nov 2022 10:01:17 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE77C10063 for ; Wed, 2 Nov 2022 07:00:48 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id a27so8029242qtw.10 for ; Wed, 02 Nov 2022 07:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=3DhZGRX+p1iUD7EHdIOR+jbU30eqoodFG8zNguMuk9Q=; b=KTTp2XZR1ytVOBk7lm/+96WHszquSWcAlI2g6CUtqBW1hlzAQOZUv8KAIzg+h0qAlR XOaAyxVkCb5eN8wDIkuNDWSLAWqGlEiG6SmtVkJHWKh/u1XDOcpu71TAge2tcoBIMB8a CJ9tiSpXW72YN+cknyXzydGv096tAYVR1mYJQUduuaOLvY/R4ihW4cIvQ+RFhk5h0137 JBlqjeKbjE/mj3ZqZgb9YT+oFd+yo9HBECv4pcbJWTdmo+C84uRNFCdrh0wPuWq13yOg tDMLOsqoGgTNlBzGfq7xHNpRTuz7gI478ch+hy7tbHNGHjEKEYGTjzvsmrZyrOjMuLKf VYQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=3DhZGRX+p1iUD7EHdIOR+jbU30eqoodFG8zNguMuk9Q=; b=FTMyXl4cYRRbedhV39RACqcbKM08X0uSKkGNaLPc8OhIP0/zHEiA8tenlM3uBPQRX3 1nryEQRJ/3dPgN0bvd2aKBXQN9siCZ+P7fWRDRbCD0LNP4NQNA+2UHfoHmlPMyA3RX/H CYtMIMIgOiWlxUEZYFxF/7fp56XXWS56gwV7e49fUssb6lwm8MEM03cM8p6Ob+cayPfM 7Hf2nQQ/K1wVk4Dmt7s5nD+HqtMI4zaJfcNKCrhCo3/s49NUqzIiCgbtU7EhLkKc0ZYV CaZpBoBH8lYrC+5nIDwozzrMZQoEXTBokLf89VihbrbTSHK+futE9QuXZJyq6ZU0W2Js 90mg== X-Gm-Message-State: ACrzQf36KPyaoMEjh7Uf8j9fNa9dGFDZa9TVMz8siNq1KD3lqWyxE/It RaYEbVLN2zrNBZXRzlz/hcjr6tClPw0= X-Google-Smtp-Source: AMsMyM6PcIgvPypI9jZRpE1BGOBRk3WZjlNbL8qJPo9tg/IPRnqPF1jtzRIbN8GDVeVrDhDKLe1+Pw== X-Received: by 2002:a05:622a:429b:b0:3a5:2a82:7742 with SMTP id cr27-20020a05622a429b00b003a52a827742mr10791935qtb.524.1667397647580; Wed, 02 Nov 2022 07:00:47 -0700 (PDT) Received: from electric.. (c-73-200-155-132.hsd1.md.comcast.net. [73.200.155.132]) by smtp.gmail.com with ESMTPSA id q6-20020a37f706000000b006ce0733caebsm8449846qkj.14.2022.11.02.07.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:00:46 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 5/5 v2] README.md: Remove mention of python3-distutils dependency Date: Wed, 2 Nov 2022 10:00:39 -0400 Message-Id: <20221102140039.914518-6-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102140039.914518-1-jwcart2@gmail.com> References: <20221102140039.914518-1-jwcart2@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org With the removal of any dependence on the python disutils module, Debian no longer depends on the python3-disutils package. Signed-off-by: James Carter --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 74b0a0c3..f91cb7d9 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,6 @@ apt-get install --no-install-recommends --no-install-suggests \ libpcre2-dev \ pkgconf \ python3 \ - python3-distutils \ systemd \ xmlto