summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-05-18 00:56:53 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2014-05-18 00:56:53 +0200
commitdc2d7d21e2018eadd781e865a78fdaec4c25ff39 (patch)
tree5747ccc983dcf3cb8073b041e01ca016a9138b26 /Tools
parent6a67e92bae1638c863093c175a5d0b5e861041f4 (diff)
parent7e9937e0049e8be220fafdaa208da77e65eccd9f (diff)
downloadcpython-dc2d7d21e2018eadd781e865a78fdaec4c25ff39.tar.gz
Issue #21430: additions to the description of non-blocking SSL sockets
Diffstat (limited to 'Tools')
-rw-r--r--Tools/buildbot/README.tcltk-AMD6436
-rw-r--r--Tools/buildbot/external-amd64.bat15
-rw-r--r--Tools/buildbot/external-common.bat7
-rw-r--r--Tools/buildbot/external.bat16
-rw-r--r--Tools/buildbot/test-amd64.bat3
-rw-r--r--Tools/buildbot/test.bat3
-rw-r--r--Tools/msi/msi.py4
-rw-r--r--Tools/parser/unparse.py2
-rw-r--r--Tools/scripts/generate_opcode_h.py54
-rw-r--r--Tools/scripts/run_tests.py2
10 files changed, 67 insertions, 75 deletions
diff --git a/Tools/buildbot/README.tcltk-AMD64 b/Tools/buildbot/README.tcltk-AMD64
deleted file mode 100644
index edc89eba9e..0000000000
--- a/Tools/buildbot/README.tcltk-AMD64
+++ /dev/null
@@ -1,36 +0,0 @@
-Comments on building tcl/tk for AMD64 with the MS SDK compiler
-==============================================================
-
-I did have to build tcl/tk manually.
-
-First, I had to build the nmakehlp.exe helper utility manually by executing
- cl nmakehlp.c /link bufferoverflowU.lib
-in both the tcl8.4.12\win and tk8.4.12\win directories.
-
-Second, the AMD64 compiler refuses to compile the file
-tcl8.4.12\generic\tclExecute.c because it insists on using intrinsics
-for the 'ceil' and 'floor' functions:
-
- ..\generic\tclExecute.c(394) : error C2099: initializer is not a constant
- ..\generic\tclExecute.c(398) : error C2099: initializer is not a constant
-
-I did comment out these lines; an alternative would have been to use
-the /Oi- compiler flag to disable the intrinsic functions.
-The commands then used were these:
-
- svn export http://svn.python.org/projects/external/tcl8.4.12
- cd tcl8.4.12\win
- REM
- echo patch the tcl8.4.12\generic\tclExecute.c file
- pause
- REM
- cl nmakehlp.c /link bufferoverflowU.lib
- nmake -f makefile.vc MACHINE=AMD64
- nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
- cd ..\..
- svn export http://svn.python.org/projects/external/tk8.4.12
- cd tk8.4.12\win
- cl nmakehlp.c /link bufferoverflowU.lib
- nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 MACHINE=AMD64
- nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
- cd ..\..
diff --git a/Tools/buildbot/external-amd64.bat b/Tools/buildbot/external-amd64.bat
index 4c3b67b55f..f8597706b1 100644
--- a/Tools/buildbot/external-amd64.bat
+++ b/Tools/buildbot/external-amd64.bat
@@ -2,20 +2,5 @@
@rem Assume we start inside the Python source directory
call "Tools\buildbot\external-common.bat"
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
-if not exist tcltk64\bin\tcl86tg.dll (
- cd tcl-8.6.1.0\win
- nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all
- nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install
- cd ..\..
-)
-
-if not exist tcltk64\bin\tk86tg.dll (
- cd tk-8.6.1.0\win
- nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 clean
- nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 all
- nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 install
- cd ..\..
-)
diff --git a/Tools/buildbot/external-common.bat b/Tools/buildbot/external-common.bat
index 53e3dafe64..48004a720e 100644
--- a/Tools/buildbot/external-common.bat
+++ b/Tools/buildbot/external-common.bat
@@ -15,7 +15,7 @@ cd ..
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
@rem if exist openssl-1.0.1e rd /s/q openssl-1.0.1g
-@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12
+@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12
@rem bzip
if not exist bzip2-1.0.6 (
@@ -29,12 +29,13 @@ if not exist openssl-1.0.1g (
svn export http://svn.python.org/projects/external/openssl-1.0.1g
)
-@rem tcl/tk
+@rem tcl/tk/tix
if not exist tcl-8.6.1.0 (
- rd /s/q tcltk tcltk64 tcl-8.5.11.0 tk-8.5.11.0
+ rd /s/q tcltk tcltk64 tcl-8.5.11.0 tk-8.5.11.0 tix-8.4.3.3
svn export http://svn.python.org/projects/external/tcl-8.6.1.0
)
if not exist tk-8.6.1.0 svn export http://svn.python.org/projects/external/tk-8.6.1.0
+if not exist tix-8.4.3.4 svn export http://svn.python.org/projects/external/tix-8.4.3.4
@rem sqlite3
if not exist sqlite-3.8.3.1 (
diff --git a/Tools/buildbot/external.bat b/Tools/buildbot/external.bat
index c580a14970..22dfdc50ec 100644
--- a/Tools/buildbot/external.bat
+++ b/Tools/buildbot/external.bat
@@ -2,20 +2,4 @@
@rem Assume we start inside the Python source directory
call "Tools\buildbot\external-common.bat"
-call "%VS100COMNTOOLS%\vsvars32.bat"
-if not exist tcltk\bin\tcl86tg.dll (
- @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
- cd tcl-8.6.1.0\win
- nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk clean all
- nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install
- cd ..\..
-)
-
-if not exist tcltk\bin\tk86tg.dll (
- cd tk-8.6.1.0\win
- nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 clean
- nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 all
- nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 install
- cd ..\..
-)
diff --git a/Tools/buildbot/test-amd64.bat b/Tools/buildbot/test-amd64.bat
index de64f25fbe..11bfcbbca2 100644
--- a/Tools/buildbot/test-amd64.bat
+++ b/Tools/buildbot/test-amd64.bat
@@ -1,3 +1,6 @@
@rem Used by the buildbot "test" step.
+
+rem The following line should be removed before #20035 is closed
+set TCL_LIBRARY=%CD%\..\tcltk64\lib\tcl8.6
cd PCbuild
call rt.bat -d -q -x64 -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat
index 4e4db10d7e..6b98c79015 100644
--- a/Tools/buildbot/test.bat
+++ b/Tools/buildbot/test.bat
@@ -1,3 +1,6 @@
@rem Used by the buildbot "test" step.
+
+rem The following line should be removed before #20035 is closed
+set TCL_LIBRARY=%CD%\..\tcltk\lib\tcl8.6
cd PCbuild
call rt.bat -d -q -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
index e399ddeafa..1c627a7c39 100644
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -925,8 +925,8 @@ def generate_license():
shutil.copyfileobj(open("crtlicense.txt"), out)
for name, pat, file in (("bzip2","bzip2-*", "LICENSE"),
("openssl", "openssl-*", "LICENSE"),
- ("Tcl", "tcl8*", "license.terms"),
- ("Tk", "tk8*", "license.terms"),
+ ("Tcl", "tcl-8*", "license.terms"),
+ ("Tk", "tk-8*", "license.terms"),
("Tix", "tix-*", "license.terms")):
out.write("\nThis copy of Python includes a copy of %s, which is licensed under the following terms:\n\n" % name)
dirs = glob.glob(srcdir+"/../"+pat)
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 837cd81aaf..258c648b6b 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -401,7 +401,7 @@ class Unparser:
self.dispatch(t.operand)
self.write(")")
- binop = { "Add":"+", "Sub":"-", "Mult":"*", "Div":"/", "Mod":"%",
+ binop = { "Add":"+", "Sub":"-", "Mult":"*", "MatMult":"@", "Div":"/", "Mod":"%",
"LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", "BitAnd":"&",
"FloorDiv":"//", "Pow": "**"}
def _BinOp(self, t):
diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py
new file mode 100644
index 0000000000..efa18a1e87
--- /dev/null
+++ b/Tools/scripts/generate_opcode_h.py
@@ -0,0 +1,54 @@
+# This script generates the opcode.h header file.
+
+from __future__ import with_statement
+
+import sys
+header = """/* Auto-generated by Tools/scripts/generate_opcode_h.py */
+#ifndef Py_OPCODE_H
+#define Py_OPCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /* Instruction opcodes for compiled code */
+"""
+
+footer = """
+/* EXCEPT_HANDLER is a special, implicit block type which is created when
+ entering an except handler. It is not an opcode but we define it here
+ as we want it to be available to both frameobject.c and ceval.c, while
+ remaining private.*/
+#define EXCEPT_HANDLER 257
+
+
+enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE,
+ PyCmp_GT=Py_GT, PyCmp_GE=Py_GE, PyCmp_IN, PyCmp_NOT_IN,
+ PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
+
+#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OPCODE_H */
+"""
+
+
+def main(opcode_py, outfile='Include/opcode.h'):
+ opcode = {}
+ exec(open(opcode_py).read(), opcode)
+ opmap = opcode['opmap']
+ with open(outfile, 'w') as fobj:
+ fobj.write(header)
+ for name in opcode['opname']:
+ if name in opmap:
+ fobj.write("#define %-20s\t%-3s\n" % (name, opmap[name]))
+ if name == 'POP_EXCEPT': # Special entry for HAVE_ARGUMENT
+ fobj.write("#define %-20s\t%-3d\n" %
+ ('HAVE_ARGUMENT', opcode['HAVE_ARGUMENT']))
+ fobj.write(footer)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1], sys.argv[2])
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
index a6c5da35e2..490a37e175 100644
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
@@ -33,8 +33,6 @@ def main(regrtest_args):
# Allow user-specified interpreter options to override our defaults.
args.extend(test.support.args_from_interpreter_flags())
- # Workaround for issue #20355
- os.environ.pop("PYTHONWARNINGS", None)
# Workaround for issue #20361
args.extend(['-W', 'error::BytesWarning'])