From 4ca37400ac36f79bae9a885b3d76c39766adef29 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 26 Nov 2019 23:33:19 +0100 Subject: [PATCH] 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 --- .../tools/build-managers/scons/common.nix | 13 +++++-------- .../build-managers/scons/print-statements.patch | 13 ------------- 2 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/tools/build-managers/scons/print-statements.patch diff --git a/pkgs/development/tools/build-managers/scons/common.nix b/pkgs/development/tools/build-managers/scons/common.nix index 740d04d853f7..340364025a81 100644 --- a/pkgs/development/tools/build-managers/scons/common.nix +++ b/pkgs/development/tools/build-managers/scons/common.nix @@ -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; { diff --git a/pkgs/development/tools/build-managers/scons/print-statements.patch b/pkgs/development/tools/build-managers/scons/print-statements.patch deleted file mode 100644 index a963bf78abab..000000000000 --- a/pkgs/development/tools/build-managers/scons/print-statements.patch +++ /dev/null @@ -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__ - #