diff options
author | Mats Wichmann <mats@linux.com> | 2019-06-25 16:56:43 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-12-05 00:33:25 (GMT) |
commit | d4eaa1986cfffdb11eee0aa5240fa44bef370fb1 (patch) | |
tree | fe156e17caec56884bff27bf350ee3f38950d5cc /test | |
parent | 714d2c0baf5573c32bf709f3d252496c2359b345 (diff) | |
download | SCons-d4eaa1986cfffdb11eee0aa5240fa44bef370fb1.zip SCons-d4eaa1986cfffdb11eee0aa5240fa44bef370fb1.tar.gz SCons-d4eaa1986cfffdb11eee0aa5240fa44bef370fb1.tar.bz2 |
Improve building of docs using Py3 [ci skip]
* context managers on file r/w + use shutil.copy where it makes sense.
* lxml wants (demands?) that xml files be processed as bytes
* for the phase where we gen the entity files, read as text anyway
* Need to solve a problem where the generated xml is putting the \n in
literally, not evaluating it.
* Fix some examples broken for py3
* Fix more octal constant instances
* Cleanups suggested by PyCharm: staticmethods, two blanks
before class definition, others.
This addresses issues called out in #3300, but is not a complete
solution because the actual doc build step still fails with the
epydoc failures (which aren't directly because of Py3; epydoc
build doesn't work any better on my system with Py3, even with
the forked version with patches).
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/Fortran/FORTRANFILESUFFIXES2.py | 2 | ||||
-rw-r--r-- | test/MSVC/query_vcbat.py | 2 | ||||
-rw-r--r-- | test/packaging/rpm/tagging.py | 4 | ||||
-rw-r--r-- | test/sconsign/script/Signatures.py | 2 | ||||
-rw-r--r-- | test/sconsign/script/no-SConsignFile.py | 2 | ||||
-rw-r--r-- | test/subdivide.py | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/test/Fortran/FORTRANFILESUFFIXES2.py b/test/Fortran/FORTRANFILESUFFIXES2.py index 141fc31..4c3f679 100644 --- a/test/Fortran/FORTRANFILESUFFIXES2.py +++ b/test/Fortran/FORTRANFILESUFFIXES2.py @@ -43,7 +43,7 @@ env = Environment(LINK = r'%(_python_)s mylink.py', FORTRAN = r'%(_python_)s myfortran.py fortran', FORTRANFILESUFFIXES = ['.f', '.f95', '.f90', '.ffake'], tools = ['default', 'fortran']) -#print env.Dump() +#print(env.Dump()) env.Program(target = 'test01', source = 'test01.f') env.Program(target = 'test02', source = 'test02.f90') env.Program(target = 'test03', source = 'test03.f95') diff --git a/test/MSVC/query_vcbat.py b/test/MSVC/query_vcbat.py index 428fe56..cd9a4de 100644 --- a/test/MSVC/query_vcbat.py +++ b/test/MSVC/query_vcbat.py @@ -48,7 +48,7 @@ DefaultEnvironment(tools = []) # for k, v in d.items(): # print k, v #MergeMSVSBatFile(env, 9.0) -#print env['ENV']['PATH'] +#print(env['ENV']['PATH']) print(query_versions()) """) diff --git a/test/packaging/rpm/tagging.py b/test/packaging/rpm/tagging.py index c730e14..f02a51b 100644 --- a/test/packaging/rpm/tagging.py +++ b/test/packaging/rpm/tagging.py @@ -62,7 +62,7 @@ env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s') install_dir= os.path.join( ARGUMENTS.get('prefix', '/'), 'bin/' ) prog_install = env.Install( install_dir , Program( 'src/main.c' ) ) -env.Tag( prog_install, UNIX_ATTR = '(0755, root, users)' ) +env.Tag( prog_install, UNIX_ATTR = '(0o755, root, users)' ) env.Alias( 'install', prog_install ) env.Package( NAME = 'foo', @@ -94,7 +94,7 @@ with os.popen('rpm -qpl %s' % src_rpm) as p: out = p.read() test.fail_test( not out == 'foo-1.2.3.spec\nfoo-1.2.3.tar.gz\n') -expect = '(0755, root, users) /bin/main' +expect = '(0o755, root, users) /bin/main' test.must_contain_all_lines(test.read('foo-1.2.3.spec',mode='r'), [expect]) test.pass_test() diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py index 34737d5..9583cc6 100644 --- a/test/sconsign/script/Signatures.py +++ b/test/sconsign/script/Signatures.py @@ -48,7 +48,7 @@ test.subdir('sub1', 'sub2') # Because this test sets SConsignFile(None), we execute our fake # scripts directly, not by feeding them to the Python executable. -# That is, we chmod 0755 and us a "#!/usr/bin/env python" first +# That is, we chmod 0o755 and use a "#!/usr/bin/env python" first # line for POSIX systems, and add .PY to the %PATHEXT% variable on # Windows. If we didn't do this, then running this script with # suitable prileveges would create a .sconsign file in the directory diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py index cf5bcb2..3702c6c 100644 --- a/test/sconsign/script/no-SConsignFile.py +++ b/test/sconsign/script/no-SConsignFile.py @@ -40,7 +40,7 @@ test.subdir('sub1', 'sub2') # Because this test sets SConsignFile(None), we execute our fake # scripts directly, not by feeding them to the Python executable. -# That is, we chmod 0755 and us a "#!/usr/bin/env python" first +# That is, we chmod 0o755 and use a "#!/usr/bin/env python" first # line for POSIX systems, and add .PY to the %PATHEXT% variable on # Windows. If we didn't do this, then running this script with # suitable prileveges would create a .sconsign file in the directory diff --git a/test/subdivide.py b/test/subdivide.py index 9461d4b..4ba4448 100644 --- a/test/subdivide.py +++ b/test/subdivide.py @@ -45,7 +45,7 @@ _python_ = TestSCons._python_ # Because this test sets SConsignFile(None), we execute our fake # scripts directly, not by feeding them to the Python executable. -# That is, we chmod 0755 and us a "#!/usr/bin/env python" first +# That is, we chmod 0o755 and use a "#!/usr/bin/env python" first # line for POSIX systems, and add .PY to the %PATHEXT% variable on # Windows. If we didn't do this, then running this script with # suitable prileveges would create a .sconsign file in the directory |