Skip to contentSkip to conversation

configure: remove python pkg_resources check

PATCH In review Olaf Hering 3 participants 3 messages Nov 24, 2020 – Nov 25, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: remove python pkg_resources check

Since meson.git#0240d760c7699a059cc89e584363c6431cdd2b61 setuptools is not required anymore.

---
 configure | 3 ---
 1 file changed, 3 deletions(-)
configure +0 -3
index 8c5d2f9a69..ce9b3c0a33 100755
@@ -1913,9 +1913,6 @@ fi
 
 case "$meson" in
     git | internal)
-        if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then
-            error_exit "Python setuptools not found"
-        fi
         meson="$python ${source_path}/meson/meson.py"
         ;;
     *) meson=$(command -v "$meson") ;;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Olaf Hering

Since meson.git#0240d760c7699a059cc89e584363c6431cdd2b61 setuptools is not required anymore.

That commit was part of meson 0.55.1. We require at least meson 0.55.3. So right, this should be fine.

Quoted 10 lines
---
 configure | 3 ---
 1 file changed, 3 deletions(-)
configure +0 -0
index 8c5d2f9a69..ce9b3c0a33 100755

configure fi · line 1918

Quoted 9 lines
configure +0 -3
@@ -1913,9 +1913,6 @@ fi
 
 case "$meson" in
     git | internal)
-        if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then
-            error_exit "Python setuptools not found"
-        fi
         meson="$python ${source_path}/meson/meson.py"
         ;;
     *) meson=$(command -v "$meson") ;;

I guess we could now also remove the corresponding package from the docker and vm files?

$ grep -r setuptool tests/
tests/docker/dockerfiles/debian10.docker:     python3-setuptools \
tests/docker/dockerfiles/fedora-win32-cross.docker:    python3-setuptools \
tests/docker/dockerfiles/fedora-win64-cross.docker:    python3-setuptools \
tests/vm/freebsd:        "py37-setuptools",
tests/vm/openbsd:        "py3-setuptools",
tests/vm/haiku.x86_64:        "setuptools_python3"
tests/vm/netbsd:        "py37-setuptools",
#2 lore raw
Quoted 31 lines · Thomas Huth
Quoted 1 line · Olaf Hering

Since meson.git#0240d760c7699a059cc89e584363c6431cdd2b61 setuptools is not required anymore.

That commit was part of meson 0.55.1. We require at least meson 0.55.3. So right, this should be fine.

Quoted 10 lines
---
  configure | 3 ---
  1 file changed, 3 deletions(-)
configure +0 -0
index 8c5d2f9a69..ce9b3c0a33 100755

configure fi · line 1918

Quoted 9 lines
configure +0 -3
@@ -1913,9 +1913,6 @@ fi
 
  case "$meson" in
      git | internal)
-        if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then
-            error_exit "Python setuptools not found"
-        fi
          meson="$python ${source_path}/meson/meson.py"
          ;;
      *) meson=$(command -v "$meson") ;;

I guess we could now also remove the corresponding package from the docker and vm files?

Quoted 9 lines
$ grep -r setuptool tests/
tests/docker/dockerfiles/debian10.docker:     python3-setuptools \
tests/docker/dockerfiles/fedora-win32-cross.docker:    python3-setuptools \
tests/docker/dockerfiles/fedora-win64-cross.docker:    python3-setuptools \
tests/vm/freebsd:        "py37-setuptools",
tests/vm/openbsd:        "py3-setuptools",
tests/vm/haiku.x86_64:        "setuptools_python3"
tests/vm/netbsd:        "py37-setuptools",

Yes, it should. I sent a patch for this.

Paolo