* [PATCH net v2] tools: ynl: add the Python requirements.txt file
@ 2023-03-15 12:28 Michal Michalik
2023-03-16 4:41 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Michal Michalik @ 2023-03-15 12:28 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, pabeni, edumazet, arkadiusz.kubalewski,
Michal Michalik
It is a good practice to state explicitly which are the required Python
packages needed in a particular project to run it. The most commonly
used way is to store them in the `requirements.txt` file*.
*URL: https://pip.pypa.io/en/stable/reference/requirements-file-format/
Currently user needs to figure out himself that Python needs `PyYAML`
and `jsonschema` (and theirs requirements) packages to use the tool.
Add the `requirements.txt` for user convenience.
How to use it:
1) (optional) Create and activate empty virtual environment:
python3.X -m venv venv3X
source ./venv3X/bin/activate
2) Install all the required packages:
pip install -r requirements.txt
or
python -m pip install -r requirements.txt
3) Run the script!
The `requirements.txt` file was tested for:
* Python 3.6
* Python 3.8
* Python 3.10
Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink")
Signed-off-by: Michal Michalik <michal.michalik@intel.com>
---
v2:
- add `Fixes:` tag
- fix spelling in commit message
---
tools/net/ynl/requirements.txt | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 tools/net/ynl/requirements.txt
diff --git a/tools/net/ynl/requirements.txt b/tools/net/ynl/requirements.txt
new file mode 100644
index 0000000..2ad25d9
--- /dev/null
+++ b/tools/net/ynl/requirements.txt
@@ -0,0 +1,7 @@
+attrs==22.2.0
+importlib-metadata==4.8.3
+jsonschema==4.0.0
+pyrsistent==0.18.0
+PyYAML==6.0
+typing-extensions==4.1.1
+zipp==3.6.0
--
2.9.5
base-commit: bcc858689db5f2e5a8d4d6e8bc5bb9736cd80626
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v2] tools: ynl: add the Python requirements.txt file
2023-03-15 12:28 [PATCH net v2] tools: ynl: add the Python requirements.txt file Michal Michalik
@ 2023-03-16 4:41 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2023-03-16 4:41 UTC (permalink / raw)
To: Michal Michalik; +Cc: netdev, davem, pabeni, edumazet, arkadiusz.kubalewski
On Wed, 15 Mar 2023 13:28:11 +0100 Michal Michalik wrote:
> It is a good practice to state explicitly which are the required Python
> packages needed in a particular project to run it. The most commonly
> used way is to store them in the `requirements.txt` file*.
Ah, missed this, let's continue discussion on v1.
Also take a look at:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-16 4:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15 12:28 [PATCH net v2] tools: ynl: add the Python requirements.txt file Michal Michalik
2023-03-16 4:41 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).