blob: 377b29fff825c7a2ada1d933fca83e542b3ec93c [file] [log] [blame]
Andrew Geissler615f2f12022-07-15 14:00:58 -05001From c7513195a72b2e5be5c9c439cc606eb5dcc3fb7a Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Tue, 12 Jul 2022 17:44:34 +0100
4Subject: [PATCH] nftables: python: Split root from prefix
5
6The buildpaths QA check fails when python is enabled:
7
8 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
9 File /usr/lib/python3.10/site-packages/nftables/__pycache__/__init__.cpython-310.pyc in package nftables-python contains reference to TMPDIR [buildpaths]
10
11Upstream-Status: Pending
12Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
13---
14 py/Makefile.am | 2 +-
15 py/setup.py | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/py/Makefile.am b/py/Makefile.am
19index 215ecd9e4751..a827cca10135 100644
20--- a/py/Makefile.am
21+++ b/py/Makefile.am
22@@ -7,7 +7,7 @@ all-local:
23 install-exec-local:
24 cd $(srcdir) && \
25 $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \
26- install --prefix $(DESTDIR)$(prefix)
27+ install --root $(DESTDIR) --prefix $(prefix)
28
29 uninstall-local:
30 rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables
31diff --git a/py/setup.py b/py/setup.py
32index 72fc8fd98b26..976aec583b71 100755
33--- a/py/setup.py
34+++ b/py/setup.py
35@@ -1,5 +1,5 @@
36 #!/usr/bin/env python
37-from distutils.core import setup
38+from setuptools._distutils.core import setup
39 from nftables import NFTABLES_VERSION
40
41 setup(name='nftables',
42--
432.35.1
44