Skip to contentSkip to conversation

ci: install necessary build python module

PATCH In review Petr Lautrbach 3 participants 6 messages Jun 5 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ci: install necessary build python module

---
v2 - add python3-build dependency also to tf testsuite

 .github/workflows/run_tests.yml | 2 +-
 tmt/plans.fmf                   | 1 +
 2 files changed, 2 insertions(+), 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' }}
tmt/plans.fmf +1 -0
index 89f041f2630a..8f9f96f46290 100644
@@ -30,6 +30,7 @@
             - python3-pip
             - python3-setuptools
             - python3-wheel
+            - python3-build
             - swig
             - xmlto
           test: |
Signature · 1 line
2.54.0
#1 lore raw

PATCH v2 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 v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] libselinux,python: Use system Python3 build module

Quoted 9 lines · Petr Lautrbach

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

Quoted 54 lines
---
 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 -2
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:
--

2.54.0

#3 lore raw

Re: [PATCH v2 2/2] libselinux,python: Use system Python3 build module

Quoted 7 lines · Stephen Smalley
Quoted 5 lines · Petr Lautrbach

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

Quoted 7 lines
Quoted 4 lines

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

Merged.
Thanks,
Jim

Quoted 55 lines
Quoted 54 lines
---
 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 -2
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:
--

2.54.0

maintainer Acked-by on v2 1/2
#4 lore raw
In reply to Petr Lautrbach
Quoted 2 lines · Petr Lautrbach
Quoted 36 lines

---
v2 - add python3-build dependency also to tf testsuite

 .github/workflows/run_tests.yml | 2 +-
 tmt/plans.fmf                   | 1 +
 2 files changed, 2 insertions(+), 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' }}
tmt/plans.fmf +1 -1
index 89f041f2630a..8f9f96f46290 100644
@@ -30,6 +30,7 @@
             - python3-pip
             - python3-setuptools
             - python3-wheel
+            - python3-build
             - swig
             - xmlto
           test: |
--

2.54.0

#5 lore raw
Quoted 7 lines · Stephen Smalley
Quoted 2 lines · Petr Lautrbach

Merged.
Jim

Quoted 37 lines
Quoted 36 lines

---
v2 - add python3-build dependency also to tf testsuite

 .github/workflows/run_tests.yml | 2 +-
 tmt/plans.fmf                   | 1 +
 2 files changed, 2 insertions(+), 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' }}
tmt/plans.fmf +1 -1
index 89f041f2630a..8f9f96f46290 100644
@@ -30,6 +30,7 @@
             - python3-pip
             - python3-setuptools
             - python3-wheel
+            - python3-build
             - swig
             - xmlto
           test: |
--

2.54.0