mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 06:42:27 +00:00
Stop using .com extension in monorepo
The WIN32 CreateProcess() function does not require an .exe or .com suffix in order to spawn an executable. Now that we have Cosmo bash we're no longer so dependent on the cmd.exe prompt.
This commit is contained in:
parent
c8383f25b4
commit
a6baba1b07
239 changed files with 2092 additions and 2244 deletions
2
third_party/python/Lib/test/pythoninfo.py
vendored
2
third_party/python/Lib/test/pythoninfo.py
vendored
|
@ -7,7 +7,7 @@ import re
|
|||
import sys
|
||||
import traceback
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import resource
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import unittest
|
|||
import urllib.error
|
||||
import warnings
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import resource
|
||||
|
||||
from .testresult import get_test_runner
|
||||
|
@ -75,7 +75,7 @@ try:
|
|||
except ImportError:
|
||||
resource = None
|
||||
|
||||
# if __name__ == 'PYOBJ.COM':
|
||||
# if __name__ == 'PYOBJ':
|
||||
# import bz2
|
||||
# import zlib
|
||||
# import resource
|
||||
|
|
|
@ -7,7 +7,7 @@ import sys
|
|||
import sysconfig
|
||||
import unittest
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import asdl
|
||||
|
||||
|
||||
|
|
4
third_party/python/Lib/test/test_cosmo.py
vendored
4
third_party/python/Lib/test/test_cosmo.py
vendored
|
@ -9,8 +9,8 @@ class SubprocessTest(unittest.TestCase):
|
|||
def test_execve(self):
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
self.addCleanup(shutil.rmtree, tmp_dir)
|
||||
exe = os.path.join(tmp_dir, 'hello.com')
|
||||
shutil.copyfile('/zip/.python/test/hello.com', exe)
|
||||
exe = os.path.join(tmp_dir, 'hello')
|
||||
shutil.copyfile('/zip/.python/test/hello', exe)
|
||||
os.chmod(exe, 0755)
|
||||
proc = subprocess.Popen([exe], stdout=subprocess.PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
|
|
2
third_party/python/Lib/test/test_datetime.py
vendored
2
third_party/python/Lib/test/test_datetime.py
vendored
|
@ -3,7 +3,7 @@ import sys
|
|||
|
||||
from test.support import import_fresh_module, run_unittest
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import _datetime
|
||||
import _strptime
|
||||
import datetime
|
||||
|
|
2
third_party/python/Lib/test/test_decimal.py
vendored
2
third_party/python/Lib/test/test_decimal.py
vendored
|
@ -47,7 +47,7 @@ try:
|
|||
except ImportError:
|
||||
threading = None
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import decimal
|
||||
import fractions
|
||||
|
||||
|
|
2
third_party/python/Lib/test/test_doctest.py
vendored
2
third_party/python/Lib/test/test_doctest.py
vendored
|
@ -2962,7 +2962,7 @@ if __name__ == '__main__':
|
|||
else:
|
||||
test_main()
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import test.sample_doctest
|
||||
import test.sample_doctest_no_docstrings
|
||||
import test.sample_doctest_no_doctests
|
||||
|
|
2
third_party/python/Lib/test/test_fcntl.py
vendored
2
third_party/python/Lib/test/test_fcntl.py
vendored
|
@ -11,7 +11,7 @@ from test.support import (verbose, TESTFN, unlink, run_unittest, import_module,
|
|||
# Skip test if no fcntl module.
|
||||
fcntl = import_module('fcntl')
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import fcntl
|
||||
import termios
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ except ImportError:
|
|||
threading = None
|
||||
|
||||
import functools
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import decimal
|
||||
|
||||
py_functools = support.import_fresh_module('functools', blocked=['_functools'])
|
||||
|
|
2
third_party/python/Lib/test/test_gzip.py
vendored
2
third_party/python/Lib/test/test_gzip.py
vendored
|
@ -16,7 +16,7 @@ from test.support import _4G, bigmemtest
|
|||
from test.support.script_helper import assert_python_ok
|
||||
|
||||
gzip = support.import_module('gzip')
|
||||
if __name__ == 'PYOBJ.COM': import gzip
|
||||
if __name__ == 'PYOBJ': import gzip
|
||||
|
||||
data1 = b""" int length=DEFAULTALLOC, err = Z_OK;
|
||||
PyObject *RetVal;
|
||||
|
|
2
third_party/python/Lib/test/test_hashlib.py
vendored
2
third_party/python/Lib/test/test_hashlib.py
vendored
|
@ -24,7 +24,7 @@ from test import support
|
|||
from test.support import _4G, bigmemtest, import_fresh_module
|
||||
from http.client import HTTPException
|
||||
|
||||
# if __name__ == 'PYOBJ.COM':
|
||||
# if __name__ == 'PYOBJ':
|
||||
# import _sha3 # what a horror show
|
||||
|
||||
# Were we compiled --with-pydebug or with #define Py_DEBUG?
|
||||
|
|
|
@ -6,7 +6,7 @@ from subprocess import Popen, PIPE
|
|||
from test import support
|
||||
from test.support.script_helper import assert_python_ok
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import json.tool
|
||||
|
||||
class TestTool(unittest.TestCase):
|
||||
|
|
2
third_party/python/Lib/test/test_marshal.py
vendored
2
third_party/python/Lib/test/test_marshal.py
vendored
|
@ -12,7 +12,7 @@ try:
|
|||
except ImportError:
|
||||
_testcapi = None
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import _testcapi
|
||||
|
||||
class HelperMixin:
|
||||
|
|
2
third_party/python/Lib/test/test_mmap.py
vendored
2
third_party/python/Lib/test/test_mmap.py
vendored
|
@ -10,7 +10,7 @@ import weakref
|
|||
|
||||
# Skip test if we can't import mmap.
|
||||
mmap = import_module('mmap')
|
||||
if __name__ == 'PYOBJ.COM': import mmap
|
||||
if __name__ == 'PYOBJ': import mmap
|
||||
|
||||
PAGESIZE = mmap.PAGESIZE
|
||||
|
||||
|
|
2
third_party/python/Lib/test/test_os.py
vendored
2
third_party/python/Lib/test/test_os.py
vendored
|
@ -28,7 +28,7 @@ import unittest
|
|||
import uuid
|
||||
import warnings
|
||||
from test import support
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import resource
|
||||
try:
|
||||
import _thread
|
||||
|
|
2
third_party/python/Lib/test/test_repl.py
vendored
2
third_party/python/Lib/test/test_repl.py
vendored
|
@ -9,7 +9,7 @@ from textwrap import dedent
|
|||
from test.support import cpython_only, SuppressCrashReport
|
||||
from test.support.script_helper import kill_python
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import _testcapi
|
||||
|
||||
def spawn_repl(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw):
|
||||
|
|
|
@ -15,7 +15,7 @@ try:
|
|||
import resource
|
||||
except ImportError:
|
||||
resource = None
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import resource
|
||||
|
||||
|
||||
|
|
2
third_party/python/Lib/test/test_stat.py
vendored
2
third_party/python/Lib/test/test_stat.py
vendored
|
@ -229,6 +229,6 @@ class TestFilemodeCStat(TestFilemode, unittest.TestCase):
|
|||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import stat
|
||||
import _stat
|
||||
|
|
2
third_party/python/Lib/test/test_syslog.py
vendored
2
third_party/python/Lib/test/test_syslog.py
vendored
|
@ -39,5 +39,5 @@ class Test(unittest.TestCase):
|
|||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
import syslog
|
||||
|
|
2
third_party/python/Lib/test/test_tarfile.py
vendored
2
third_party/python/Lib/test/test_tarfile.py
vendored
|
@ -26,7 +26,7 @@ try:
|
|||
import lzma
|
||||
except ImportError:
|
||||
lzma = None
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import gzip
|
||||
import bz2
|
||||
|
||||
|
|
2
third_party/python/Lib/test/test_tempfile.py
vendored
2
third_party/python/Lib/test/test_tempfile.py
vendored
|
@ -33,7 +33,7 @@ if sys.platform.startswith('openbsd'):
|
|||
else:
|
||||
TEST_FILES = 100
|
||||
|
||||
if __name__ == "PYOBJ.COM":
|
||||
if __name__ == "PYOBJ":
|
||||
from test import tf_inherit_check
|
||||
|
||||
# This is organized as one test for each chunk of code in tempfile.py,
|
||||
|
|
2
third_party/python/Lib/test/test_typing.py
vendored
2
third_party/python/Lib/test/test_typing.py
vendored
|
@ -29,7 +29,7 @@ try:
|
|||
except ImportError:
|
||||
import collections as collections_abc # Fallback for PY3.2.
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import test.ann_module
|
||||
import test.ann_module2
|
||||
import test.ann_module3
|
||||
|
|
|
@ -128,7 +128,7 @@ from encodings import (
|
|||
zlib_codec,
|
||||
)
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
if __name__ == 'PYOBJ':
|
||||
import _elementtree
|
||||
import xml.etree
|
||||
import xml.etree.cElementTree
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue