Skip to content

Commit

Permalink
Python 3.x: Add python symlink
Browse files Browse the repository at this point in the history
Add a symlink for "python" in the python3 derivation to provide a
default Python executable.
  • Loading branch information
aneeshusa authored and FRidh committed Oct 18, 2016
1 parent 4f8a109 commit 7088222
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkgs/development/interpreters/python/cpython/3.3/default.nix
Expand Up @@ -80,6 +80,13 @@ in stdenv.mkDerivation {
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
'';

postFixup = ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/interpreters/python/cpython/3.4/default.nix
Expand Up @@ -89,6 +89,13 @@ in stdenv.mkDerivation {
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
'';

postFixup = ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/interpreters/python/cpython/3.5/default.nix
Expand Up @@ -89,6 +89,13 @@ in stdenv.mkDerivation {
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
'';

postFixup = ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/interpreters/python/cpython/3.6/default.nix
Expand Up @@ -89,6 +89,13 @@ in stdenv.mkDerivation {
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
'';

passthru = rec {
Expand Down

0 comments on commit 7088222

Please sign in to comment.