Skip to contentSkip to conversation

ufw: port to setuptools, use setuptools_legacy

PATCH In review Ross Burton 3 participants 3 messages Mar 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ufw: port to setuptools, use setuptools_legacy

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.

---
 .../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
meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch new file +20 -0
new file mode 100644
index 0000000000..ad5391cb98
@@ -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 <[email protected]>
+
+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
meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb +2 -1
index c427e4ffde..70216a85e3 100644
@@ -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 \
Signature · 1 line
2.25.1
#1 lore raw

Obviously this depends on the addition of setuptools_legacy to oe-core, which is on the list now.

Ross

Quoted 71 lines · Ross Burton via lists.openembedded.org

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.

---
 .../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
meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch new file +20 -0
new file mode 100644
index 0000000000..ad5391cb98
@@ -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 <[email protected]>
+
+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
meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb +2 -2
index c427e4ffde..70216a85e3 100644
@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 3 lines · Ross Burton

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.

Quoted 79 lines

Ross

Quoted 60 lines · Ross Burton via lists.openembedded.org

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.

---
 .../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
meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch new file +20 -0
new file mode 100644
index 0000000000..ad5391cb98
@@ -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 <[email protected]>
+
+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
meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb +2 -2
index c427e4ffde..70216a85e3 100644
@@ -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 \
--
Quoted 5 lines

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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-