Message ID | 20220304134220.2254908-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | ufw: port to setuptools, use setuptools_legacy | expand |
Obviously this depends on the addition of setuptools_legacy to oe-core, which is on the list now. Ross On Fri, 4 Mar 2022 at 13:42, Ross Burton via lists.openembedded.org <ross=burtonini.com@lists.openembedded.org> wrote: > > This package has a traditional setup.py which has a custom install command, > which isn't supported with the modern wheel/pip installation method. > > Until upstream has moved away from distutils, use setuptools_legacy so > the installation is correct. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > .../ufw/ufw/setuptools.patch | 20 +++++++++++++++++++ > .../recipes-connectivity/ufw/ufw_0.36.1.bb | 3 ++- > 2 files changed, 22 insertions(+), 1 deletion(-) > create mode 100644 meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > > diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > new file mode 100644 > index 0000000000..ad5391cb98 > --- /dev/null > +++ b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > @@ -0,0 +1,20 @@ > +Move to setuptools as distutils is now deprecated. > + > +Upstream-Status: Submitted [https://code.launchpad.net/~tgamblin/ufw/distutils-to-setuptools] > +Signed-off-by: Ross Burton <ross.burton@arm.com> > + > +diff --git a/setup.py b/setup.py > +index cb67a6a..de648d3 100644 > +--- a/setup.py > ++++ b/setup.py > +@@ -25,8 +25,8 @@ > + # > + > + from __future__ import print_function > +-from distutils.command.install import install as _install > +-from distutils.core import setup > ++from setuptools.command.install import install as _install > ++from setuptools import setup > + import errno > + import os > + import re > diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > index c427e4ffde..70216a85e3 100644 > --- a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > +++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > @@ -12,12 +12,13 @@ SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \ > file://0001-optimize-boot.patch \ > file://0002-add-an-option-to-specify-iptables-location.patch \ > file://0003-only-make-one-reference-to-env.patch \ > + file://setuptools.patch \ > " > SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" > > UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" > > -inherit distutils3 features_check systemd update-rc.d > +inherit setuptools3_legacy features_check systemd update-rc.d > > RDEPENDS:${PN} = " \ > iptables \ > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#95783): https://lists.openembedded.org/g/openembedded-devel/message/95783 > Mute This Topic: https://lists.openembedded.org/mt/89548753/1676615 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ross@burtonini.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, Mar 4, 2022 at 5:43 AM Ross Burton <ross@burtonini.com> wrote: > > Obviously this depends on the addition of setuptools_legacy to > oe-core, which is on the list now. yeah I have cherry-picked that patch into my distro testing for now. > > Ross > > On Fri, 4 Mar 2022 at 13:42, Ross Burton via lists.openembedded.org > <ross=burtonini.com@lists.openembedded.org> wrote: > > > > This package has a traditional setup.py which has a custom install command, > > which isn't supported with the modern wheel/pip installation method. > > > > Until upstream has moved away from distutils, use setuptools_legacy so > > the installation is correct. > > > > Signed-off-by: Ross Burton <ross.burton@arm.com> > > --- > > .../ufw/ufw/setuptools.patch | 20 +++++++++++++++++++ > > .../recipes-connectivity/ufw/ufw_0.36.1.bb | 3 ++- > > 2 files changed, 22 insertions(+), 1 deletion(-) > > create mode 100644 meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > > > > diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > > new file mode 100644 > > index 0000000000..ad5391cb98 > > --- /dev/null > > +++ b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch > > @@ -0,0 +1,20 @@ > > +Move to setuptools as distutils is now deprecated. > > + > > +Upstream-Status: Submitted [https://code.launchpad.net/~tgamblin/ufw/distutils-to-setuptools] > > +Signed-off-by: Ross Burton <ross.burton@arm.com> > > + > > +diff --git a/setup.py b/setup.py > > +index cb67a6a..de648d3 100644 > > +--- a/setup.py > > ++++ b/setup.py > > +@@ -25,8 +25,8 @@ > > + # > > + > > + from __future__ import print_function > > +-from distutils.command.install import install as _install > > +-from distutils.core import setup > > ++from setuptools.command.install import install as _install > > ++from setuptools import setup > > + import errno > > + import os > > + import re > > diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > > index c427e4ffde..70216a85e3 100644 > > --- a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > > +++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb > > @@ -12,12 +12,13 @@ SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \ > > file://0001-optimize-boot.patch \ > > file://0002-add-an-option-to-specify-iptables-location.patch \ > > file://0003-only-make-one-reference-to-env.patch \ > > + file://setuptools.patch \ > > " > > SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" > > > > UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" > > > > -inherit distutils3 features_check systemd update-rc.d > > +inherit setuptools3_legacy features_check systemd update-rc.d > > > > RDEPENDS:${PN} = " \ > > iptables \ > > -- > > 2.25.1 > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#95784): https://lists.openembedded.org/g/openembedded-devel/message/95784 > Mute This Topic: https://lists.openembedded.org/mt/89548753/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch new file mode 100644 index 0000000000..ad5391cb98 --- /dev/null +++ b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch @@ -0,0 +1,20 @@ +Move to setuptools as distutils is now deprecated. + +Upstream-Status: Submitted [https://code.launchpad.net/~tgamblin/ufw/distutils-to-setuptools] +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/setup.py b/setup.py +index cb67a6a..de648d3 100644 +--- a/setup.py ++++ b/setup.py +@@ -25,8 +25,8 @@ + # + + from __future__ import print_function +-from distutils.command.install import install as _install +-from distutils.core import setup ++from setuptools.command.install import install as _install ++from setuptools import setup + import errno + import os + import re diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb index c427e4ffde..70216a85e3 100644 --- a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb +++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb @@ -12,12 +12,13 @@ SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \ file://0001-optimize-boot.patch \ file://0002-add-an-option-to-specify-iptables-location.patch \ file://0003-only-make-one-reference-to-env.patch \ + file://setuptools.patch \ " SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" -inherit distutils3 features_check systemd update-rc.d +inherit setuptools3_legacy features_check systemd update-rc.d RDEPENDS:${PN} = " \ iptables \
This package has a traditional setup.py which has a custom install command, which isn't supported with the modern wheel/pip installation method. Until upstream has moved away from distutils, use setuptools_legacy so the installation is correct. Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../ufw/ufw/setuptools.patch | 20 +++++++++++++++++++ .../recipes-connectivity/ufw/ufw_0.36.1.bb | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch