linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Lippers-Hollmann <s.l-h@gmx.de>
To: Taahir Ahmed <ahmed.taahir@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] Support python 3 in utils/key2pub.py.
Date: Wed, 22 Jul 2015 06:01:24 +0200	[thread overview]
Message-ID: <20150722060124.250c6f2c@mir> (raw)
In-Reply-To: <2988720.J8nzy94PWW@basis>

Hi

On 2015-07-21, Taahir Ahmed wrote:
> On Wednesday 22 July 2015 04:50:45 Stefan Lippers-Hollmann wrote:
> > You omit $(pwd) from ./utils/key2pub.py, while /utils/key2pub.py
> > won't exist.
> 
> Wow, that's a really bad mistake on my part.  It should indeed probably
> be './utils/key2pub.py'.  I made this change after my general testing,
> simply because emacs was undoing the execute bit every time I saved
> key2pub.py.
> 
> It's not really a material change, so I'll probably just put it back the
> way it was.
> 
> The rest of the patch is tested, I pinky-swear :)
>  
> > As little as I know about python packaging policies in Debian
> > (and probably Fedora), /usr/bin/python is never supposed to point
> > to python3 - afaik the interpreter should always be called python3
> > there, so I don't really see how that's going to work there.
> 
> I'm not assuming that the system interpreter is any particular version:
> key2pub.py has been modified so it runs under either 2.7 or 3.x.
> 
> Some more simplification might be possible if 2.7 support is dropped,
> but not much, and I didn't want to rock the boat.

The problem, as I understand it, is that the python3 interpreter will
never be available as (/usr/bin/)python on Debian (or Fedora; even if
python2.x is not installed on the system), but always be called python3. 
So your new python3 compatibility is never actually used, neither on a 
python3-only system.

Therefore I'd suggest this approach instead, either make the python
interpreter user configurable, e.g.:

PYTHON ?= python

so the user can specify the interpreter when invoking make (as in
make PYTHON=python3), xor trying to auto-detect it (untested):

ifeq ($(shell which python3),)
  PYTHON = python
else
  PYTHON = python3
endif

and then using 

$(Q) $(PYTHON) ./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@

wherever python is needed.

Regards
	Stefan Lippers-Hollmann

  reply	other threads:[~2015-07-22  4:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22  0:37 Support Python3 in the crda buildsystem ahmed.taahir
2015-07-22  0:37 ` [PATCH 1/2] Support python 3 in utils/key2pub.py ahmed.taahir
2015-07-22  2:50   ` Stefan Lippers-Hollmann
2015-07-22  2:59     ` Taahir Ahmed
2015-07-22  4:01       ` Stefan Lippers-Hollmann [this message]
2015-07-22  0:37 ` [PATCH 2/2] Small build system improvements ahmed.taahir
2015-07-22  5:21 Support Python 3 in the crda build system (Take 2) ahmed.taahir
2015-07-22  5:21 ` [PATCH 1/2] Support python 3 in utils/key2pub.py ahmed.taahir
2019-12-25 16:19   ` jtojnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150722060124.250c6f2c@mir \
    --to=s.l-h@gmx.de \
    --cc=ahmed.taahir@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).