diff options
author | William Deegan <bill@baddogconsulting.com> | 2023-01-23 11:12:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 11:12:05 -0800 |
commit | 64ea49d955a7b376b7e19c6ebf2bb85668c63f6c (patch) | |
tree | a40342355427513fee0bb92cc28e5480c82fd4b2 | |
parent | f293dd97feafeb9faf9ac805323d173bc8173176 (diff) | |
parent | 149f37cae1d80244a3238e40f63237791034e243 (diff) | |
download | scons-git-64ea49d955a7b376b7e19c6ebf2bb85668c63f6c.tar.gz |
Merge branch 'master' into doc/more-msvc
-rw-r--r-- | .appveyor.yml | 47 | ||||
-rw-r--r-- | .appveyor/exclude_tests.ps1 (renamed from .appveyor/disable_msvc_10.ps1) | 3 | ||||
-rw-r--r-- | .appveyor/install-cov.bat | 2 | ||||
-rw-r--r-- | .appveyor/install.bat | 9 | ||||
-rw-r--r-- | CHANGES.txt | 5 | ||||
-rw-r--r-- | RELEASE.txt | 1 | ||||
-rw-r--r-- | SCons/ActionTests.py | 18 | ||||
-rw-r--r-- | requirements-dev.txt | 4 | ||||
-rw-r--r-- | requirements-pkg.txt | 2 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | test/rebuild-generated.py | 2 |
11 files changed, 63 insertions, 32 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 030212249..a8db5e9f9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,31 +17,33 @@ cache: - C:\ProgramData\chocolatey\lib -> appveyor.yml install: - # add python and python user-base to path for pip installs + # direct choco install supposed to work, but not? still doing in install.bat + #- cinst: dmd ldc swig vswhere ixsltproc winflexbison3 - cmd: .\.appveyor\install.bat + - cmd: if %COVERAGE% equ 1 .\.appveyor\install-cov.bat -# build matrix will be number of images multiplied by each '-' below, -# less any exclusions. -# split builds into sets of four jobs due to appveyor per-job time limit -# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit) -# Maybe move this one somewhere else in future to restore some flexibility. +# Build matrix will be number of images multiplied by #entries in matrix:, +# less any excludes. +# +# "Build" is kind of a misnomer - we are actually running the test suite, +# and this is slow on Windows, so keep the matrix as small as possible. +# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit). +# maybe move coverage to github in future to restore some flexibility? environment: + COVERAGE: 0 + SCONS_CACHE_MSVC_CONFIG: "true" matrix: - + # Test oldest and newest supported Pythons, and a subset in between. + # Skipping 3.7 and 3.9 at this time - WINPYTHON: "Python311" - COVERAGE: 0 - WINPYTHON: "Python310" - COVERAGE: 0 - WINPYTHON: "Python38" - COVERAGE: 0 - + - WINPYTHON: "Python36" COVERAGE: 1 - # skipping 3.7 and 3.9 at this time - # remove sets of build jobs based on criteria below # to fine tune the number and platforms tested matrix: @@ -68,21 +70,23 @@ matrix: - image: Visual Studio 2022 WINPYTHON: "Python38" -# remove some binaries we don't want to be found +# Remove some binaries we don't want to be found +# Note this is no longer needed, git-windows bin/ is quite minimal now. before_build: - ps: .\.appveyor\ignore_git_bins.ps1 build: off build_script: - - # exclude VS 10.0 because it hangs the testing until this is resolved: - # https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired - - ps: .\.appveyor\disable_msvc_10.ps1 + # Image version-based excludes: + # No excludes at the moment, but the exclude script generates the + # (possibly empty) exclude_list.txt which is used in the following step, + # so leave the scheme in place in case we need to put back excludes later. + - ps: .\.appveyor\exclude_tests.ps1 # setup coverage by creating the coverage config file, and adding coverage # to the sitecustomize so that all python processes start with coverage - - ps: .\.appveyor\coverage_setup.ps1 + - ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_setup.ps1 } # NOTE: running powershell from cmd is intended because # it formats the output correctly @@ -90,8 +94,7 @@ build_script: # run coverage even if there was a test failure on_finish: - - ps: .\.appveyor\coverage_report.ps1 - # running codecov in powershell causes an error so running in platform - # shells + - ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_report.ps1 } + # running codecov in powershell causes an error so running in cmd - cmd: if %COVERAGE% equ 1 codecov -X gcov --file coverage_xml.xml diff --git a/.appveyor/disable_msvc_10.ps1 b/.appveyor/exclude_tests.ps1 index 086f1e4b4..6006a5cb5 100644 --- a/.appveyor/disable_msvc_10.ps1 +++ b/.appveyor/exclude_tests.ps1 @@ -1,4 +1,7 @@ New-Item -Name exclude_list.txt -ItemType File; + +# exclude VS 10.0 because it hangs the testing until this is resolved: +# https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired $workaround_image = "Visual Studio 2015"; if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) { Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py'; diff --git a/.appveyor/install-cov.bat b/.appveyor/install-cov.bat new file mode 100644 index 000000000..7dbc9457e --- /dev/null +++ b/.appveyor/install-cov.bat @@ -0,0 +1,2 @@ +for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g) +C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov diff --git a/.appveyor/install.bat b/.appveyor/install.bat index b014dc711..95f51155f 100644 --- a/.appveyor/install.bat +++ b/.appveyor/install.bat @@ -1,12 +1,13 @@ C:\\%WINPYTHON%\\python.exe --version for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g) REM use mingw 32 bit until #3291 is resolved +REM add python and python user-base to path for pip installs set PATH=C:\\%WINPYTHON%;C:\\%WINPYTHON%\\Scripts;C:\\ProgramData\\chocolatey\\bin;C:\\MinGW\\bin;C:\\MinGW\\msys\\1.0\\bin;C:\\cygwin\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\mingw64\\bin;%PATH% C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pip setuptools wheel -C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov -set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml + +REM requirements-dev.txt will skip installing lxml for windows and py 3.11+, where there's +REM no current binary wheel C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt -REM install 3rd party tools to test with + choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison3 -set SCONS_CACHE_MSVC_CONFIG=true set diff --git a/CHANGES.txt b/CHANGES.txt index 90b0aee86..522c07aaa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -108,7 +108,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER because it was passed through scons_subst(). - Updated MSVC documentation - adds "version added" annotations on recently added construction variables and provides a version-mapping table. - + - Add Python 3.12 support, and indicate 3.11/3.12 support in package. + 3.12 is in alpha for this SCons release, the bytecode sequences + embedded in SCons/ActionTests.py may need to change later, but + based on what is known now, 3.12 itself should work with this release. RELEASE 4.4.0 - Sat, 30 Jul 2022 14:08:29 -0700 diff --git a/RELEASE.txt b/RELEASE.txt index 7b0889855..47b46f0b9 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -43,6 +43,7 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY octal modes using the modern Python syntax (0o755 rather than 0755). - Migrated logging logic for --taskmastertrace to use Python's logging module. Added logging to NewParallel Job class (Andrew Morrow's new parallel job implementation) +- Preliminary support for Python 3.12. FIXES diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py index 101953bd6..88bb36fc2 100644 --- a/SCons/ActionTests.py +++ b/SCons/ActionTests.py @@ -1541,6 +1541,7 @@ class CommandGeneratorActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } meth_matches = [ @@ -1719,6 +1720,7 @@ class FunctionActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } @@ -1730,6 +1732,7 @@ class FunctionActionTestCase(unittest.TestCase): (3, 9): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'1, 1, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'1, 1, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } def factory(act, **kw): @@ -1974,6 +1977,7 @@ class LazyActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } meth_matches = [ @@ -2039,6 +2043,7 @@ class ActionCallerTestCase(unittest.TestCase): (3, 9): b'd\x00S\x00', (3, 10): b'd\x00S\x00', (3, 11): b'\x97\x00d\x00S\x00', + (3, 12): b'\x97\x00d\x00S\x00', } af = SCons.Action.ActionFactory(GlobalFunc, strfunc) @@ -2250,6 +2255,7 @@ class ObjectContentsTestCase(unittest.TestCase): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), ), # 3.10.1, 3.10.2 (3, 11): bytearray(b'3, 3, 0, 0,(),(),(\x97\x00|\x00S\x00),(),()'), + (3, 12): bytearray(b'3, 3, 0, 0,(),(),(\x97\x00|\x00S\x00),(),()'), } c = SCons.Action._function_contents(func1) @@ -2288,7 +2294,11 @@ class ObjectContentsTestCase(unittest.TestCase): b"{TestClass:__main__}[[[(<class \'object\'>, ()), [(<class \'__main__.TestClass\'>, (<class \'object\'>,))]]]]{{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, 11): bytearray( - b"{TestClass:__main__}[[[(<class \'object\'>, ()), [(<class \'__main__.TestClass\'>, (<class \'object\'>,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}"), + b"{TestClass:__main__}[[[(<class \'object\'>, ()), [(<class \'__main__.TestClass\'>, (<class \'object\'>,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}" + ), + (3, 12): bytearray( + b"{TestClass:__main__}[[[(<class \'object\'>, ()), [(<class \'__main__.TestClass\'>, (<class \'object\'>,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}" + ), } assert c == expected[sys.version_info[:2]], f"Got\n{c!r}\nExpected\n" + repr( @@ -2322,7 +2332,11 @@ class ObjectContentsTestCase(unittest.TestCase): b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)' ), (3, 11): bytearray( - b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xa6\x01\x00\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)'), + b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xa6\x01\x00\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)' + ), + (3, 12): bytearray( + b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)' + ), } assert c == expected[sys.version_info[:2]], f"Got\n{c!r}\nExpected\n" + repr( diff --git a/requirements-dev.txt b/requirements-dev.txt index 6f9855fc1..82faa28e5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,9 @@ # for now keep pinning "known working" lxml, # it's been a troublesome component in the past. -lxml==4.9.1 +# Skip lxml for win32 as no tests which require it currently pass on win32 +lxml==4.9.2; python_version < '3.12' and sys_platform != 'win32' + ninja # Needed for test/Parallel/failed-build/failed-build.py diff --git a/requirements-pkg.txt b/requirements-pkg.txt index 10b53933e..ae71cde0d 100644 --- a/requirements-pkg.txt +++ b/requirements-pkg.txt @@ -8,6 +8,6 @@ readme-renderer # sphinx pinned because it has broken several times on new releases -sphinx>=5.1.1 +sphinx < 6.0 sphinx-book-theme rst2pdf @@ -31,6 +31,8 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Environment :: Console Intended Audience :: Developers License :: OSI Approved :: MIT License diff --git a/test/rebuild-generated.py b/test/rebuild-generated.py index 0b3659ea4..91b4e1e7c 100644 --- a/test/rebuild-generated.py +++ b/test/rebuild-generated.py @@ -83,7 +83,7 @@ env = Environment() kernelDefines = env.Command("header.hh", "header.hh.in", Copy('$TARGET', '$SOURCE')) kernelImporterSource = env.Command("generated.cc", ["%s"], "%s") kernelImporter = env.Program(kernelImporterSource + ["main.cc"]) -kernelImports = env.Command("KernelImport.hh", kernelImporter, ".%s$SOURCE > $TARGET") +kernelImports = env.Command("KernelImport.hh", kernelImporter, r".%s$SOURCE > $TARGET") osLinuxModule = env.StaticObject(["target.cc"]) """ % (generator_name, kernel_action, sep)) |