[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python 3 binaries
From: |
Andreas Enge |
Subject: |
Re: Python 3 binaries |
Date: |
Sun, 1 Sep 2013 11:28:17 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Very well. If we do not wish to make the symlink python->python3,
then we will need special code in patch-shebangs, so that things like
"#!/usr/bin/python" may get rewritten to
"#!/nix/store/...python-3.3.2/bin/python3" if no binary named "python"
is found.
I think the following patch does this:
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -516,7 +516,10 @@ FILE are kept unchanged."
(rest (match:substring m 3))
(has-env (string-suffix? "/env" interp))
(cmd (if has-env arg1 (basename interp)))
- (bin (search-path path cmd)))
+ (bin (or (search-path path cmd)
+ (if (string=? cmd "python")
+ (search-path path "python3")
+ #f))))
(if bin
(if (string=? bin interp)
#f ; nothing to do
But it triggers a full rebuild, so it will take me a while to test it.
If you agree to this patch, we would need to revive core-updates, and should
revert to python 2 in master. Could we then build core-updates also on
hydra.gnu.org? This would make it easier to add python modules for the two
different versions.
Andreas
- Re: Python 3 binaries,
Andreas Enge <=