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 3ECB3A0533; Fri, 24 Jan 2020 15:58:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CF902BDB; Fri, 24 Jan 2020 15:58:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 812F72BD5 for ; Fri, 24 Jan 2020 15:57:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2020 06:57:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,358,1574150400"; d="scan'208";a="251304748" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga004.fm.intel.com with ESMTP; 24 Jan 2020 06:57:55 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.164]) by IRSMSX106.ger.corp.intel.com ([169.254.8.38]) with mapi id 14.03.0439.000; Fri, 24 Jan 2020 14:57:55 +0000 From: "Richardson, Bruce" To: Robin Jarry CC: "dev@dpdk.org" , "thomas@monjalon.net" Thread-Topic: [PATCH v3] build: allow using wildcards to disable drivers Thread-Index: AQHV0qIaC3yQvmyJSUuE1E+mGPtVmqf5vjKAgAApqYA= Date: Fri, 24 Jan 2020 14:57:54 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B097560DB1@IRSMSX103.ger.corp.intel.com> References: <20200120173725.57529-1-bruce.richardson@intel.com> <20200124103257.44092-1-bruce.richardson@intel.com> <20200124122807.5jgyogqxyogy5yug@6wind.com> In-Reply-To: <20200124122807.5jgyogqxyogy5yug@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] build: allow using wildcards to disable drivers 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" > -----Original Message----- > From: Robin Jarry > Sent: Friday, January 24, 2020 12:28 PM > To: Richardson, Bruce > Cc: dev@dpdk.org; thomas@monjalon.net > Subject: Re: [PATCH v3] build: allow using wildcards to disable drivers >=20 > 2020-01-24, Bruce Richardson: > > Rather than having to explicitly list each and every driver to disable > > in a build, we can use a small python script and the python glob > > library to expand out the wildcards. This means that we can configure > meson using e.g. > > > > meson -Ddisable_drivers=3Dcrypto/*,event/* build > > > > to do a build omitting all the crypto and event drivers. Explicitly > > specified drivers e.g. net/i40e, work as before, and can be mixed with > > wildcarded drivers as required. > > > > Signed-off-by: Bruce Richardson > [snip] > > +from os.path import join, relpath, isdir >=20 > As a general rule, it is better to only import one symbol per line. This > makes subsequent patches easier to read. >=20 > > +if len(sys.argv) !=3D 2: > > + print("Usage: {0} > > +[,[,...]]".format(sys.argv[0])) > > + sys.exit(1) >=20 > PEP8 advises to use 4 spaces per indentation level. This is the > indentation style adopted by all other python scripts in dpdk (see > doc/guides/contributing/coding_style.rst). Could you fix that? >=20 > > +root =3D '.' > > +if 'MESON_SOURCE_ROOT' in os.environ and 'MESON_SUBDIR' in os.environ: > > + root =3D join(os.environ['MESON_SOURCE_ROOT'], > > +os.environ['MESON_SUBDIR']) >=20 > You can do simpler and shorter: >=20 > root =3D join(os.getenv('MESON_SOURCE_ROOT', ''), > os.getenv('MESON_SUBDIR', ''), '.') I think a little shorter again by putting the '.' as the default value for = one of the env vars. >=20 > Sorry to pester you with all this, but python code in DPDK really needs > some loving :-) >=20 > -- > Robin