lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230323190802.32206-1-michal.michalik@intel.com>
Date:   Thu, 23 Mar 2023 20:08:02 +0100
From:   Michal Michalik <michal.michalik@...el.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, Michal Michalik <michal.michalik@...el.com>
Subject: [PATCH net-next v3] tools: ynl: add the Python requirements.txt file

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@...el.com>
---
v3:
- let pip figure out dependencies on it's own (remove explicit deps)
- use semver to loosen the version requirements (ex. use `==4.*` to match
  any version with the 4.x.y API compatibility, so `<5.0.0`)
- change target tree `net` -> `net-next`
v2:
- add `Fixes:` tag
- fix spelling in commit message
---
 tools/net/ynl/requirements.txt | 2 ++
 1 file changed, 2 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..0db6ad0
--- /dev/null
+++ b/tools/net/ynl/requirements.txt
@@ -0,0 +1,2 @@
+jsonschema==4.*
+PyYAML==6.*
-- 
2.9.5

base-commit: fcb3a4653bc5fb0525d957db0cc8b413252029f8

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ