mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] ca-certificates: call python2 instead of python
Date: Fri, 1 Jul 2016 16:31:31 +0200	[thread overview]
Message-ID: <20160701143130.GB846@archie.localdomain> (raw)
In-Reply-To: <20160701103755.GN18320@pengutronix.de>

On Fri, Jul 01, 2016 at 12:37:55PM +0200, Michael Olbrich wrote:
> Can you try '#!/usr/bin/env python'? That should work too.

That won't work, because the problem is not the path itself, it's that
python is symlinked to python3 on Arch and probably in the future in
other distros as well. Arch is just a little ahead.

/usr/bin/env python --version returns "Python 3.5.1" on ArchLinux.

We could use /usr/bin/env python2 but that would only be good for
systems where python2 is not in /usr/bin but that does not seem to be
the problem.
A python2 symlink exists also on Debian, so /usr/bin/python2 should work
for most systems.

Otherwise we would need a logic like the following:

#!/bin/sh
''':'
if type python2 >/dev/null 2>/dev/null; then
  exec python2 "$0" "$@"
else
  exec python "$0" "$@"
fi
'''
# real Python script starts here

Would you prefer that?

Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2016-07-01 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  9:15 [ptxdist] [PATCH] libcurl: bump version and fix URL Clemens Gruber
2016-07-01  9:15 ` [ptxdist] [PATCH] ca-certificates: update certificates Clemens Gruber
2016-07-01  9:15 ` [ptxdist] [PATCH] ca-certificates: call python2 instead of python Clemens Gruber
2016-07-01 10:37   ` Michael Olbrich
2016-07-01 14:31     ` Clemens Gruber [this message]
2016-07-04  6:16       ` Michael Olbrich
2016-07-04 15:51         ` Clemens Gruber
2016-07-01  9:15 ` [ptxdist] [PATCH] mpg123: bump version to 1.23.5 Clemens Gruber

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=20160701143130.GB846@archie.localdomain \
    --to=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /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