mbox series

[v6,0/3] pmdinfogen: rewrite in Python

Message ID 20201004015947.9012-1-dmitry.kozliuk@gmail.com (mailing list archive)
Headers
Series pmdinfogen: rewrite in Python |

Message

Dmitry Kozlyuk Oct. 4, 2020, 1:59 a.m. UTC
  This patchset implements existing pmdinfogen logic in Python, replaces
and removes the old code. The goals of rewriting are:

* easier maintenance by using a more high-level language,
* simpler build process without host application and libelf,
* foundation for adding Windows support.

Travis CI script is adjusted to install python3-pyelftools, but other CI
systems may need similar tweaking. Particularly, testing on FreeBSD and
big-endian targets is desired.

Acked-by: Neil Horman <nhorman@tuxdriver.com>

---
Changes in v6:

1. Address yapf and pylint warnings (Stephen Hemminger).
2. Add myself as new implementation maintainer (Thomas Monjalon).

Dmitry Kozlyuk (3):
  pmdinfogen: add Python implementation
  build: use Python pmdinfogen
  pmdinfogen: remove C implementation

 .travis.yml                        |   2 +-
 MAINTAINERS                        |   3 +-
 buildtools/gen-pmdinfo-cfile.sh    |   6 +-
 buildtools/meson.build             |   1 +
 buildtools/pmdinfogen.py           | 189 ++++++++++++
 buildtools/pmdinfogen/meson.build  |  14 -
 buildtools/pmdinfogen/pmdinfogen.c | 456 -----------------------------
 buildtools/pmdinfogen/pmdinfogen.h | 119 --------
 doc/guides/linux_gsg/sys_reqs.rst  |   6 +
 drivers/meson.build                |   2 +-
 meson.build                        |   1 -
 11 files changed, 203 insertions(+), 596 deletions(-)
 create mode 100755 buildtools/pmdinfogen.py
 delete mode 100644 buildtools/pmdinfogen/meson.build
 delete mode 100644 buildtools/pmdinfogen/pmdinfogen.c
 delete mode 100644 buildtools/pmdinfogen/pmdinfogen.h
  

Comments

Maxime Coquelin Oct. 14, 2020, 2:37 p.m. UTC | #1
Hi Dmitry,

On 10/4/20 3:59 AM, Dmitry Kozlyuk wrote:
> This patchset implements existing pmdinfogen logic in Python, replaces
> and removes the old code. The goals of rewriting are:
> 
> * easier maintenance by using a more high-level language,
> * simpler build process without host application and libelf,
> * foundation for adding Windows support.
> 
> Travis CI script is adjusted to install python3-pyelftools, but other CI
> systems may need similar tweaking. Particularly, testing on FreeBSD and
> big-endian targets is desired.
> 
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> 
> ---
> Changes in v6:
> 
> 1. Address yapf and pylint warnings (Stephen Hemminger).
> 2. Add myself as new implementation maintainer (Thomas Monjalon).
> 
> Dmitry Kozlyuk (3):
>   pmdinfogen: add Python implementation
>   build: use Python pmdinfogen
>   pmdinfogen: remove C implementation
> 
>  .travis.yml                        |   2 +-
>  MAINTAINERS                        |   3 +-
>  buildtools/gen-pmdinfo-cfile.sh    |   6 +-
>  buildtools/meson.build             |   1 +
>  buildtools/pmdinfogen.py           | 189 ++++++++++++
>  buildtools/pmdinfogen/meson.build  |  14 -
>  buildtools/pmdinfogen/pmdinfogen.c | 456 -----------------------------
>  buildtools/pmdinfogen/pmdinfogen.h | 119 --------
>  doc/guides/linux_gsg/sys_reqs.rst  |   6 +
>  drivers/meson.build                |   2 +-
>  meson.build                        |   1 -
>  11 files changed, 203 insertions(+), 596 deletions(-)
>  create mode 100755 buildtools/pmdinfogen.py
>  delete mode 100644 buildtools/pmdinfogen/meson.build
>  delete mode 100644 buildtools/pmdinfogen/pmdinfogen.c
>  delete mode 100644 buildtools/pmdinfogen/pmdinfogen.h
> 

Ninja fails when pyelftools is not installed.
Shouldn't meson detect and report it before build time?

Thanks,
Maxime
  
Dmitry Kozlyuk Oct. 14, 2020, 3:40 p.m. UTC | #2
Hi Maxime,

> Ninja fails when pyelftools is not installed.
> Shouldn't meson detect and report it before build time? 

Will add in v7. Meson 0.51 introduced a terse way to check for Python
dependencies, but it's not hard even with Meson 0.47.1.

https://github.com/mesonbuild/meson/issues/3551#issuecomment-518320640