From patchwork Fri Nov 4 14:36:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13032127 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 801CCC4332F for ; Fri, 4 Nov 2022 14:39:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231897AbiKDOjH (ORCPT ); Fri, 4 Nov 2022 10:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232244AbiKDOic (ORCPT ); Fri, 4 Nov 2022 10:38:32 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 866204AF36 for ; Fri, 4 Nov 2022 07:36:23 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id hh9so3092688qtb.13 for ; Fri, 04 Nov 2022 07:36:23 -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=p69Fmw7lUBo7JKNyXOAkUt45d26XQPhEGaA9bo8eXp1r7hmikL5f0IrYlAQY/4E/R3 XZckpt9/cGTzfpUf9dJiImk46rGMlLH7dsZw4KU0OMhQywsKmqkCZWJPRR9zXZ45YN+Y oErjk/ossu3VfhXUyRE0R+7Oq8VFsq8qoG5MKiSFrb2ngRrX09pK2YT3p1R1rdO0p4Bj B8aJkYvmOR0hwNRPjnsjMjv7DG953oBZ/o9iagiOq4hcE3Rn8fhQJ0ZAqGbOAI15EAbl qdNgM6eGFmrSxjhZH5/DHNxMGpll8fo1ZeJO2FI8ZmceWf2oyQRR8INwV803Gbzu4nbe KXXA== 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=KSRxuA58Ax3QFgGiAVqjgv5CFkUIHdoc9S70BzxWbou8AMJOBbCX7rQ9p6pskRiOXD jFVZ51WhGeFy6ouk01a2EM9dISZEu3N6xn9iF2U7G1ptXy3DCYzqcgbHb4i657Q/P9C1 BG6I+n70F5UbqPClTctrMNDRTJJ3LApynM+wNPhDTiAhsMW44VYIsgqLEejF//XWoDMq PsqBzhkzEOXJ65xKu6AfyHqvRLQy5t97LhXFfNzFnN3JJvYe5MfPnpGaL6zytFVwkCl2 yN5bQowE2BtSBwcnkZZOVpSuOMBypDa5jU8zbyl47Z//oyUWnU/vWKmEbeNv7PlgnWPr lhYg== X-Gm-Message-State: ACrzQf2nUDzajsbiwL72DsFJhZvji23+TARRA/LN6GicyYUcoQI2guXk +zzF/6wkfXHEQ4nBp9G3/K3UF+4CHn8= X-Google-Smtp-Source: AMsMyM5+BvmYh1GW0T1acEIJds/0zKlTHPeqCaXd6x7+6a3ToBR5nheIlY2TrMyCQ1PwsWfMw5jpCw== X-Received: by 2002:ac8:4916:0:b0:3a5:283b:22c7 with SMTP id e22-20020ac84916000000b003a5283b22c7mr21372198qtq.64.1667572582280; Fri, 04 Nov 2022 07:36:22 -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 h8-20020ac85148000000b003a50b501a01sm2479324qtn.87.2022.11.04.07.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:36:21 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 1/5 v3] libselinux: Remove dependency on the Python module distutils Date: Fri, 4 Nov 2022 10:36:12 -0400 Message-Id: <20221104143616.1089636-2-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104143616.1089636-1-jwcart2@gmail.com> References: <20221104143616.1089636-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 Fri Nov 4 14:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13032128 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 6B1D7C43219 for ; Fri, 4 Nov 2022 14:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231920AbiKDOjI (ORCPT ); Fri, 4 Nov 2022 10:39:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231933AbiKDOid (ORCPT ); Fri, 4 Nov 2022 10:38:33 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 892D630F5F for ; Fri, 4 Nov 2022 07:36:24 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id e15so3134151qts.1 for ; Fri, 04 Nov 2022 07:36:24 -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=lWolexwFNbT4+HF5JFTyHdz15g00Xfyd1yP+zzHIDr96P3npInYOpMmVkb3SSRvTD6 ykEpO/V1pnOp8g0TUmoZHXrN+zg7KplKX6Zv4vpJz6nyV3b/WhkGW3GDup+iDThE/cCg IeGiBudU+W8+tgZx8poHt2BpW45aFCKVaiG45tmX0i9Z5lNFn/fhqSehKsI9aMeiea6M TN2LQhED46X8hm4022Joj92+LMkEwthN/98BkglYiisW+RQOO9PoHSg7zRHXIHgbMIMa EU0iGrp41ZQlLmdfWmaA04AD4cD5dAAOq6JQ/oDtaKC83DY3e9OoFShuzu5yBudidS6f Vq1A== 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=C000ezoC4AetThFRkrkcbRtOMgwDJID9b++Zh7O1eHD389xkmzGvGfbse3KdO44Vwz kkQmTp9HO79kw9P3rZEUfajjgBI0ZhJiAddjLjGOKKPdV7+ZNV6KVkiPpBGNZL+RvQxO vqzhj4Eo0AO44TNuOhr+Q2l3SGV5ezMrAxrNAWdUmZYgIhfmYfPbRDxmA1tU77/Ec1Gc 727uShLZS2Zs9OkD0Mm9fNdmisKkU6T/eNr2YYVB2WumOqhtWDCi/fQpFNjUv7jgga+r LwlQu/aGhBj6RX2hcwcszoPxJSfSc3zCtkUjy6HfZXvp1atVADJV2uSfiHEQ00269s6p sobA== X-Gm-Message-State: ACrzQf1GE11q6dS2CfkdmEZkvmbETYQitGmHb9to7sEX9XvBwP2uo/F9 l5QkAFquDux/v5AHv4rxf606pi9hH7k= X-Google-Smtp-Source: AMsMyM6t84LOAof7pJ74s/ZlQgf8DEBlFWReuphG/9aYRGACM/Y2DhZ+sEx/fdjlx7A1B9oFQ51zRw== X-Received: by 2002:ac8:5814:0:b0:399:39ca:fd63 with SMTP id g20-20020ac85814000000b0039939cafd63mr29262375qtg.0.1667572583314; Fri, 04 Nov 2022 07:36:23 -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 h8-20020ac85148000000b003a50b501a01sm2479324qtn.87.2022.11.04.07.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:36:22 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 2/5 v3] libsemanage: Remove dependency on the Python module distutils Date: Fri, 4 Nov 2022 10:36:13 -0400 Message-Id: <20221104143616.1089636-3-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104143616.1089636-1-jwcart2@gmail.com> References: <20221104143616.1089636-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 Fri Nov 4 14:36:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13032129 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 677BFC433FE for ; Fri, 4 Nov 2022 14:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbiKDOjL (ORCPT ); Fri, 4 Nov 2022 10:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232099AbiKDOif (ORCPT ); Fri, 4 Nov 2022 10:38:35 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F7D748EF for ; Fri, 4 Nov 2022 07:36:25 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id l15so3124293qtv.4 for ; Fri, 04 Nov 2022 07:36:25 -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=l8LoObgE/y/k7pQq/IkvKwNJ4jpgV16XqK/OGNOTMrE=; b=VAGvp0py74EMfjFjFIM4YtxPHxHBZrECKJub/a2mSm2jlyOvMp6GuNR9z+68uNhnMI znQpwpHjPqEc+Fq/o6Lj7NTLKaoRU/F9P2mee6Rcsr3lrAOqHTxiv3cW5GMWT6kCcBuz 6tUxDQBNxsylYP6jdACjOA5J6NP7dHoTJDLBNGAewZv5HWAGojvHcJIncpaZzzmS0zW2 LR8e42M9JVDUEdVsuXfk2TcofKOAHycuPeKqFhwZAA/exCwFv5c8YLdV05fUqQn2N4bN Wuhs/JcA5u6fx77aUUUgMeaqO8WoG7i6TCAmgsZ8TF5CPUeZf+khLtBQhzq59sjLvMnT 33Rg== 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=l8LoObgE/y/k7pQq/IkvKwNJ4jpgV16XqK/OGNOTMrE=; b=FEJ6ogPkW9zcQqAZWBF2kUHw8VbTL4xfOdFrpCXSlSp3hHM2ouJKxU0FfPaxoEBVP/ /lFR+6jGcEri99/013zgOTpQqaqpoqpoXko/lGZ6iFkD1NdT/erwI0m1l0rqVa7WqaaH 8wELKzZpdzCY9x2sI8zHwGiBzECN+FxgrhGMueqMhlS3/0uPHEaVVpKC8TjImevUkj14 UUl4BzWFFfporv9tyZlwVGVVE754GJ/i20NwGLgrCFuvTJpMGQZmT7EXiw46uk7NZtZf 6D+rVb1NSt3K9MT/RK9u2PDCNuJAfN9ahGDBfSDKL81X1eeVfvqE24SKmDrVjMWUQqRS kpdg== X-Gm-Message-State: ACrzQf0gY1y9cQxHiWFq80QsZM3TE4fHkhLoeSVwUN8gzx00b+iRy+Ha c+OC2s708WtgFU6QD2zW/blpJaSwusY= X-Google-Smtp-Source: AMsMyM7bn+tGsvmBsJR41pYU5ypYRBAdXN+Xli/no6K0/txe2A4hGESA9i/SGWmW4fE6Lga8it9Q+Q== X-Received: by 2002:ac8:7e8f:0:b0:3a5:5bd5:f95c with SMTP id w15-20020ac87e8f000000b003a55bd5f95cmr5685549qtj.83.1667572584540; Fri, 04 Nov 2022 07:36:24 -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 h8-20020ac85148000000b003a50b501a01sm2479324qtn.87.2022.11.04.07.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:36:24 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 3/5] python: Remove dependency on the Python module distutils Date: Fri, 4 Nov 2022 10:36:14 -0400 Message-Id: <20221104143616.1089636-4-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104143616.1089636-1-jwcart2@gmail.com> References: <20221104143616.1089636-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 --- v3: Removed another usage of distutils in gui.py 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 | 4 ++-- python/sepolicy/setup.py | 2 +- 4 files changed, 5 insertions(+), 5 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..335be582 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 @@ -130,7 +130,7 @@ class SELinuxGui(): self.application = app self.filter_txt = "" builder = Gtk.Builder() # BUILDER OBJ - self.code_path = distutils.sysconfig.get_python_lib(plat_specific=False) + "/sepolicy/" + self.code_path = sysconfig.get_python_lib(plat_specific=False) + "/sepolicy/" glade_file = self.code_path + "sepolicy.glade" builder.add_from_file(glade_file) self.outer_notebook = builder.get_object("outer_notebook") 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 Fri Nov 4 14:36:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13032130 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 C86A5C4332F for ; Fri, 4 Nov 2022 14:39:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbiKDOjM (ORCPT ); Fri, 4 Nov 2022 10:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232110AbiKDOif (ORCPT ); Fri, 4 Nov 2022 10:38:35 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08557748FD for ; Fri, 4 Nov 2022 07:36:27 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id l9so3128703qkk.11 for ; Fri, 04 Nov 2022 07:36:26 -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=lsRECDJuIEK6r78cAGONUHg8G3v1+qRn+cb5s+lfIvJP9ekKe6Cu7JtVqALFfYN1xf ct5U019rcIfjYIeyYBM686+tr7mN2ZJDdZjOv3dxmtNHB76YbljjEcIBRaMQRLer9cHu 2DYvhbXM61SY3M1flaA7Mx+JtZWk7JgsvgnGfzs6r8Y3SVdML0NKfc95TrxlF4qizvmJ 2xT2wtNwS1Lp2D3X720JKLAqUejgFo6BH3hwudbDoOQW2Ua0XrseY8lyI7HUpb1Yntx4 OMWXchDI6ejGN8OdxdEQtI2nUhGN7w/52lVW3gt+8syMSxoOzm8Npsp+HjcYER3tvfmS sUwQ== 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=3KEXy6PDNkGvDm05OZVoarxvm0YQ/zuMJ0LB/OFmnm9DmsMk+v4WVgCg/IHuScccLm NN9l/uT+sYeT+HdZPXy+5J9Yuv0UbQ+8OpFPFXTPsni8xZuw048oVBdOi+Q/giYxzBkA ZAil9zGQ5mfl/raoNitcWCdlJwDl97CZBmX6WY0VEKqAi+WtZ9Q6p8A7YyegiQZu6/g9 nzDG/1uhZuHJc+7mf+cEnm7y34/JhiBniJ7vt2cuZ0zFZoVRtgFn0s+iLjVoPvv31xc4 GB6F2rIawmvzT3fVwas3NW4IBbbg3Zpnhrrnedn5tvJmDzCbtZfulLPy3X+/wN6pUmxb DV/g== X-Gm-Message-State: ACrzQf3IYaPrP73rWBYSoBvRT/5Y75tOxWQPkI5PAde3S66v4KSkbAkA WE7/9zQIlZ0SKCMkod7SIkHhVJbJxP8= X-Google-Smtp-Source: AMsMyM6XKH8tTMuw6wIE0o05n9ngXT4bguxh1e3siCB2a6aeBNb7o9YVf/7fr1stvTRJEdXMPn7ssA== X-Received: by 2002:a05:620a:284a:b0:6ab:9cc5:cb4c with SMTP id h10-20020a05620a284a00b006ab9cc5cb4cmr26530779qkp.609.1667572585694; Fri, 04 Nov 2022 07:36:25 -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 h8-20020ac85148000000b003a50b501a01sm2479324qtn.87.2022.11.04.07.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:36:25 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 4/5 v3] scripts: Remove dependency on the Python module distutils Date: Fri, 4 Nov 2022 10:36:15 -0400 Message-Id: <20221104143616.1089636-5-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104143616.1089636-1-jwcart2@gmail.com> References: <20221104143616.1089636-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 Fri Nov 4 14:36:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Carter X-Patchwork-Id: 13032131 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 4D071C43217 for ; Fri, 4 Nov 2022 14:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231971AbiKDOjM (ORCPT ); Fri, 4 Nov 2022 10:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbiKDOih (ORCPT ); Fri, 4 Nov 2022 10:38:37 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7252748FC for ; Fri, 4 Nov 2022 07:36:27 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id i9so3131533qki.10 for ; Fri, 04 Nov 2022 07:36:27 -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=i/3I4IopzBwR2y/ZaIPsL3sn1plEkEjhUXYJe6s3om/t7evYDEygKoZx4PIyr7Zi3T 76M/8VtShc7POi96S8u9QlPe3DRhGD59JN8O1lx303K0SRLuXBVm2Y6OAXO64cYGEY8v 8r+XsTf7BXrNA+GTL2f0WLLKbDwWj3LMkKk5W4lqk/b4vlInq8FOWJ5V4FRBBviVqwQk CrPFyWTilJCfYw/BRIyng5ngtbv+Dv1mLllwmpsr5GoBn9l9morCr4JF9Tw7+rLBotZj yEbBmqtI1G2T5vgvJGpgOIy/eYcR5xfZULfj8VHnm4+6beGp+KY4/BRI0L3oH+j9tAPv OVew== 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=AbgEfGEYNNdraJkublhDLIp3BzX2g1llNAoiABqoetJL2hnJAm7Do5CVqtGPPJZN6m 1PEDMh6ByWjhR6R6IcUlwK9lAXYaw4xQH1hXE+XEXmGzEzmPGeiAwqW1QoOQhn/j47s/ zkC8ymCdaDOJW+z1BDGqPucmtW/NHcyOtpiF+x/L4qoA4aMgtmMNy8em0LotrynW/zC7 g198/nq65hZdXSgd1vSIRkCMNIEyCglO+hs0gejBFnfjLuyWDWXSUNOwWOn1jyxcnMOV RKazqHTin+y2SdlF1dOkvFbWT7RE5pPOEYz6+NAVczB1o8+++uq9vZGohdWVBkXQKMnp dmrQ== X-Gm-Message-State: ACrzQf3D+9AiDMR3svNgPTvxV5NidKwqUZXy6d8gb8Tp+XFxT06tkXPg d67DYiax3JYyxA4ouZpAAKSCLwEYs/c= X-Google-Smtp-Source: AMsMyM7PILU6qDGwpvRGA3oHBTbLszbduG+CtnpSEbBlEw0DCw+LVhTKeddqcYhgXOnKrhCj5cQh7w== X-Received: by 2002:ae9:e70b:0:b0:6fa:509f:cb2d with SMTP id m11-20020ae9e70b000000b006fa509fcb2dmr13814646qka.181.1667572586687; Fri, 04 Nov 2022 07:36:26 -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 h8-20020ac85148000000b003a50b501a01sm2479324qtn.87.2022.11.04.07.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:36:26 -0700 (PDT) From: James Carter To: selinux@vger.kernel.org Cc: plautrba@redhat.com, James Carter Subject: [PATCH 5/5 v3] README.md: Remove mention of python3-distutils dependency Date: Fri, 4 Nov 2022 10:36:16 -0400 Message-Id: <20221104143616.1089636-6-jwcart2@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104143616.1089636-1-jwcart2@gmail.com> References: <20221104143616.1089636-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