From 309433587513c59d51ab167bae1795cd9b157c47 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 9 May 2020 10:00:54 -0600 Subject: Python 3.9 support Fixes to ActionTests to support bytecode, etc. Eliminate some warnings when running testsuite (rawstrings) Signed-off-by: Mats Wichmann --- CHANGES.txt | 1 + SCons/ActionTests.py | 18 +++++++++--------- SCons/cpp.py | 8 ++++---- test/Dir/DriveAbsPath.py | 2 +- test/LINK/applelink.py | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f336170..f02747c 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -142,6 +142,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER has different function. - Update xml files in SCons to reflect changed relative paths after code restructuring (src/engine/SCons -> SCons) + - Preliminary Python 3.9 support - elimination of some warnings. diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py index 4784abf..bb4aa40 100644 --- a/SCons/ActionTests.py +++ b/SCons/ActionTests.py @@ -1512,11 +1512,11 @@ class CommandGeneratorActionTestCase(unittest.TestCase): # Since the python bytecode has per version differences, we need different expected results per version func_matches = { - (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 8): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), } meth_matches = [ @@ -1691,20 +1691,20 @@ class FunctionActionTestCase(unittest.TestCase): pass func_matches = { - (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 8): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), } meth_matches = { - (2, 7): bytearray(b'1, 1, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'1, 1, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 7): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 8): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 9): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), } def factory(act, **kw): @@ -1945,11 +1945,11 @@ class LazyActionTestCase(unittest.TestCase): pass func_matches = { - (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 8): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), } meth_matches = [ @@ -2004,11 +2004,11 @@ class ActionCallerTestCase(unittest.TestCase): pass matches = { - (2, 7): b'd\x00\x00S', (3, 5): b'd\x00\x00S', (3, 6): b'd\x00S\x00', (3, 7): b'd\x00S\x00', (3, 8): b'd\x00S\x00', + (3, 9): b'd\x00S\x00', } @@ -2205,11 +2205,11 @@ class ObjectContentsTestCase(unittest.TestCase): # Since the python bytecode has per version differences, we need different expected results per version expected = { - (2, 7): bytearray(b'3, 3, 0, 0,(),(),(|\x00\x00S),(),()'), (3, 5): bytearray(b'3, 3, 0, 0,(),(),(|\x00\x00S),(),()'), (3, 6): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), (3, 7): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), (3, 8): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), + (3, 9): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), } c = SCons.Action._function_contents(func1) @@ -2227,8 +2227,6 @@ class ObjectContentsTestCase(unittest.TestCase): # Since the python bytecode has per version differences, we need different expected results per version expected = { - (2, 7): bytearray( - b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01\x00|\x00\x00_\x00\x00d\x02\x00|\x00\x00_\x01\x00d\x00\x00S),(),(),2, 2, 0, 0,(),(),(d\x00\x00S),(),()}}{{{a=a,b=b}}}"), (3, 5): bytearray( b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01\x00|\x00\x00_\x00\x00d\x02\x00|\x00\x00_\x01\x00d\x00\x00S),(),(),2, 2, 0, 0,(),(),(d\x00\x00S),(),()}}{{{a=a,b=b}}}"), (3, 6): bytearray( @@ -2237,6 +2235,8 @@ class ObjectContentsTestCase(unittest.TestCase): b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}"), (3, 8): bytearray( b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}"), + (3, 9): bytearray( + b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}"), } assert c == expected[sys.version_info[:2]], "Got\n" + repr(c) + "\nExpected \n" + "\n" + repr( @@ -2250,11 +2250,11 @@ class ObjectContentsTestCase(unittest.TestCase): # Since the python bytecode has per version differences, we need different expected results per version expected = { - (2, 7): bytearray(b'0, 0, 0, 0,(Hello, World!),(),(d\x00\x00GHd\x01\x00S)'), (3, 5): bytearray(b'0, 0, 0, 0,(Hello, World!),(print),(e\x00\x00d\x00\x00\x83\x01\x00\x01d\x01\x00S)'), (3, 6): bytearray(b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), (3, 7): bytearray(b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), (3, 8): bytearray(b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), + (3, 9): bytearray(b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), } assert c == expected[sys.version_info[:2]], "Got\n" + repr(c) + "\nExpected \n" + "\n" + repr(expected[ diff --git a/SCons/cpp.py b/SCons/cpp.py index 89d8dac..c56c965 100644 --- a/SCons/cpp.py +++ b/SCons/cpp.py @@ -105,10 +105,10 @@ CPP_Expression = re.compile(e, re.M) # A list with RE to cleanup CPP Expressions (tuples) # We should remove all comments and carriage returns (\r) before evaluating CPP_Expression_Cleaner_List = [ - "/\*.*\*/", - "/\*.*", - "//.*", - "\r" + r"/\*.*\*/", + r"/\*.*", + r"//.*", + r"\r" ] CPP_Expression_Cleaner_RE = re.compile( r"\s*(" + "|".join(CPP_Expression_Cleaner_List) + ")") diff --git a/test/Dir/DriveAbsPath.py b/test/Dir/DriveAbsPath.py index 829cef2..ab29594 100644 --- a/test/Dir/DriveAbsPath.py +++ b/test/Dir/DriveAbsPath.py @@ -24,7 +24,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -""" +r""" Test to confirm that Dir(drive_path).abspath works on Windows. This verifies that SCons no longer has an issue with Dir('T:').abspath returning 'T:\T:'. Instead, it verifies that Dir('T:') correctly returns an instance of the diff --git a/test/LINK/applelink.py b/test/LINK/applelink.py index 906c929..55e265a 100644 --- a/test/LINK/applelink.py +++ b/test/LINK/applelink.py @@ -86,7 +86,7 @@ for SHLIBVERSION, APPLELINK_CURRENT_VERSION, APPLELINK_COMPATIBILITY_VERSION, sh # **locals()) otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format(**locals()) otool_output = re.escape(otool_output) - otool_output = otool_output.replace('REPLACEME','\d+\.\d+\.\d+') + otool_output = otool_output.replace('REPLACEME',r'\d+\.\d+\.\d+') test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall) @@ -145,7 +145,7 @@ for SHLIBVERSION, \ APPLELINK_COMPATIBILITY_VERSION = '0.0.0' otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format( **locals()) - otool_output = re.escape(otool_output).replace('REPLACEME','\d+\.\d+\.\d+') + otool_output = re.escape(otool_output).replace('REPLACEME',r'\d+\.\d+\.\d+') test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall) -- cgit v0.12 From d23ad6d7d3403fb36fbca8eb781dea12a995b715 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 16 May 2020 12:08:49 -0600 Subject: Bump unsupported/deperecated Py versions Signed-off-by: Mats Wichmann --- CHANGES.txt | 2 ++ SCons/Script/Main.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 431ecc1..fbcc2e8 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -144,6 +144,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER code restructuring (src/engine/SCons -> SCons) - Drop the with_metaclass jig which was designed to let class definitions using a metaclass be written the same for Py2/Py3. + - Bump python_version_unsupported (and deprecated) to indicate 3.5 + is lowest supported Python. diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py index 62cd908..4673d6d 100644 --- a/SCons/Script/Main.py +++ b/SCons/Script/Main.py @@ -10,8 +10,8 @@ some other module. If it's specific to the "scons" script invocation, it goes here. """ -unsupported_python_version = (2, 6, 0) -deprecated_python_version = (2, 7, 0) +unsupported_python_version = (3, 4, 0) +deprecated_python_version = (3, 4, 0) # __COPYRIGHT__ -- cgit v0.12 From 78683974a76900e35814df53f2c7265c18fe741f Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 17 May 2020 08:46:46 -0600 Subject: Fix error recently introduced in Package() A recent edit changed a call to a named lamba (which checkers frown on) to a comprehension - but didn't eliminate all of it, leaving a syntax error. Not sure why this passed the CI builds, but was certainly failing a number of packaging tests in local experiments. Signed-off-by: Mats Wichmann --- SCons/Tool/packaging/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SCons/Tool/packaging/__init__.py b/SCons/Tool/packaging/__init__.py index e029bcc..6e8855a 100644 --- a/SCons/Tool/packaging/__init__.py +++ b/SCons/Tool/packaging/__init__.py @@ -239,20 +239,19 @@ def options(opts): # def copy_attr(f1, f2): - """ copies the special packaging file attributes from f1 to f2. + """ Copies the special packaging file attributes from f1 to f2. """ if f1._tags: pattrs = [ tag for tag in f1._tags - if lambda tag: not hasattr(f2, tag) and tag.startswith('PACKAGING_') + if not hasattr(f2, tag) and tag.startswith('PACKAGING_') ] for attr in pattrs: f2.Tag(attr, f1.GetTag(attr)) def putintopackageroot(target, source, env, pkgroot, honor_install_location=1): - """ Uses the CopyAs builder to copy all source files to the directory given - in pkgroot. + """ Copies all source files to the directory given in pkgroot. If honor_install_location is set and the copied source file has an PACKAGING_INSTALL_LOCATION attribute, the PACKAGING_INSTALL_LOCATION is -- cgit v0.12 From a6219883f5c25e1cac9ee25e920cd4735a18b06d Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:05:59 -0700 Subject: [ci skip] restore ref to using CopyAs() builder. --- SCons/Tool/packaging/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SCons/Tool/packaging/__init__.py b/SCons/Tool/packaging/__init__.py index 6e8855a..c71ecc1 100644 --- a/SCons/Tool/packaging/__init__.py +++ b/SCons/Tool/packaging/__init__.py @@ -261,6 +261,9 @@ def putintopackageroot(target, source, env, pkgroot, honor_install_location=1): directory. All attributes of the source file will be copied to the new file. + + Note: + Uses CopyAs builder. """ # make sure the packageroot is a Dir object. if SCons.Util.is_String(pkgroot): -- cgit v0.12 From 41bb0ffdb731767f7d251a8fa314820d02aa9c44 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:19:01 -0700 Subject: Add py3.9 dev --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index d2f06be..122e8d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,10 @@ jobs: python: 3.8 dist: bionic # required for Python >= 3.8 + - <<: *test_job + python: 3.9-dev + dist: bionic # required for Python >= 3.8 + - &coverage_jobs dist: bionic python: 3.7 -- cgit v0.12 From e17c6fee560cc6cdc14893f5b3453a8a4664bb05 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:19:19 -0700 Subject: Update LDC version, remove py27 bits, add rpm --- .travis/install.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 64a300b..29b9caa 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -19,6 +19,9 @@ else sudo ln -s /usr/local/clang-5.0.0/bin/clang++ /usr/bin/clang++ fi + # dependencies for rpm packaging tests + sudo apt-get -y install rpm + # dependencies for gdc tests sudo apt-get -y install gdc @@ -42,17 +45,11 @@ else sudo apt-get update && sudo apt-get -y --allow-unauthenticated install dmd-bin # dependencies for ldc tests - wget https://github.com/ldc-developers/ldc/releases/download/v1.15.0/ldc2-1.15.0-linux-x86_64.tar.xz - tar xf ldc2-1.15.0-linux-x86_64.tar.xz - sudo cp -rf ldc2-1.15.0-linux-x86_64/* / + export SCONS_LDC_VERSION=1.21.0 + wget https://github.com/ldc-developers/ldc/releases/download/v${SCONS_LDC_VERSION}/ldc2-${SCONS_LDC_VERSION}-linux-x86_64.tar.xz +# wget https://github.com/ldc-developers/ldc/releases/download/v1.15.0/ldc2-1.15.0-linux-x86_64.tar.xz + tar xf ldc2-${SCONS_LDC_VERSION}-linux-x86_64.tar.xz + sudo cp -rf ldc2-${SCONS_LDC_VERSION}-linux-x86_64/* / ls -l /usr/lib/*python*{so,a}* - - # For now skip swig if py27 - if [[ "$PYVER" == 27 ]]; then - # dependencies for swig tests - wget https://github.com/swig/swig/archive/rel-3.0.12.tar.gz - tar xzf rel-3.0.12.tar.gz - cd swig-rel-3.0.12 && ./autogen.sh && ./configure --prefix=/usr && make && sudo make install && cd .. - fi fi -- cgit v0.12 From 047975c68b4b74bebacb4721dbfcb472ec2b8715 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:27:46 -0700 Subject: update path we look for python libs --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/install.sh b/.travis/install.sh index 29b9caa..843f3b6 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -51,5 +51,5 @@ else tar xf ldc2-${SCONS_LDC_VERSION}-linux-x86_64.tar.xz sudo cp -rf ldc2-${SCONS_LDC_VERSION}-linux-x86_64/* / - ls -l /usr/lib/*python*{so,a}* + ls -l /usr/lib*/*python*{so,a}* fi -- cgit v0.12 From fec871dbdd03de409f93f5c2b64005bb9f4c17c3 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:40:28 -0700 Subject: Update base ubuntu from trusty(14.04)->xenial(16.04), update install logic for dmd --- .travis.yml | 2 +- .travis/install.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 122e8d1..f0d1b45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: xenial language: python # Used: travis encrypt "chat.freenode.net#scons" --add notifications.irc diff --git a/.travis/install.sh b/.travis/install.sh index 843f3b6..2c07fc8 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -40,9 +40,14 @@ else sudo apt-get -y install python-pip python-dev build-essential libpcre3-dev autoconf automake libtool bison subversion git # dependencies for D tests - sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list - wget -qO - https://dlang.org/d-keyring.gpg | sudo apt-key add - - sudo apt-get update && sudo apt-get -y --allow-unauthenticated install dmd-bin + sudo wget https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list + sudo apt-get update --allow-insecure-repositories + sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring + sudo apt-get update && sudo apt-get install dmd-compiler dub + +# sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list +# wget -qO - https://dlang.org/d-keyring.gpg | sudo apt-key add - +# sudo apt-get update && sudo apt-get -y --allow-unauthenticated install dmd-bin # dependencies for ldc tests export SCONS_LDC_VERSION=1.21.0 -- cgit v0.12 From 49ebf1eda47c4a44b0717ff52b863d52f3eb5ab2 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:49:26 -0700 Subject: not sure why 'ls -l /usr/lib*/*python*{so,a}*' is failing on these systems.. but commenting out --- .travis/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis/install.sh b/.travis/install.sh index 2c07fc8..25660c0 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -56,5 +56,6 @@ else tar xf ldc2-${SCONS_LDC_VERSION}-linux-x86_64.tar.xz sudo cp -rf ldc2-${SCONS_LDC_VERSION}-linux-x86_64/* / - ls -l /usr/lib*/*python*{so,a}* + # Failing.. ? +# ls -l /usr/lib*/*python*{so,a}* fi -- cgit v0.12 From a17a722ff8f79ea3027944b44914f7367873b4cf Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 10:56:14 -0700 Subject: update to lxml 4.5.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0d1b45..c31b1fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ os: install: # needed for Docbook tests, must be in virtualenv context - - pip install lxml==4.3.3 + - pip install lxml==4.5.0 # do the rest of the image setup - ./.travis/install.sh -- cgit v0.12 From 4a0cd4864a82803c414023e69e5ba9419c295309 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 18 May 2020 11:22:30 -0700 Subject: change test to change expected line # depending on python version --- test/packaging/rpm/explicit-target.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py index 0cf486e..66f5e4a 100644 --- a/test/packaging/rpm/explicit-target.py +++ b/test/packaging/rpm/explicit-target.py @@ -30,6 +30,7 @@ Test the ability to create a rpm package from a explicit target name. import os import TestSCons +import sys _python_ = TestSCons._python_ @@ -75,9 +76,15 @@ env.Package( NAME = 'foo', ) """ % locals()) + +if sys.version_info.minor >= 8: + line_number = 12 +else: + line_number = 23 + expect = """ scons: *** Setting target is not supported for rpm. -""" + test.python_file_line(test.workpath('SConstruct'), 12) +""" + test.python_file_line(test.workpath('SConstruct'), line_number) test.run(arguments='', status=2, stderr=expect) -- cgit v0.12