From 1724fba161d4123f092ba3f850418d78f58d4bad Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 15:26:19 +0100 Subject: Also search for SConstruct.py, to make VStudio debugging easier --- src/engine/SCons/Script/Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index f111d35..6bdd8fa 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): -- cgit v0.12 From c9384f44e9a47e3e2e028667905889fe9206b579 Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 15:52:14 +0100 Subject: update to changes file --- src/CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 64c0893..72dc513 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,10 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Richard West: + - Add SConstruct.py to the search path for the root SConstruct file. + Allows easier debugging within Visual Studio + From Daniel Moody: - Set the pickling protocal back to highest which was causing issues with variant dir tests. This will cause issues if reading sconsigns -- cgit v0.12 From ea55726884e48b2b02b1a094dcc38612dd02ad10 Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 23:11:23 +0100 Subject: Added test for the use of SConstruct.py --- test/SConstruct.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/SConstruct.py b/test/SConstruct.py index cebdf04..62d383d 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -39,6 +39,15 @@ scons: \*\*\* No SConstruct file found. wpath = test.workpath() +test.write('SConstruct.py', """ +import os +print("SConstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'SConstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('sconstruct', """ import os print("sconstruct "+os.getcwd()) -- cgit v0.12 From d5a21f6b86636a84d8664364e87102775bbb7a70 Mon Sep 17 00:00:00 2001 From: grbd Date: Mon, 2 Apr 2018 12:59:03 +0100 Subject: updates to docs for SConstruct.py --- doc/design/native.xml | 2 +- doc/man/scons.xml | 14 +++++++++----- doc/scons.mod | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index cd4edaf..25f0d95 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,7 +64,7 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct; or &sconstruct; (in that order) in the + &SConstruct;, &Sconstruct;, &sconstruct; or &SConstruct.py; (in that order) in the current directory, and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 03a3478..57c5191 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -105,8 +105,9 @@ rebuild them. searches for a file named SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py (in that order) in the current directory and reads its configuration from the first file found. An alternate file name may be @@ -635,8 +636,9 @@ yet have any results in the cache. before searching for the SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py file, or doing anything else. Multiple @@ -649,8 +651,9 @@ equivalent to except that it will search for SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py in the specified directory.) @@ -1658,9 +1661,10 @@ scons --tree=all,prune,status target Walks up the directory structure until an SConstruct , -Sconstruct -or +Sconstruct , sconstruct +or +SConstruct.py file is found, and uses that as the top of the directory tree. If no targets are specified on the command line, diff --git a/doc/scons.mod b/doc/scons.mod index 448a212..5fa8e13 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -137,6 +137,7 @@ SConstruct"> Sconstruct"> sconstruct"> +SConstruct.py"> .sconsign"> src"> -- cgit v0.12 From cc52bda4954ae1327e7d98cfb4418c64a55056ec Mon Sep 17 00:00:00 2001 From: grbd Date: Mon, 2 Apr 2018 20:14:24 +0100 Subject: Added sconstruct.py lowercase --- doc/design/native.xml | 2 +- doc/man/scons.xml | 20 ++++++++++++-------- doc/scons.mod | 1 + src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.py | 2 +- test/SConstruct.py | 9 +++++++++ 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index 25f0d95..1329817 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,7 +64,7 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct;, &sconstruct; or &SConstruct.py; (in that order) in the + &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py or &sconstruct.py; (in that order) in the current directory, and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 57c5191..cd6541b 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -105,9 +105,10 @@ rebuild them. searches for a file named SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py (in that order) in the current directory and reads its configuration from the first file found. An alternate file name may be @@ -636,9 +637,10 @@ yet have any results in the cache. before searching for the SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py file, or doing anything else. Multiple @@ -651,9 +653,10 @@ equivalent to except that it will search for SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py in the specified directory.) @@ -1662,9 +1665,10 @@ scons --tree=all,prune,status target Walks up the directory structure until an SConstruct , Sconstruct , -sconstruct -or +sconstruct , SConstruct.py +or +sconstruct.py file is found, and uses that as the top of the directory tree. If no targets are specified on the command line, diff --git a/doc/scons.mod b/doc/scons.mod index 5fa8e13..1d207c9 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -138,6 +138,7 @@ Sconstruct"> sconstruct"> SConstruct.py"> +sconstruct.py"> .sconsign"> src"> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 72dc513..b7aa9dd 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,7 +8,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Richard West: - - Add SConstruct.py to the search path for the root SConstruct file. + - Add SConstruct.py and sconstruct.py to the search path for the root SConstruct file. Allows easier debugging within Visual Studio From Daniel Moody: diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 6bdd8fa..18c493c 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'sconstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): diff --git a/test/SConstruct.py b/test/SConstruct.py index 62d383d..3cf1c02 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -39,6 +39,15 @@ scons: \*\*\* No SConstruct file found. wpath = test.workpath() +test.write('sconstruct.py', """ +import os +print("sconstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('SConstruct.py', """ import os print("SConstruct.py "+os.getcwd()) -- cgit v0.12 From d2ac0761b978215d2006c4bf892bfb8b2a42172d Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 15 Apr 2018 12:15:48 +0100 Subject: Added in support for Sconstruct.py --- doc/design/native.xml | 5 +++-- doc/man/scons.xml | 4 ++++ doc/scons.mod | 1 + src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.py | 2 +- test/SConstruct.py | 9 +++++++++ 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index 1329817..97d5831 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,8 +64,9 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py or &sconstruct.py; (in that order) in the - current directory, and reads its configuration from the first file + &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py, &Sconstruct.py + or &sconstruct.py; (in that order) in the current directory, + and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index cd6541b..abbed4f 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -107,6 +107,7 @@ searches for a file named Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py (in that order) in the current directory and reads its @@ -639,6 +640,7 @@ before searching for the Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py file, or doing anything @@ -655,6 +657,7 @@ except that it will search for Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py in the specified directory.) @@ -1667,6 +1670,7 @@ scons --tree=all,prune,status target Sconstruct , sconstruct , SConstruct.py +Sconstruct.py or sconstruct.py file is found, and uses that diff --git a/doc/scons.mod b/doc/scons.mod index 1d207c9..974ec02 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -138,6 +138,7 @@ Sconstruct"> sconstruct"> SConstruct.py"> +Sconstruct.py"> sconstruct.py"> .sconsign"> src"> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index be4e0dd..093c628 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,7 +8,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Richard West: - - Add SConstruct.py and sconstruct.py to the search path for the root SConstruct file. + - Add SConstruct.py, Sconstruct.py, sconstruct.py to the search path for the root SConstruct file. Allows easier debugging within Visual Studio From Bernard Blackham: diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 18c493c..923ef1e 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'sconstruct.py'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'Sconstruct.py', 'sconstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): diff --git a/test/SConstruct.py b/test/SConstruct.py index 3cf1c02..8bc8617 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -48,6 +48,15 @@ test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, build_str = "scons: `.' is up to date.\n")) +test.write('Sconstruct.py', """ +import os +print("sconstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('SConstruct.py', """ import os print("SConstruct.py "+os.getcwd()) -- cgit v0.12