netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] tools: ynl: add the Python requirements.txt file
@ 2023-03-14 16:07 Michal Michalik
  2023-03-16  4:40 ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Michalik @ 2023-03-14 16:07 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, pabeni, edumazet, arkadiusz.kubalewski,
	Michal Michalik

It is a good practice to state explicitely 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

Signed-off-by: Michal Michalik <michal.michalik@intel.com>
---
 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] 8+ messages in thread

end of thread, other threads:[~2023-03-23 10:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 16:07 [PATCH net] tools: ynl: add the Python requirements.txt file Michal Michalik
2023-03-16  4:40 ` Jakub Kicinski
2023-03-20 19:03   ` Michalik, Michal
2023-03-20 22:16     ` Edward Cree
2023-03-21 12:34       ` Michalik, Michal
2023-03-21 17:52         ` Jakub Kicinski
2023-03-21 18:52           ` Edward Cree
2023-03-23 10:33             ` Michalik, Michal

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).