All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: donald.hunter@gmail.com, kuba@kernel.org, stfomichev@gmail.com
Cc: pabeni@redhat.com, davem@davemloft.net, edumazet@google.com,
	horms@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jstancek@redhat.com
Subject: [PATCH v2 0/5] tools: ynl: add install target
Date: Mon,  9 Dec 2024 15:47:12 +0100	[thread overview]
Message-ID: <cover.1733755068.git.jstancek@redhat.com> (raw)

This series adds an install target for ynl. The python code
is moved to a subdirectory, so it can be used as a package
with flat layout, as well as directly from the tree.

To try the install as a non-root user you can run:
  $ mkdir /tmp/myroot
  $ make DESTDIR=/tmp/myroot install

  $ PATH="/tmp/myroot/usr/bin:$PATH" PYTHONPATH="$(ls -1d /tmp/myroot/usr/lib/python*/site-packages)" ynl --help

Proposed install layout is described in last patch.

Changes in v2:
- squashed 1st and 2nd patch together
- added symlinks for original user-facing scripts for backwards compatibility
- updated also Documentation and selftests references
  (tested Doc build and selftests ping.py test)

Jan Stancek (5):
  tools: ynl: move python code to separate sub-directory
  tools: ynl: provide symlinks to user-facing scripts for compatibility
  tools: ynl: add initial pyproject.toml for packaging
  tools: ynl: add install target for specs and docs
  tools: ynl: add main install target

 Documentation/Makefile                        |    2 +-
 Documentation/networking/multi-pf-netdev.rst  |    4 +-
 Documentation/networking/napi.rst             |    4 +-
 .../networking/netlink_spec/readme.txt        |    2 +-
 .../userspace-api/netlink/intro-specs.rst     |    8 +-
 tools/net/ynl/Makefile                        |   25 +-
 tools/net/ynl/cli.py                          |  120 +-
 tools/net/ynl/ethtool.py                      |  440 +--
 tools/net/ynl/generated/.gitignore            |    1 +
 tools/net/ynl/generated/Makefile              |   36 +-
 tools/net/ynl/lib/.gitignore                  |    1 -
 tools/net/ynl/lib/Makefile                    |    1 -
 tools/net/ynl/pyproject.toml                  |   26 +
 tools/net/ynl/pyynl/.gitignore                |    2 +
 tools/net/ynl/pyynl/__init__.py               |    0
 tools/net/ynl/pyynl/cli.py                    |  119 +
 tools/net/ynl/pyynl/ethtool.py                |  439 +++
 tools/net/ynl/{ => pyynl}/lib/__init__.py     |    0
 tools/net/ynl/{ => pyynl}/lib/nlspec.py       |    0
 tools/net/ynl/{ => pyynl}/lib/ynl.py          |    0
 tools/net/ynl/pyynl/ynl_gen_c.py              | 3018 ++++++++++++++++
 tools/net/ynl/pyynl/ynl_gen_rst.py            |  453 +++
 tools/net/ynl/ynl-gen-c.py                    | 3019 +----------------
 tools/net/ynl/ynl-gen-rst.py                  |  454 +--
 tools/net/ynl/ynl-regen.sh                    |    2 +-
 tools/testing/selftests/net/lib/py/ynl.py     |    4 +-
 tools/testing/selftests/net/ynl.mk            |    3 +-
 27 files changed, 4133 insertions(+), 4050 deletions(-)
 mode change 100755 => 120000 tools/net/ynl/cli.py
 mode change 100755 => 120000 tools/net/ynl/ethtool.py
 create mode 100644 tools/net/ynl/pyproject.toml
 create mode 100644 tools/net/ynl/pyynl/.gitignore
 create mode 100644 tools/net/ynl/pyynl/__init__.py
 create mode 100755 tools/net/ynl/pyynl/cli.py
 create mode 100755 tools/net/ynl/pyynl/ethtool.py
 rename tools/net/ynl/{ => pyynl}/lib/__init__.py (100%)
 rename tools/net/ynl/{ => pyynl}/lib/nlspec.py (100%)
 rename tools/net/ynl/{ => pyynl}/lib/ynl.py (100%)
 create mode 100755 tools/net/ynl/pyynl/ynl_gen_c.py
 create mode 100755 tools/net/ynl/pyynl/ynl_gen_rst.py
 mode change 100755 => 120000 tools/net/ynl/ynl-gen-c.py
 mode change 100755 => 120000 tools/net/ynl/ynl-gen-rst.py

-- 
2.43.0


             reply	other threads:[~2024-12-09 14:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:47 Jan Stancek [this message]
2024-12-09 14:47 ` [PATCH v2 1/5] tools: ynl: move python code to separate sub-directory Jan Stancek
2024-12-09 14:47 ` [PATCH v2 2/5] tools: ynl: provide symlinks to user-facing scripts for compatibility Jan Stancek
2024-12-11  3:26   ` Jakub Kicinski
2024-12-11  9:21     ` Donald Hunter
2024-12-11 12:42       ` Jan Stancek
2024-12-12  2:13         ` Jakub Kicinski
2024-12-09 14:47 ` [PATCH v2 3/5] tools: ynl: add initial pyproject.toml for packaging Jan Stancek
2024-12-09 14:47 ` [PATCH v2 4/5] tools: ynl: add install target for specs and docs Jan Stancek
2024-12-11  3:31   ` Jakub Kicinski
2024-12-09 14:47 ` [PATCH v2 5/5] tools: ynl: add main install target Jan Stancek
2024-12-09 21:30   ` Joe Damato
2024-12-10 13:56     ` Jan Stancek
2024-12-10 16:34       ` Joe Damato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1733755068.git.jstancek@redhat.com \
    --to=jstancek@redhat.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stfomichev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.