Skip to contentSkip to conversation

python: Inherit setuptools instead of distutils for several packages

PATCH In review Adrian Dudau 3 participants 3 messages May 23, 2017 – Jun 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python: Inherit setuptools instead of distutils for several packages

python-appdirs
python-keystoneauth
python-lesscpy
python-os-client-config

The setup scripts of these modules use setuptools instead of distutils, resulting in errors like this:

|   File "setup.py", line 5, in <module>
|     from setuptools import setup
| ImportError: No module named setuptools
---
 meta-openstack/recipes-devtools/python/python-appdirs_git.bb          | 2 +-
 meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb | 2 +-
 meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb       | 2 +-
 meta-openstack/recipes-devtools/python/python-os-client-config_git.bb | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta-openstack/recipes-devtools/python/python-appdirs_git.bb +1 -1
index 8e40f26..2482871 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/ActiveState/${SRCNAME}.git"
 
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pip \
meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb +1 -1
index 1fdf9e1..83582c5 100644
@@ -12,7 +12,7 @@ SRC_URI[sha256sum] = "075a9ca7a8877c5885fa2487699015e45260c4e6be119683effe0ad2ab
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb +1 -1
index 61ae935..71e0dc0 100644
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "ccad1ad2a89ced1875c5ca4e16e5478b791d31fb187fe29f1541859318
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --prefix=${prefix} \
meta-openstack/recipes-devtools/python/python-os-client-config_git.bb +1 -1
index 7b55dbb..5393bb7 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/newton"
 
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Adrian Dudau

python-appdirs
python-keystoneauth
python-lesscpy
python-os-client-config

Quoted 8 lines

The setup scripts of these modules use setuptools instead of distutils, resulting in errors like this:

|   File "setup.py", line 5, in <module>
|     from setuptools import setup
| ImportError: No module named setuptools

Agreed. The setup.py for all of these packages have some form of 'import setuptools' so this is the correct change. I mentioned to Bruce I would have a look at these as I know in the past we have had some flip-flopping in this regard. Anyways, Bruce this change is fine and at least in my mind OK to merge.

Mark

Quoted 67 lines
---
 meta-openstack/recipes-devtools/python/python-appdirs_git.bb          | 2 +-
 meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb | 2 +-
 meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb       | 2 +-
 meta-openstack/recipes-devtools/python/python-os-client-config_git.bb | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta-openstack/recipes-devtools/python/python-appdirs_git.bb +1 -1
index 8e40f26..2482871 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/ActiveState/${SRCNAME}.git"
 
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pip \
meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb +1 -1
index 1fdf9e1..83582c5 100644
@@ -12,7 +12,7 @@ SRC_URI[sha256sum] = "075a9ca7a8877c5885fa2487699015e45260c4e6be119683effe0ad2ab
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb +1 -1
index 61ae935..71e0dc0 100644
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "ccad1ad2a89ced1875c5ca4e16e5478b791d31fb187fe29f1541859318
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --prefix=${prefix} \
meta-openstack/recipes-devtools/python/python-os-client-config_git.bb +1 -2
index 7b55dbb..5393bb7 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/newton"
 
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#2 lore raw
Quoted 14 lines · M. Asselstine
Quoted 12 lines · Adrian Dudau

python-appdirs
python-keystoneauth
python-lesscpy
python-os-client-config

The setup scripts of these modules use setuptools instead of distutils, resulting in errors like this:

|   File "setup.py", line 5, in <module>
|     from setuptools import setup
| ImportError: No module named setuptools
Quoted 9 lines
Quoted 1 line

Agreed. The setup.py for all of these packages have some form of 'import setuptools' so this is the correct change. I mentioned to Bruce I would have a look at these as I know in the past we have had some flip-flopping in this regard. Anyways, Bruce this change is fine and at least in my mind OK to merge.

Thanks for the review, I was looking for another opinion!

This is now merged.

Bruce

Quoted 96 lines

Mark

Quoted 2 lines

---
meta-openstack/recipes-devtools/python/python-appdirs_git.bb

| 2 +-

Quoted 1 line

meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb

| 2 +-

Quoted 1 line

meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb

| 2 +-

Quoted 1 line

meta-openstack/recipes-devtools/python/python-os-client-config_git.bb

| 2 +-

Review

Quoted 3 lines
 4 files changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

appdirs_git.bb b/meta-openstack/recipes-devtools/python/python- appdirs_git.bb

meta-openstack/recipes-devtools/python/python-appdirs_git.bb SRC_URI = "git://github.com/ActiveState/${SRCNAME}.git

Quoted 4 lines

index 8e40f26..2482871 100644

meta-openstack/recipes-devtools/python/python-appdirs_git.bb +0 -0
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/ActiveState/${SRCNAME}.git

"

Review

Quoted 9 lines
meta-openstack/recipes-devtools/python/python-appdirs_git.bb +1 -1
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pip \
(quoted diff) +0 -0

keystoneauth1_2.18.0.bb b/meta-openstack/recipes-devtools/python/python- keystoneauth1_2.18.0.bb

Quoted 2 lines

index 1fdf9e1..83582c5 100644
--- a/meta-openstack/recipes-devtools/python/python-

keystoneauth1_2.18.0.bb

Quoted 1 line

+++ b/meta-openstack/recipes-devtools/python/python-

keystoneauth1_2.18.0.bb

Review SRC_URI[sha256sum] = "075a9ca7a8877c5885fa2487699015

Quoted 1 line
(quoted diff) +0 -0
@@ -12,7 +12,7 @@ SRC_URI[sha256sum] = "075a9ca7a8877c5885fa2487699015

e45260c4e6be119683effe0ad2ab

Review

Quoted 9 lines
meta-openstack/recipes-devtools/python/python-keystoneauth1_2.18.0.bb +1 -1
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
(quoted diff) +0 -0

lesscpy_0.10.2.bb b/meta-openstack/recipes-devtools/python/python- lesscpy_0.10.2.bb

meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb SRC_URI[sha256sum] = "ccad1ad2a89ced1875c5ca4e16e547

Quoted 4 lines

index 61ae935..71e0dc0 100644

meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb +0 -0
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "ccad1ad2a89ced1875c5ca4e16e547

8b791d31fb187fe29f1541859318

Review

Quoted 9 lines
meta-openstack/recipes-devtools/python/python-lesscpy_0.10.2.bb +1 -1
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit distutils
+inherit setuptools
 
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --prefix=${prefix} \
(quoted diff) +0 -0

client-config_git.bb b/meta-openstack/recipes-devtools/python/python-os- client-config_git.bb

Quoted 2 lines

index 7b55dbb..5393bb7 100644
--- a/meta-openstack/recipes-devtools/python/python-os-

client-config_git.bb

Quoted 1 line

+++ b/meta-openstack/recipes-devtools/python/python-os-

client-config_git.bb

Review SRC_URI = "git://github.com/openstack/${

Quoted 1 line
(quoted diff) +0 -0
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/openstack/${

SRCNAME}.git;branch=stable/newton"

Quoted 11 lines
meta-openstack/recipes-devtools/python/python-os-client-config_git.bb +1 -2
 S = "${WORKDIR}/git"
 
-inherit distutils
+inherit setuptools
 
 DEPENDS += " \
         python-pbr \
--

2.7.4

Quoted 5 lines

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"