summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-nftables-python-Split-root-from-prefix.patch
blob: 377b29fff825c7a2ada1d933fca83e542b3ec93c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From c7513195a72b2e5be5c9c439cc606eb5dcc3fb7a Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Tue, 12 Jul 2022 17:44:34 +0100
Subject: [PATCH] nftables: python: Split root from prefix

The buildpaths QA check fails when python is enabled:

  WARNING: nftables-1.0.4-r0 do_package_qa: QA Issue: File /usr/lib/python3.10/site-packages/nftables/__pycache__/nftables.cpython-310.pyc in package nftables-python contains reference to TMPDIR
  File /usr/lib/python3.10/site-packages/nftables/__pycache__/__init__.cpython-310.pyc in package nftables-python contains reference to TMPDIR [buildpaths]

Upstream-Status: Pending
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 py/Makefile.am | 2 +-
 py/setup.py    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/py/Makefile.am b/py/Makefile.am
index 215ecd9e4751..a827cca10135 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -7,7 +7,7 @@ all-local:
 install-exec-local:
 	cd $(srcdir) && \
 		$(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \
-		install --prefix $(DESTDIR)$(prefix)
+		install --root $(DESTDIR) --prefix $(prefix)
 
 uninstall-local:
 	rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables
diff --git a/py/setup.py b/py/setup.py
index 72fc8fd98b26..976aec583b71 100755
--- a/py/setup.py
+++ b/py/setup.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-from distutils.core import setup
+from setuptools._distutils.core import setup
 from nftables import NFTABLES_VERSION
 
 setup(name='nftables',
-- 
2.35.1