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:
Justine Tunney 2024-03-02 16:57:56 -08:00
parent c8383f25b4
commit a6baba1b07
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
239 changed files with 2092 additions and 2244 deletions

View file

@ -14,8 +14,8 @@ build_time_vars = {'ABIFLAGS': 'm',
'BLDSHARED': 'gcc -shared -static -nostdlib -nostdinc -fno-pie '
'-mno-red-zone -include '
'/cpython36/libcosmo/cosmopolitan.h',
'BUILDEXE': '.com.dbg',
'BUILDPYTHON': 'python.com.dbg',
'BUILDEXE': '.dbg',
'BUILDPYTHON': 'python.dbg',
'BUILD_GNU_TYPE': 'x86_64-pc-cosmo-gnu',
'BYTESTR_DEPS': '\\',
'CC': 'gcc',
@ -120,7 +120,7 @@ build_time_vars = {'ABIFLAGS': 'm',
'DYNLOADFILE': 'dynload_shlib.o',
'ENABLE_IPV6': 0,
'ENSUREPIP': 'no',
'EXE': '.com',
'EXE': '',
'EXEMODE': 755,
'EXTRAMACHDEPPATH': '',
'EXTRATESTOPTS': '',
@ -651,7 +651,7 @@ build_time_vars = {'ABIFLAGS': 'm',
'PACKAGE_VERSION': 0,
'PARSER_HEADERS': '\\',
'PARSER_OBJS': '\\ Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o',
'PGEN': 'Parser/pgen.com.dbg',
'PGEN': 'Parser/pgen.dbg',
'PGENOBJS': '\\ \\',
'PGOBJS': '\\',
'PGO_PROF_GEN_FLAG': '-fprofile-generate',
@ -665,14 +665,14 @@ build_time_vars = {'ABIFLAGS': 'm',
'PY3LIBRARY': '',
'PYEXPAT_ENTROPY': "'XML_POOR_ENTROPY=1'",
'PYLONG_BITS_IN_DIGIT': 0,
'PYTHON': 'python.com.dbg',
'PYTHON': 'python.dbg',
'PYTHONFRAMEWORK': '',
'PYTHONFRAMEWORKDIR': 'no-framework',
'PYTHONFRAMEWORKINSTALLDIR': '',
'PYTHONFRAMEWORKPREFIX': '',
'PYTHONPATH': ':',
'PYTHON_APE': 'python.com',
'PYTHON_FOR_BUILD': './python.com.dbg -E',
'PYTHON_APE': 'python',
'PYTHON_FOR_BUILD': './python.dbg -E',
'PYTHON_FOR_REGEN': 'python3',
'PYTHON_HEADERS': '\\',
'PYTHON_OBJS': '\\',
@ -775,9 +775,9 @@ build_time_vars = {'ABIFLAGS': 'm',
'TCLTK_LIBS': '',
'TESTOPTS': '',
'TESTPATH': '',
'TESTPYTHON': './python.com.dbg',
'TESTPYTHON': './python.dbg',
'TESTPYTHONOPTS': '',
'TESTRUNNER': './python.com.dbg ./Tools/scripts/run_tests.py',
'TESTRUNNER': './python.dbg ./Tools/scripts/run_tests.py',
'TESTTIMEOUT': 1200,
'THREADOBJ': '',
'TIMEMODULE_LIB': 0,

View file

@ -91,5 +91,5 @@ try:
except ImportError:
pass
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _bisect

View file

@ -19,7 +19,7 @@ __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
# For backwards compatibility, continue to make the collections ABCs
# available through the collections module. But don't mandate it, in
# cases where we're compiling with PYOBJ.COM.
# cases where we're compiling with PYOBJ.
try:
from _collections_abc import *
import _collections_abc
@ -513,8 +513,8 @@ class Counter(dict):
# References:
# http://en.wikipedia.org/wiki/Multiset
# http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html
# http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm
# http://code.activestate.com/recipes/259174/
# http://www.demo2s/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm
# http://code.activestate/recipes/259174/
# Knuth, TAOCP Vol. II section 4.6.3
def __init__(*args, **kwds):
@ -1246,5 +1246,5 @@ class UserString(Sequence):
def upper(self): return self.__class__(self.data.upper())
def zfill(self, width): return self.__class__(self.data.zfill(width))
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _collections

View file

@ -1,7 +1,7 @@
from _collections_abc import *
from _collections_abc import __all__
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
AsyncGenerator = 0
AsyncIterable = 0
AsyncIterator = 0

View file

@ -15,7 +15,7 @@ except ImportError:
except ImportError:
pass
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _decimal
BasicContext = 0
Clamped = 0

View file

@ -77,7 +77,7 @@ finally:
del _dummy_thread
del sys_modules
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
Barrier = 0
BoundedSemaphore = 0
BrokenBarrierError = 0

View file

@ -816,5 +816,5 @@ def singledispatch(func):
return wrapper
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _functools

View file

@ -590,7 +590,7 @@ try:
except ImportError:
pass
if __name__ == "PYOBJ.COM":
if __name__ == "PYOBJ":
import _heapq
if __name__ == "__main__":

View file

@ -7,7 +7,7 @@ try:
from _json import scanstring as c_scanstring
except ImportError:
c_scanstring = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _json
__all__ = ['JSONDecoder', 'JSONDecodeError']

View file

@ -14,7 +14,7 @@ try:
from _json import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _json
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')

View file

@ -5,7 +5,7 @@ try:
from _json import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _json
__all__ = ['make_scanner']

View file

@ -418,7 +418,7 @@ else:
except ImportError:
pass
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _operator
# All of these "__func__ = func" assignments have to happen after importing

View file

@ -1038,7 +1038,7 @@ class PathLike(abc.ABC):
return hasattr(subclass, '__fspath__')
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
CLD_CONTINUED = 0
CLD_DUMPED = 0
CLD_EXITED = 0

View file

@ -78,7 +78,7 @@ if 'sigwait' in _globals:
del _globals, _wraps
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
ITIMER_PROF = 0
ITIMER_REAL = 0
ITIMER_VIRTUAL = 0

View file

@ -750,7 +750,7 @@ def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
proto, canonname, sa))
return addrlist
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
AF_APPLETALK = 0
AF_ASH = 0
AF_ATMPVC = 0

View file

@ -25,7 +25,7 @@
from sqlite3.dbapi2 import *
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
Binary = 0
Cache = 0
Connection = 0

View file

@ -225,7 +225,7 @@ if __name__ == "__main__":
f.write("#define SRE_INFO_CHARSET %d\n" % SRE_INFO_CHARSET)
print("done")
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
ANY = 0
ANY_ALL = 0
ASSERT = 0

View file

@ -26,5 +26,5 @@ FILE_ATTRIBUTE_SYSTEM = 4
FILE_ATTRIBUTE_TEMPORARY = 256
FILE_ATTRIBUTE_VIRTUAL = 65536
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _stat

View file

@ -7,7 +7,7 @@ import re
import sys
import traceback
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import resource

View file

@ -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

View file

@ -7,7 +7,7 @@ import sys
import sysconfig
import unittest
if __name__ == "PYOBJ.COM":
if __name__ == "PYOBJ":
import asdl

View file

@ -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()

View file

@ -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

View file

@ -47,7 +47,7 @@ try:
except ImportError:
threading = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import decimal
import fractions

View file

@ -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

View file

@ -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

View file

@ -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'])

View file

@ -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;

View file

@ -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?

View file

@ -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):

View file

@ -12,7 +12,7 @@ try:
except ImportError:
_testcapi = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _testcapi
class HelperMixin:

View file

@ -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

View file

@ -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

View file

@ -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):

View file

@ -15,7 +15,7 @@ try:
import resource
except ImportError:
resource = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import resource

View file

@ -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

View file

@ -39,5 +39,5 @@ class Test(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
if __name__ == "PYOBJ.COM":
if __name__ == "PYOBJ":
import syslog

View file

@ -26,7 +26,7 @@ try:
import lzma
except ImportError:
lzma = None
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import gzip
import bz2

View file

@ -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,

View file

@ -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

View file

@ -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

View file

@ -498,7 +498,7 @@ except ImportError:
global _filters_version
_filters_version += 1
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import _warnings
# Module initialization

View file

@ -2,7 +2,7 @@
from xml.etree.ElementTree import *
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
Comment = 0
Element = 0
ElementTree = 0

View file

@ -25,7 +25,7 @@ from ._exceptions import SAXException, SAXNotRecognizedException, \
SAXParseException, SAXNotSupportedException, \
SAXReaderNotAvailable
if __name__ == 'PYOBJ.COM':
if __name__ == 'PYOBJ':
import xml.sax
def parse(source, handler, errorHandler=ErrorHandler()):