[dpdk-dev] [PATCH v2 02/10] buildtools: add script for updating symbols abi version
Bruce Richardson
bruce.richardson at intel.com
Wed Oct 16 15:25:10 CEST 2019
On Wed, Oct 16, 2019 at 01:43:17PM +0100, Anatoly Burakov wrote:
> From: Pawel Modrak <pawelx.modrak at intel.com>
>
> Add a script that automatically merges all stable ABI's under one
> ABI section with the new version, while leaving experimental
> section exactly as it is.
>
> Signed-off-by: Pawel Modrak <pawelx.modrak at intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
> v2:
> - Reworked script to be pep8-compliant and more reliable
>
> buildtools/update_version_map_abi.py | 148 +++++++++++++++++++++++++++
> 1 file changed, 148 insertions(+)
> create mode 100755 buildtools/update_version_map_abi.py
>
> diff --git a/buildtools/update_version_map_abi.py b/buildtools/update_version_map_abi.py
> new file mode 100755
> index 0000000000..ea9044cc81
> --- /dev/null
> +++ b/buildtools/update_version_map_abi.py
> @@ -0,0 +1,148 @@
> +#!/usr/bin/env python
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2019 Intel Corporation
> +
> +"""
> +A Python program to update the ABI version and function names in a DPDK
> +lib_*_version.map file. Called from the buildtools/update_abi.sh utility.
> +"""
> +
> +from __future__ import print_function
> +import argparse
> +import sys
> +import re
> +
> +
> +def __parse_map_file(f_in):
> + func_line_regex = re.compile(r"\s*(?P<func>[a-zA-Z_0-9]+)\s*;\s*$")
> + section_begin_regex = re.compile(
> + r"\s*(?P<version>[a-zA-Z0-9_\.]+)\s*{\s*$")
> + section_end_regex = re.compile(
> + r"\s*}\s*(?P<parent>[a-zA-Z0-9_\.]+)?\s*;\s*$")
> +
To help readers of the code, can you put in a line or two of comment
explaining each regex a bit above.
More information about the dev
mailing list