Skip to contentSkip to conversation

INSTALL: provide examples to install python bindings

PATCH In review Pablo Neira Ayuso 2 participants 3 messages Aug 21, 2023 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH v2 1/1 INSTALL: provide examples to install python bindings

Provide examples to install python bindings with legacy setup.py and pip with .toml file.

---
v2: add Jeremy's feedback.

 INSTALL | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
INSTALL +7 -3
index 53021e5aafc3..6539ebdd6457 100644
@@ -84,10 +84,14 @@ Installation instructions for nftables
  Python support
  ==============
 
- CPython bindings are available for nftables under the py/ folder.
+ CPython bindings are available for nftables under the py/ folder.  They can be
+ installed using pip:
 
- A pyproject.toml config file and legacy setup.py script are provided to install
- it.
+    python -m pip install py/
+
+ Alternatively, legacy setup.py script is also provided to install it:
+
+	python setup.py install
 
  Source code
  ===========
Signature · 1 line
2.30.2
#1 lore raw
Quoted 35 lines · Pablo Neira Ayuso

Provide examples to install python bindings with legacy setup.py and pip with .toml file.

---
v2: add Jeremy's feedback.

 INSTALL | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
INSTALL +7 -3
index 53021e5aafc3..6539ebdd6457 100644
@@ -84,10 +84,14 @@ Installation instructions for nftables
  Python support
  ==============
 
- CPython bindings are available for nftables under the py/ folder.
+ CPython bindings are available for nftables under the py/ folder.  They can be
+ installed using pip:
 
- A pyproject.toml config file and legacy setup.py script are provided to install
- it.
+    python -m pip install py/
+
+ Alternatively, legacy setup.py script is also provided to install it:
+
+	python setup.py install
 
  Source code
  ===========
Signature · 1 line
2.30.2

If you want to retain a reference to setup.py, then how about this patch?

J.

From 415b23098ad9d48bd6f45f3edc589abcb9aaf87a Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <[email protected]>
Date: Mon, 21 Aug 2023 13:28:40 +0200
Subject: [PATCH] INSTALL: provide examples to install python bindings

Provide examples to install python bindings with legacy setup.py and pip with .toml file.

---
 INSTALL | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
INSTALL +9 -3
index 53021e5aafc3..5d45ec988c9f 100644
@@ -84,10 +84,16 @@ Installation instructions for nftables
  Python support
  ==============
 
- CPython bindings are available for nftables under the py/ folder.
+ CPython bindings are available for nftables under the py/ folder.  They can be
+ installed using pip:
 
- A pyproject.toml config file and legacy setup.py script are provided to install
- it.
+	python -m pip install py/
+
+ A legacy setup.py script can also be used:
+
+	( cd py && python setup.py install )
+
+ However, this method is deprecated.
 
  Source code
  ===========
Signature · 1 line
2.40.1
author maintainer
#2 lore raw
Quoted 31 lines · Jeremy Sowden
Quoted 30 lines · Pablo Neira Ayuso

Provide examples to install python bindings with legacy setup.py and pip with .toml file.

---
v2: add Jeremy's feedback.

 INSTALL | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
INSTALL +7 -3
index 53021e5aafc3..6539ebdd6457 100644
@@ -84,10 +84,14 @@ Installation instructions for nftables
  Python support
  ==============
 
- CPython bindings are available for nftables under the py/ folder.
+ CPython bindings are available for nftables under the py/ folder.  They can be
+ installed using pip:
 
- A pyproject.toml config file and legacy setup.py script are provided to install
- it.
+    python -m pip install py/
+
+ Alternatively, legacy setup.py script is also provided to install it:
+
+	python setup.py install
 
Quoted 8 lines
Quoted 5 lines
INSTALL +0 -0
  Source code
  ===========
Signature · 1 line
2.30.2

If you want to retain a reference to setup.py, then how about this patch?

Patch is applied here:

http://git.netfilter.org/nftables/commit/?id=97c28c926096950f1646c99b85a31de309429a0c

Thanks for your feedback.