summaryrefslogtreecommitdiffstats
path: root/SCons
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Merge branch 'master' into exception-convertWilliam Deegan2024-05-194-78/+100
|\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge pull request #4529 from mwichmann/maint/Variables-listWilliam Deegan2024-05-192-34/+54
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Variables cleanup: ListVariable
| | * | | | | | | | | Variables cleanup: ListVariableMats Wichmann2024-05-152-34/+54
| | | |_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 5 of a series, updating the ListVariable implementation, tests and docstrings. Changelog note was merged in Part 1. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | | | | | | | API Docs build adjustment.Mats Wichmann2024-05-162-44/+46
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a "package" which has a main piece and submodules, the main part is now processed before, rather than after, the submodules. Usally there's introductory material (e.g. in the main module's docstring) and it's more useful for this to appear at the top of a page rather than down after all the submodules. Made some docstring tweaks in two modules where the result didn't look very good - Debug and PathList. For PathList, Sphinx doesn't process both a class docstring and its __init__ method's docstring - you get one of the other, so joined those together. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | | Improve conversion to BuildErrorMats Wichmann2024-05-162-17/+43
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the conversion of another exception to a BuildError could yield undesired results: if the exception was a OSError/IOError, and some fields were initially set to None, then the return code and error string were set to None, rather than the SCons defaults (which are return code 2, and the string set originally in the exception). A unit test is added which attempts to build an OSError in the way that the case "in the wild" does - confirmed failing to pick up defaults without the change. Fixes #4530 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | Variables cleanup: PathVariableMats Wichmann2024-05-132-105/+97
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 4 of a series, updating the PathVariable implementation, tests and docstrings. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Variables cleanup: PackageVariableMats Wichmann2024-05-102-32/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 3 of a series, updating the EnumVariable implementation, tests and docstrings. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Merge pull request #4519 from mwichmann/py36-deprWilliam Deegan2024-05-101-5/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Deprecate Python 3.6 support.
| * \ \ \ \ \ \ Merge branch 'master' into py36-deprWilliam Deegan2024-05-108-40/+58
| |\ \ \ \ \ \ \
| * | | | | | | | Deprecate Python 3.6 support.Mats Wichmann2024-05-041-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No claim is made about when it will actually be dropped, but some notice seems polite. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | | Merge pull request #4523 from mwichmann/maint/Variables-enumWilliam Deegan2024-05-102-47/+85
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Variables cleanup: EnumVariable
| * | | | | | | | | Variables cleanup: EnumVariableMats Wichmann2024-05-102-47/+85
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 2 of a series, updating the EnumVariable implementation, tests and docstrings. While this is a small change, it looks bigger in the diff, due to the conversion of a series of lambdas to inner fuctions (fixing a pylint complaint) Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | | Maintenance: Python version usageMats Wichmann2024-05-101-2/+2
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify/clarify some usage of Python version strings. Dropped a couple which refer to unsupported versions. While looking at version usage, it became clear one of the SWIG tests wasn't doing the right thing - it has a special case for Windows, where the way the path to the Python library is constructed would only work for the python.org release, not the Store version. Since we compute this information correclty in the test framework, and the test already called that routine - before ignoring the results - just use that instead. Though it turns out the framework didn't quite do the right thing either, returning a bare lib name without the library suffix - fixed that, too. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | Merge branch 'master' into finish-4520William Deegan2024-05-102-32/+22
|\ \ \ \ \ \ \ \
| * | | | | | | | Variables cleanup: BoolVariableMats Wichmann2024-05-092-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 1 of a series, updating the BoolVariable implementation, tests and docstrings. Note some of the test strings will change again when the change to the "main" module (Variables/__init__.py) change lands. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | | Fix ParseFlags so -stdlib goes in CXXFLAGSMats Wichmann2024-05-093-4/+10
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the completion of PR #4520 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | Minor editsWilliam Deegan2024-05-041-0/+1
| | | | | | | |
* | | | | | | | Implement `GetSConsVersion` static methodThaddeus Crews2024-04-153-4/+25
|/ / / / / / /
* | | | | | | Allow printing a Variables objectMats Wichmann2024-04-111-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Variables object has been somewhat opague - kind of hard to tell what you got. This adds as __str__ method which produces a formatted string showing the contents of the object, so debugging can do: var = Variables() ... bunch of setup stuff print(var) and get a reasonably readable representation. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Fixes from reviewMats Wichmann2024-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typo fix; more explanation of AppendUnique in DummyEnvironment test class. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Tools update, maninly documentationMats Wichmann2024-03-314-35/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two small code changes: (1) if Environment() is called with a tools kwarg, reset TOOLS. Since it wasn't used in the init, any previous contents would be invalid for this env. (2) When adding the name of a tool to TOOLS, use AppendUnique rather than Append, so we get a uniqued list. This impacted one unit test, which uses a mock Envirionment with no AppendUnique method, so add one - the result is not used so the fact it's not doing any uniquing is ok. The rest is doc rewording and reorganization, and a little extra checking in the site_dir test. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Merge branch 'master' into maint/picklingWilliam Deegan2024-03-308-38/+41
|\ \ \ \ \ \ \
| * | | | | | | Get rid of raising exceptions entirelyRaymond Li2024-03-287-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In favor of just returning status for uniform behavior
| * | | | | | | Fix testsRaymond Li2024-03-282-4/+20
| | | | | | | |
| * | | | | | | Fix #3935 OSErrors being hiddenRaymond Li2024-03-281-1/+1
| | |_|_|_|_|/ | |/| | | | |
* | | | | | | Remove redundant codeMats Wichmann2024-03-283-94/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three classes that inherit from NodeInfoBase - FileNodeInfo, AliasNodeInfo and ValueNodeInfo - have "specializations" of __getstate_ and __setstate__ from the parent, but they're identical to the parent's and thus not needed. Always easy to add back if a different implementation is ever needed for any of them. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | Fix isabs() check in NodeInfo for Py 3.13Mats Wichmann2024-03-242-40/+57
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3.13 (alpha) changes the behavior of isabs() on Windows. SCons has places where it does splitdrive on an absolute path, then checks if the path part is absolute - this answer is now False, which caused some interesting test fails. Do the check on the original path to get a more accurate answer. There may be more subtle issues with the Python change, but first fix the ones we can see. Simplify the setup of _my_splitdrive() a bit: every caller is supposed to check do_splitdrive but a couple of locations did not. Remove the special check for UNC support, all Python versions SCons runs on do UNC handling, so just eliminate that bit. Fixes #4502, #4504. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | Improve env.Dump('json') a bitMats Wichmann2024-03-212-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a Dump in json mode, custom SCons classes are not examined by default (unlike the standard pprint() Dump), and end up in the un-serialized bucket. Mostly, that's fine, but the BUILDERS dictionary contains valueable information (which builders actually got configured), as do the CLVar instances - these contain actual cmdline options that will be issued. Update the function called when an object looks unserializable to recognize subclasses of UserDict (which covers BuilderDict) and UserList (which covers CLVar) and return their .data field. Also tell the json encoder to sort the keys. The adjacent function in the source file got a small tweak (non-functional). Fixes #4493 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | Merge branch 'master' into maint/ValueWilliam Deegan2024-03-207-40/+48
|\ \ \ \ \
| * | | | | Rel 4.7.0 final changesWilliam Deegan2024-03-181-5/+5
| | | | | |
| * | | | | Update MergeFlags doc [skip appveyor]Mats Wichmann2024-03-161-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Describe the case of passing a dict (and make one of the examples show that); describe that using strings has the same limitations as ParseFlags, which it calls in that case. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | | | Merge pull request #4480 from Repiteo/non-serializableWilliam Deegan2024-03-132-2/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | Explicitly wrap non-serializable values in json dump
| | * | | | | Implement test case for non-serializable jsonThaddeus Crews2024-03-131-1/+2
| | | | | | |
| | * | | | | Merge branch 'master' into non-serializableWilliam Deegan2024-02-1813-58/+112
| | |\ \ \ \ \
| | * | | | | | Explicitly wrap non-serializable values in json dumpThaddeus Crews2024-02-141-1/+1
| | | | | | | |
| * | | | | | | Merge pull request #4490 from mwichmann/maint/cachedir_lockWilliam Deegan2024-03-123-10/+14
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Lock creation of CacheDir config
| | * | | | | | | Lock creation of CacheDir configMats Wichmann2024-03-113-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new CacheDir, the config file is created in exclusive mode, but there's a timing window before the json dump to the file completes when another thread could read the config because it exists - but get a JSONDecodeError because it hasn't finished writing yet. Add locking so the readers will have to wait until the writer is done. Fixes #4489 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | | Merge branch 'master' into maint/ValueMats Wichmann2024-03-123-3/+33
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Merge branch 'master' into doc/manpageWilliam Deegan2024-03-103-149/+203
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| * | | | | | | | Minor manpage updates. [skip appveyor]Mats Wichmann2024-03-013-3/+33
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistent use of &Python; entity. Add something on Configure + variantdir. Also some docstrings. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | | Updates on Value nodesMats Wichmann2024-03-123-52/+66
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some doc changes. E2E tests cleaned up a bit. Before merge: TODO: second half of manpage example doesn't work. Also: should test give SCons.Node.Value.Value as factory, or just Value? (remove new import if the latter). SCons.Node.Value.Value and SCons.Environment.Value are not the same thing. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | | Cleanup Warnings moduleMats Wichmann2024-03-083-149/+203
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added docstrings on warning classes and module docstring. * Move globals to top of file. * Typing. * Dropped DeprecatedSourceCodeWarning, last use was removed, with the feature, for SCons 3.1.2. * Dropped TaskmasterNeedsExecuteWarning, now enforced by Python via an abstract base class (unused/unneeded since 4.0.0). * Dropped DeprecatedMissingSConscriptWarning. This was a transitional warning, no longer needed; can use MissingSConscriptWarning, which also is no longer used but is left in in case it might be useful. * Two in-use warnings added to manpage section on enabling warnings (cache-cleanup-error, future-reserved-variable). * Improve unittest a bit. * Sphinx build set not to show inherited memerber for Warnings - got ugly exception stuff otherwise. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | | Merge branch 'master' into doc/msvc-versionWilliam Deegan2024-03-011-26/+41
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Update SharedLibrary docs [skip appveyor]Mats Wichmann2024-02-241-26/+41
| | |/ / / | |/| | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | fixed a few typos and changed all references to c++ project file to be MSVC ↵William Deegan2024-03-012-18/+18
| | | | | | | | | | | | | | | | | | | | (entity) project file
* | | | | Markup more MSVC C++ refs [skip appveyor]Mats Wichmann2024-02-192-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also style MSBuild (did not create an entity for it) Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | Update MSVC_VERSION usage and table [skip appveyor]Mats Wichmann2024-02-174-118/+128
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also convert usage of term Microsoft Visual C++ (which was used in several forms, with/without "Microsoft", as C/C++, etc.) into an entity &MSVC; for consistency. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | Merge branch 'master' into complex-type-hint-frameworkWilliam Deegan2024-02-1422-648/+707
|\ \ \ \ | |/ / /
| * | | Merge branch 'master' into rawfile-convertWilliam Deegan2024-02-147-60/+128
| |\ \ \
| | * \ \ Merge pull request #4479 from mwichmann/doc/PyPackageDirWilliam Deegan2024-02-143-25/+66
| | |\ \ \ | | | | | | | | | | | | Fix PyPackageDir