From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82B02A3168 for ; Wed, 16 Oct 2019 15:25:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7837B1E87C; Wed, 16 Oct 2019 15:25:20 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B4E9A1E874 for ; Wed, 16 Oct 2019 15:25:18 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 06:25:17 -0700 X-IronPort-AV: E=Sophos;i="5.67,303,1566889200"; d="scan'208";a="186148663" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.95]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2019 06:25:15 -0700 Date: Wed, 16 Oct 2019 14:25:10 +0100 From: Bruce Richardson To: Anatoly Burakov Cc: dev@dpdk.org, Pawel Modrak , john.mcnamara@intel.com, thomas@monjalon.net, david.marchand@redhat.com Message-ID: <20191016132510.GB720@bricha3-MOBL.ger.corp.intel.com> References: <20190930092139.2440-1-marcinx.baran@intel.com> <1b260c38e92192c4fa432f5eabfa3b132aeafc32.1571229052.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b260c38e92192c4fa432f5eabfa3b132aeafc32.1571229052.git.anatoly.burakov@intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [PATCH v2 02/10] buildtools: add script for updating symbols abi version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Oct 16, 2019 at 01:43:17PM +0100, Anatoly Burakov wrote: > From: Pawel Modrak > > 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 > Signed-off-by: Anatoly Burakov > --- > > 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[a-zA-Z_0-9]+)\s*;\s*$") > + section_begin_regex = re.compile( > + r"\s*(?P[a-zA-Z0-9_\.]+)\s*{\s*$") > + section_end_regex = re.compile( > + r"\s*}\s*(?P[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.