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 E2393A0546; Thu, 16 Jul 2020 16:44:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B74881BFA1; Thu, 16 Jul 2020 16:44:32 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 1995F1BF5E for ; Thu, 16 Jul 2020 16:44:31 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id w3so11858319wmi.4 for ; Thu, 16 Jul 2020 07:44:31 -0700 (PDT) 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=XZnA8DaQF6TN1O47EF1nViVsn6njX2oxNRalcLUpWic=; b=WRtIRaKDikgPxh5ZueIFQxOnVIyxA19OpYrPnF9NbsRJDsba2uu3GlZonXl4KgtE5o mdpihuQINNostyy9jfcMt1SQeEILjD/8peLoA2bpyQq/mswqpFKJ4oJmY9K8JtZSfZml TYOSHo2OIt6DlOkw36IkEIdR7TirOAmA249VG5IFIZJFvDWmWC+T8PVLovi6ZS7oqAk6 5jf301Sp/gZQFzJnYJjFldhSewRjQxia59Tn/3Wx1kiJZQ2DVs0kf8G7Xy6QfdewqgR8 s1y5WzcHdwBIkogPPG5QgDG6uhFs/qaMjkWDJMDtICv0VBr72/FYnSIZWvpniYA8YJip CSqQ== 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=XZnA8DaQF6TN1O47EF1nViVsn6njX2oxNRalcLUpWic=; b=U7MY62rtL0czHL3dkHv9JrvkNNtogcT+g/TZy23JkiU1TUXkbzT3fA5So2rQEhVExI irwHezJiTcq7L/3NLX/BgC1QOguRBd102FNEit0TMD+QkJA3okElJ+PayDrlG4kaPff2 M/hWFGJ/4rwRcdn2BdXHG2K15nS+1EMlQkBPcX/TyRQtyc9qsNXuK/MgRFuoubsO1yc1 6wtCin8uHCGMmQGCZMozp1XnvApSLrIheFODd28KXGRweIDkZGTPBXcZHYm7TQnGKB+h nl6yrRAZiF7lPQgG2A7VMJgdBMwG5IXe/BNV5xLG0uqT2zokSPpuPtXpzzM1tOOYkYHS TOjg== X-Gm-Message-State: AOAM533np7c5F0ajty6REPfHha8JDJE38DMOFjJ7Os0kwKTG2oCXmucX AifB5egfNztOpJZqySBpQTaObw== X-Google-Smtp-Source: ABdhPJwQ3bNw4VNPS52C/TBvrppYHzC+o6kauNclYbIKfTfv+qcBLHwBhLaJIi+meNehjWjcuUh29Q== X-Received: by 2002:a1c:1f54:: with SMTP id f81mr4662943wmf.4.1594910670703; Thu, 16 Jul 2020 07:44:30 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u17sm9716520wrp.70.2020.07.16.07.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 07:44:29 -0700 (PDT) Date: Thu, 16 Jul 2020 16:44:29 +0200 From: Robin Jarry To: Bruce Richardson Cc: Louise Kilheeney , dev@dpdk.org, david.marchand@redhat.com Message-ID: <20200716144429.tf3agu7tfpy4nfp7@6wind.com> References: <20200710101055.33671-1-louise.kilheeney@intel.com> <20200710133358.j535wy7onvelu3ln@6wind.com> <20200713092149.GB694@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713092149.GB694@bricha3-MOBL.ger.corp.intel.com> User-Agent: NeoMutt/20180716 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" 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 -- Robin