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 1821EA0548; Thu, 16 Jul 2020 23:01:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 706154F9A; Thu, 16 Jul 2020 23:01:33 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 41A9B2C2B for ; Thu, 16 Jul 2020 23:01:31 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id q17so4390159pls.9 for ; Thu, 16 Jul 2020 14:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QE3S2+BwOie1iY8YwPTOR/8fQy/7wPZ/CzegVaVtw7o=; b=KByOrFjNjJzIT2KmUErQONRVVpAWoWR00IC3UFZZ6Q3PGm+kZVXNvl2h1YdIBmiynq 7IvCAYVultk2+Bte7nMkjDi4L/SPU/AjQGsi3X5XpUzvfgRf6ouD4YQjgl+L+fod/0Lt aDd7lDzBFCO8AU0/jVq21f1poItGZzWRq9rHF/arfvGIPHV9Pz8gk8XerZWWA5I3HQaf +3MR2n8yUFzLBurukDUk5pK82RWBaZXCqoBfhOmq656weiz6PcOKffg3U0Q9jfaPf6iS VK+4A1a65MoFEtFNh5Y3UjLHxH8vpCZ9MD836jJl8TkcnU1Zh9LGXRPpMnZ5RVmnuVd8 nRUg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QE3S2+BwOie1iY8YwPTOR/8fQy/7wPZ/CzegVaVtw7o=; b=jlawY0DxH7o+VRkGthh/DsvEiWXNP1kH5EWw5rwg4IMFUE9+D2D+mKyxPgn4b4XG1e eHvVqe2N2zwxoOqgbXOmftayC9jg0KScxMweNmiz+5pOt0+1NsgBqRVxYMFIdzaFO20C 6mkUDGerp10n+REWDCQbiNc9Tk82Qgvi+yQNi7h6ktnPQgp2dxZLQcIf2O/66rb79S9K ZkdvAGl6SSJAvn8ot0Gty+25ziWvKRXjOf9wbOkqvoeq8SWOrHLRZ8OFR0NpvXW3+uEH cfMOYcmONsxfuch+vo+q0S3GC96EhtxmSqeloGeB8Tb/p+OC150QLWKC89oElzPNoM7G lhJA== X-Gm-Message-State: AOAM530XquGncSFnLZqTPXBUhQIQz6jDS+s+hqSAy1SVdGngjreXJBVL xUH0RHNMDNNWbLJNTSHxo4m2mg== X-Google-Smtp-Source: ABdhPJxBSus0VX44I66iagDhBwuGi0AnEXjHrI4mSthwz25l5rcCjr76FsxaZNN+9shSqGlPXxoZDA== X-Received: by 2002:a17:902:ee14:: with SMTP id z20mr4961957plb.265.1594933290358; Thu, 16 Jul 2020 14:01:30 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c187sm5518034pfc.146.2020.07.16.14.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 14:01:30 -0700 (PDT) Date: Thu, 16 Jul 2020 14:01:21 -0700 From: Stephen Hemminger To: Robin Jarry Cc: Bruce Richardson , Louise Kilheeney , dev@dpdk.org, david.marchand@redhat.com Message-ID: <20200716140121.7a6da720@hermes.lan> In-Reply-To: <20200716144429.tf3agu7tfpy4nfp7@6wind.com> References: <20200710101055.33671-1-louise.kilheeney@intel.com> <20200710133358.j535wy7onvelu3ln@6wind.com> <20200713092149.GB694@bricha3-MOBL.ger.corp.intel.com> <20200716144429.tf3agu7tfpy4nfp7@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/9] python2 deprecation notice 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 Thu, 16 Jul 2020 16:44:29 +0200 Robin Jarry wrote: > 2020-07-13, Bruce Richardson: > > In the absense of a "proper" solution, is the simplest option to > > change the shebangs to all be python3, but leave the python2 > > compatibility in place, and add the warnings for anyone running it > > explicitly using python2? > > I have found a hacky[1] but somewhat not too ugly way to dynamically use > any available python interpreter. > > Basically, the scripts shebangs become: > > #!/bin/sh > # shell script hack to dynamically use any available python interpreter > ''':' > if command -pv python3 >/dev/null 2>&1; then > exec python3 "$0" "$@" > else > exec python2 "$0" "$@" > fi > ''' > # real python code starts here > > This hack obviously would remain only for the time where we still have > python 2 support and can be removed after 20.08 is released. > > What do you think? > > [1] https://unix.stackexchange.com/a/66242 > No.