summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-13 18:14:34 +0200
committerMarius Bakke <marius@gnu.org>2022-08-27 23:48:56 +0200
commit59bbf7e86c8b64850f7572d4af6a9587dfd3d7d0 (patch)
tree131574021da95746069e8f14dd4fc60dc0f7df14 /gnu/packages/patches
parentada35de38f6b04bbc3c5d0bed198cf22e5fa22d9 (diff)
downloadguix-59bbf7e86c8b64850f7572d4af6a9587dfd3d7d0.tar.gz
gnu: scons: Update to 4.4.0.
* gnu/packages/patches/scons-test-environment.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/build-tools.scm (scons): Update to 4.4.0.
[source](patches): New field.
[arguments]: Adjust bootstrap for the new version.  Enable tests.
[native-inputs]: Add PYTHON-WHEEL and PYTHON-PSUTIL.
(scons-3): New variable.
(scons-python2): Inherit from it.
* gnu/packages/web.scm (serf)[arguments]: Stick with SCONS-3 to prevent rebuilds.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/scons-test-environment.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/patches/scons-test-environment.patch b/gnu/packages/patches/scons-test-environment.patch
new file mode 100644
index 0000000000..be5b61b2d4
--- /dev/null
+++ b/gnu/packages/patches/scons-test-environment.patch
@@ -0,0 +1,57 @@
+Inherit essential environment variables in tests.
+
+Note: it could be better to generalize this in SCons/Platform/posix.py
+instead of just patching the tests.
+
+diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py
+--- a/SCons/ActionTests.py
++++ b/SCons/ActionTests.py
+@@ -98,6 +98,7 @@ outfile2 = test.workpath('outfile2')
+ pipe_file = test.workpath('pipe.out')
+ 
+ scons_env = SCons.Environment.Environment()
++scons_env['ENV']['PATH'] += os.environ['PATH']
+ 
+ # Capture all the stuff the Actions will print,
+ # so it doesn't clutter the output.
+@@ -1090,6 +1091,8 @@ class CommandActionTestCase(unittest.TestCase):
+         except AttributeError:
+             env = Environment()
+ 
++        env = Environment(ENV={'PATH': os.environ['PATH']})
++
+         cmd1 = r'%s %s %s xyzzy' % (_python_, act_py, outfile)
+ 
+         act = SCons.Action.CommandAction(cmd1)
+@@ -1884,7 +1887,7 @@ class ListActionTestCase(unittest.TestCase):
+                     f.write("class2b\n")
+ 
+         act = SCons.Action.ListAction([cmd2, function2, class2a(), class2b])
+-        r = act([], [], Environment(out=outfile))
++        r = act([], [], Environment(out=outfile, ENV={'PATH' : os.getenv('PATH')}))
+         assert isinstance(r.status, class2b), r.status
+         c = test.read(outfile, 'r')
+         assert c == "act.py: 'syzygy'\nfunction2\nclass2a\nclass2b\n", c
+@@ -1948,7 +1951,7 @@ class LazyActionTestCase(unittest.TestCase):
+         a([], [], env=Environment(BAR=f, s=self))
+         assert self.test == 1, self.test
+         cmd = r'%s %s %s lazy' % (_python_, act_py, outfile)
+-        a([], [], env=Environment(BAR=cmd, s=self))
++        a([], [], env=Environment(BAR=cmd, s=self, ENV={'PATH' : os.getenv('PATH')}))
+         c = test.read(outfile, 'r')
+         assert c == "act.py: 'lazy'\n", c
+ 
+diff --git a/SCons/SConfTests.py b/SCons/SConfTests.py
+--- a/SCons/SConfTests.py
++++ b/SCons/SConfTests.py
+@@ -71,7 +71,9 @@ class SConfTestCase(unittest.TestCase):
+         # and we need a new environment, cause references may point to
+         # old modules (well, at least this is safe ...)
+         self.scons_env = self.Environment.Environment()
+-        self.scons_env.AppendENVPath('PATH', os.environ['PATH'])
++        # Inherit the OS environment to get essential variables.
++        inherited_env = os.environ.copy()
++        self.scons_env['ENV'] = inherited_env
+ 
+         # we want to do some autodetection here
+         # this stuff works with