scons: Switch to Python 3

Reasons:

Python 2.7 will EOL very soon [0]:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained after
that date. A future version of pip will drop support for Python 2.7.
More details about Python 2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support

SCons 4.0.0 will drop Python 2.7 Support [1]:
https://raw.githubusercontent.com/SConsProject/scons/rel_3.1.2/src/CHANGES.txt

[0]: From the SCons build output previous to this commit (i.e. with Python 2.7).
[1]: https://raw.githubusercontent.com/SConsProject/scons/rel_3.1.2/src/CHANGES.txt
This commit is contained in:
Michael Weiss 2019-11-26 23:33:19 +01:00 committed by Jon
parent d4ad35a600
commit 4ca37400ac
2 changed files with 5 additions and 21 deletions

View file

@ -1,19 +1,16 @@
{ version, sha256 }:
{ stdenv, fetchurl, python2Packages }:
{ stdenv, fetchurl, python3Packages }:
let name = "scons";
in python2Packages.buildPythonApplication {
name = "${name}-${version}";
python3Packages.buildPythonApplication rec {
pname = "scons";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
url = "mirror://sourceforge/scons/${pname}-${version}.tar.gz";
inherit sha256;
};
# Fix a regression in 3.0.0 (causes build errors for some packages)
patches = stdenv.lib.optional (version == "3.0.0") ./print-statements.patch;
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {

View file

@ -1,13 +0,0 @@
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index 558e28f9..8fea9c4d 100644
--- src/engine/SCons/Script/SConscript.py
+++ src/engine/SCons/Script/SConscript.py
@@ -5,8 +5,6 @@
"""
-from __future__ import print_function
-
#
# __COPYRIGHT__
#