Skip to contentSkip to conversation

ci: install necessary build python module

PATCH Superseded Petr Lautrbach 2 participants 3 messages Jun 5 SELinux security module

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ci: install necessary build python module

---
 .github/workflows/run_tests.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/run_tests.yml +1 -1
index ed60921acfb7..82c44fccb521 100644
@@ -71,7 +71,7 @@ jobs:
             swig \
             xmlto
 
-        pip install flake8 setuptools
+        pip install flake8 setuptools build wheel
 
     - name: Install Clang
       if: ${{ matrix.compiler == 'clang' }}
Signature · 1 line
2.54.0
#1 lore raw

PATCH 2/2 libselinux,python: Use system Python3 build module

Commit dfedefffbbdde609a7aacb1ef570c7ca1bb70915 ("libselinux: update pywrap targets for modern python builds") added pip install build command. This fails on build systems without network.

Revert the install part and add python3-build to packages necessary to build Python bindings in README.md

---
 README.md                | 2 ++
 libselinux/src/Makefile  | 1 -
 python/sepolicy/Makefile | 1 -
 3 files changed, 2 insertions(+), 2 deletions(-)
README.md +2 -0
index ece18c394ee0..5e65a0495e39 100644
@@ -64,6 +64,7 @@ dnf install \
 
 # For Python and Ruby bindings
 dnf install \
+    python3-build \
     python3-devel \
     python3-pip \
     python3-setuptools \
@@ -97,6 +98,7 @@ apt-get install --no-install-recommends --no-install-suggests \
 
 # For Python and Ruby bindings
 apt-get install --no-install-recommends --no-install-suggests \
+    python3-build \
     python3-dev \
     python3-pip \
     python3-setuptools \
libselinux/src/Makefile +0 -1
index c62ad1edda58..52b2c621c042 100644
@@ -151,7 +151,6 @@ all: $(LIBSO)
 endif
 
 pywrap: all selinuxswig_python_exception.i
-	$(PYTHON) -m pip install build wheel
 	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) -m build --no-isolation --wheel .
 
 rubywrap: all $(SWIGRUBYSO)
python/sepolicy/Makefile +0 -1
index 4a4a351219be..518129805fca 100644
@@ -14,7 +14,6 @@ BASHCOMPLETIONS=sepolicy-bash-completion.sh
 all: python-build
 
 python-build:
-	$(PYTHON) -m pip install build wheel setuptools
 	$(PYTHON) -m build --no-isolation --wheel .
 
 clean:
Signature · 1 line
2.54.0
maintainer Acked-by on v1 1/2
#2 lore raw
In reply to Petr Lautrbach
Quoted 2 lines · Petr Lautrbach
Quoted 21 lines
---
 .github/workflows/run_tests.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/run_tests.yml +1 -2
index ed60921acfb7..82c44fccb521 100644
@@ -71,7 +71,7 @@ jobs:
             swig \
             xmlto
 
-        pip install flake8 setuptools
+        pip install flake8 setuptools build wheel
 
     - name: Install Clang
       if: ${{ matrix.compiler == 'clang' }}
--

2.54.0