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 20BFBA0531; Fri, 24 Jan 2020 13:28:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5DCCD2BDB; Fri, 24 Jan 2020 13:28:10 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id D971D2A6C for ; Fri, 24 Jan 2020 13:28:08 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id z7so1728852wrl.13 for ; Fri, 24 Jan 2020 04:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4nXS9EtRPQm+ECimPLRUJcoCrwan9mjcHWcKUashrmU=; b=EAqYDLwfyj9jmPctieMdfKhO3iJ8Up7avEkca1AvdPbL5pTBa7dcqU6Z9OX0wC+BjV XE4Q81Cuq07g/JwgAqvvc5kJdkor/jVTgtYvqtl+NVliZaNw0T0KV3kt3fKArEGoMlCU mJeyr8igjOkdHbzdTzAlco5i/jMiXhVRv/IutfOihkiz6JaG4zx6S4jHDHj/taw1d/Ln aZYmucGgRYEpqFC/OBPOVGgK3OwJ2A+7wXvatevyIYwnHyRtu3DkYFe6Ju3C7xtt6Maz EOfy0xgLsy68sb5K4cRZaOGB5RcX5cR5+tBNxAioL5qxl8hDtHu9/1po6vJ+8cgXJnPu B+LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4nXS9EtRPQm+ECimPLRUJcoCrwan9mjcHWcKUashrmU=; b=nQC5ehlxjChVllhQ5ZNid+OadMfpQKh3pjAzAwHKVOgBckK8epI2CUR/TabtRFRx28 RoZK+9Lok3m+DnYw5mZ/LEFqPE7rP0aSFas8RAJLJiDcO5s7W+Tx9p1of73VX49nZpYg 9+PWhTeNf+WKUfWEtdeWGrG5CyMME5N1zphmoJQm5Hm0z5/ZsQFNKp2aN1GdM654F1wC nlMKij5rD8Xge7VeN8w3gd7QAsVFOeq100ObFRqE3Z/+sDDbWE14gRbiAj823XOw44Js ZB6ek2asrYmHjjyADQ9EEcxCeHwHKajlPy0PX1l8hqi07H1ry8i+J00iOo5NWF1zT+Cd uWaQ== X-Gm-Message-State: APjAAAV/6s7WiS1plUz8xAtY4T6Z7sB3bpwg7fTpE03cHKTiFbI5cG25 01kZl0U++soQy60F5mZdtpSflDWA4+Q= X-Google-Smtp-Source: APXvYqw6VSYwjsY977EdXbdO5hwsacGNjmu8M1bW0z2kwJLPU3KJzZVciOG3P5QMBgTRKRQlkdb+Og== X-Received: by 2002:adf:e6c6:: with SMTP id y6mr4041139wrm.284.1579868888599; Fri, 24 Jan 2020 04:28:08 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t81sm6844122wmg.6.2020.01.24.04.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2020 04:28:07 -0800 (PST) Date: Fri, 24 Jan 2020 13:28:07 +0100 From: Robin Jarry To: Bruce Richardson Cc: dev@dpdk.org, thomas@monjalon.net Message-ID: <20200124122807.5jgyogqxyogy5yug@6wind.com> References: <20200120173725.57529-1-bruce.richardson@intel.com> <20200124103257.44092-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200124103257.44092-1-bruce.richardson@intel.com> User-Agent: NeoMutt/20180716 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" 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=crypto/*,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 As a general rule, it is better to only import one symbol per line. This makes subsequent patches easier to read. > +if len(sys.argv) != 2: > + print("Usage: {0} [,[,...]]".format(sys.argv[0])) > + sys.exit(1) 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? > +root = '.' > +if 'MESON_SOURCE_ROOT' in os.environ and 'MESON_SUBDIR' in os.environ: > + root = join(os.environ['MESON_SOURCE_ROOT'], os.environ['MESON_SUBDIR']) You can do simpler and shorter: root = join(os.getenv('MESON_SOURCE_ROOT', ''), os.getenv('MESON_SUBDIR', ''), '.') Sorry to pester you with all this, but python code in DPDK really needs some loving :-) -- Robin