Skip to content

Remove dependency on the Python module distutils

James Carter selinux 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 2 repliesIn review
  2. v25 patches 1 replySuperseded
  3. v15 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5libselinux: Remove dependency on the Python module distutilslibselinux/src/Makefile libselinux/src/setup.py+2 -20 replies
2/5libsemanage: Remove dependency on the Python module distutilslibsemanage/src/Makefile+1 -10 replies
3/5python: Remove dependency on the Python module distutilspython/semanage/Makefile python/sepolgen/src/sepolgen/Makefile python/sepolicy/sepolicy/gui.py +1 more+5 -50 replies
4/5scripts: Remove dependency on the Python module distutilsscripts/env_use_destdir scripts/run-scan-build+2 -20 replies
5/5README.md: Remove mention of python3-distutils dependencyREADME.md+0 -10 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPetr Lautrbach
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH 0/5 v3] Remove dependency on the Python module distutils

The distutils package is deprecated and scheduled to be removed in Python 3.12.

When building the SELinux userspace we currently get warnings like the following:
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

I am not a Python expert, but everything seems to work with these patches. I would appreciate other people testing this and any Python experts to let me know if this is the right way of replacing distutils.

v3: Removed a second usage of distutils in python/sepolicy/sepolicy/gui.py

v2: Use sysconfig.get_path('purelib'... when original used
get_python_lib(prefix=... and use sysconfig.get_path('platlib'... when original used get_python_lib(plat_specific=1, prefix=...

James Carter (5):
libselinux: Remove dependency on the Python module distutils
libsemanage: Remove dependency on the Python module distutils
python: Remove dependency on the Python module distutils
scripts: Remove dependency on the Python module distutils README.md: Remove mention of python3-distutils dependency

 README.md                             | 1 -
 libselinux/src/Makefile               | 2 +-
 libselinux/src/setup.py               | 2 +-
 libsemanage/src/Makefile              | 2 +-
 python/semanage/Makefile              | 2 +-
 python/sepolgen/src/sepolgen/Makefile | 2 +-
 python/sepolicy/sepolicy/gui.py       | 4 ++--
 python/sepolicy/setup.py              | 2 +-
 scripts/env_use_destdir               | 2 +-
 scripts/run-scan-build                | 2 +-
 10 files changed, 10 insertions(+), 11 deletions(-)
Signature · 1 line
2.38.1