all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Python 3 binaries
@ 2013-08-31 15:30 Andreas Enge
  2013-08-31 17:30 ` Cyril Roelandt
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Enge @ 2013-08-31 15:30 UTC (permalink / raw)
  To: guix-devel

Hello,

python 3 does not ship a python binary any more, just a binary called
python3. That could be useful, since it would allow to install python 2 and 3
side by side. However, all packages relying on a shebang substitution with
a python binary now fail.

I see two general possibilities to solve the problem:
- The simplest one, add a symlink python->python3 in the python 3 package.
  But then we lose the possibility of installing python 2 and 3 at the same
  time. Which maybe does not matter? It would only be a problem for a user
  wanting to install both in the user profile, while all other packages
  would internally have rewritten their calls to either of the two python
  versions
- In the patch-shebang phase, we could, if the python binary is not
  available, look for the python 3 binary. But that would mean special code
  only for python.

Personally, I would tend to the first solution. But what do you think?

Andreas

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Python 3 binaries
@ 2013-09-01  8:20 Brandon Invergo
  2013-09-01 13:49 ` Andreas Enge
  0 siblings, 1 reply; 15+ messages in thread
From: Brandon Invergo @ 2013-09-01  8:20 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2635 bytes --]

Hi everyone,

> python 3 does not ship a python binary any more, just a binary called
> python3. That could be useful, since it would allow to install python
> 2 and 3 side by side. However, all packages relying on a shebang
> substitution with a python binary now fail.

Here's what it looks like on my Parabola system, which I think is a sane
way of doing it (ok, there's no *truly* sane way of doing it):

$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root  1K May 21 17:50 /usr/bin/python -> python3
lrwxrwxrwx 1 root root  1K May 21 17:50 /usr/bin/python-config -> python3-config
lrwxrwxrwx 1 root root  1K May 12 18:01 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root  1K May 12 18:01 /usr/bin/python2-config -> python2.7-config
-rwxr-xr-x 1 root root  7K May 12 18:01 /usr/bin/python2.7
-rwxr-xr-x 1 root root  2K May 12 18:01 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root  1K May 21 17:50 /usr/bin/python3 -> python3.3
lrwxrwxrwx 1 root root  1K May 21 17:50 /usr/bin/python3-config -> python3.3-config
-rwxr-xr-x 2 root root 11K May 21 17:50 /usr/bin/python3.3
lrwxrwxrwx 1 root root  1K May 21 17:50 /usr/bin/python3.3-config -> python3.3m-config
-rwxr-xr-x 2 root root 11K May 21 17:50 /usr/bin/python3.3m
-rwxr-xr-x 1 root root  2K May 21 17:50 /usr/bin/python3.3m-config

$ ls -l /usr/bin/idle*
lrwxrwxrwx 1 root root 1K May 21 17:50 /usr/bin/idle -> idle3
-rwxr-xr-x 1 root root 1K May 12 18:01 /usr/bin/idle2
lrwxrwxrwx 1 root root 1K May 21 17:50 /usr/bin/idle3 -> idle3.3
-rwxr-xr-x 1 root root 1K May 21 17:50 /usr/bin/idle3.3

$ ls -l /usr/bin/pydoc*
lrwxrwxrwx 1 root root 1K May 21 17:50 /usr/bin/pydoc -> pydoc3
-rwxr-xr-x 1 root root 1K May 12 18:01 /usr/bin/pydoc2
lrwxrwxrwx 1 root root 1K May 21 17:50 /usr/bin/pydoc3 -> pydoc3.3
-rwxr-xr-x 1 root root 1K May 21 17:50 /usr/bin/pydoc3.3

$ ls -l /usr/bin/2to3*
lrwxrwxrwx 1 root root 1K May 21 17:50 /usr/bin/2to3 -> 2to3-3.3
-rwxr-xr-x 1 root root 1K May 12 18:01 /usr/bin/2to3-2.7
-rwxr-xr-x 1 root root 1K May 21 17:50 /usr/bin/2to3-3.3

I think Debian is similar, but with Python 2 being the default rather
than Python 3.

Shebangs are routinely changed in Parabola to accommodate this but since
shebangs are also routinely being changed in Guix anyway, this shouldn't
be a problem. 

So, the install scripts will require a bit of post-processing to
generate the symlinks and to move around some binaries to avoid
conflicts, but I think this is the only thing you can do.

Cheers, 
-brandon

ps - great meeting some of you last week in Paris!

-- 
Brandon Invergo
http://brandon.invergo.net

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-09-08 18:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-31 15:30 Python 3 binaries Andreas Enge
2013-08-31 17:30 ` Cyril Roelandt
2013-08-31 18:20   ` Ludovic Courtès
2013-09-01  9:28   ` Andreas Enge
2013-09-01 10:03     ` Andreas Enge
2013-09-01 14:03     ` Ludovic Courtès
2013-09-01 14:39       ` Andreas Enge
2013-09-01 17:34         ` Ludovic Courtès
2013-09-01 17:40           ` Cyril Roelandt
2013-09-01 18:21             ` Andreas Enge
2013-09-01 17:50           ` Andreas Enge
2013-09-02  6:24           ` Brandon Invergo
2013-09-08 18:35             ` Andreas Enge
  -- strict thread matches above, loose matches on Subject: below --
2013-09-01  8:20 Brandon Invergo
2013-09-01 13:49 ` Andreas Enge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.