mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Update distutils so that it triggers no warnings when run under -3.
This commit is contained in:
parent
94f243aa41
commit
047e4a915d
4 changed files with 10 additions and 9 deletions
|
@ -679,7 +679,7 @@ class build_ext (Command):
|
||||||
so_ext = get_config_var('SO')
|
so_ext = get_config_var('SO')
|
||||||
if os.name == 'nt' and self.debug:
|
if os.name == 'nt' and self.debug:
|
||||||
return apply(os.path.join, ext_path) + '_d' + so_ext
|
return apply(os.path.join, ext_path) + '_d' + so_ext
|
||||||
return apply(os.path.join, ext_path) + so_ext
|
return os.path.join(*ext_path) + so_ext
|
||||||
|
|
||||||
def get_export_symbols (self, ext):
|
def get_export_symbols (self, ext):
|
||||||
"""Return the list of symbols that a shared extension has to
|
"""Return the list of symbols that a shared extension has to
|
||||||
|
|
|
@ -169,7 +169,7 @@ class build_py (Command):
|
||||||
del path[-1]
|
del path[-1]
|
||||||
else:
|
else:
|
||||||
tail.insert(0, pdir)
|
tail.insert(0, pdir)
|
||||||
return apply(os.path.join, tail)
|
return os.path.join(*tail)
|
||||||
else:
|
else:
|
||||||
# Oops, got all the way through 'path' without finding a
|
# Oops, got all the way through 'path' without finding a
|
||||||
# match in package_dir. If package_dir defines a directory
|
# match in package_dir. If package_dir defines a directory
|
||||||
|
@ -337,7 +337,7 @@ class build_py (Command):
|
||||||
|
|
||||||
def get_module_outfile (self, build_dir, package, module):
|
def get_module_outfile (self, build_dir, package, module):
|
||||||
outfile_path = [build_dir] + list(package) + [module + ".py"]
|
outfile_path = [build_dir] + list(package) + [module + ".py"]
|
||||||
return apply(os.path.join, outfile_path)
|
return os.path.join(*outfile_path)
|
||||||
|
|
||||||
|
|
||||||
def get_outputs (self, include_bytecode=1):
|
def get_outputs (self, include_bytecode=1):
|
||||||
|
|
|
@ -218,7 +218,8 @@ def run_setup (script_name, script_args=None, stop_after="run"):
|
||||||
sys.argv[0] = script_name
|
sys.argv[0] = script_name
|
||||||
if script_args is not None:
|
if script_args is not None:
|
||||||
sys.argv[1:] = script_args
|
sys.argv[1:] = script_args
|
||||||
execfile(script_name, g, l)
|
with open(script_name, 'r') as file:
|
||||||
|
exec file.read() in g, l
|
||||||
finally:
|
finally:
|
||||||
sys.argv = save_argv
|
sys.argv = save_argv
|
||||||
_setup_stop_after = None
|
_setup_stop_after = None
|
||||||
|
|
10
Misc/NEWS
10
Misc/NEWS
|
@ -92,11 +92,11 @@ Library
|
||||||
|
|
||||||
- Changed code in the following modules/packages to remove warnings raised
|
- Changed code in the following modules/packages to remove warnings raised
|
||||||
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
|
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
|
||||||
ConfigParser, cookielib, csv, difflib, DocXMLRPCServer, email, filecmp,
|
ConfigParser, cookielib, csv, difflib, distutils, DocXMLRPCServer, email,
|
||||||
fileinput, inspect, logging, modulefinder, pdb, pickle, profile, pstats,
|
filecmp, fileinput, inspect, logging, modulefinder, pdb, pickle, profile,
|
||||||
pydoc, re, rlcompleter, SimpleXMLRPCServer, shelve, socket, subprocess,
|
pstats, pydoc, re, rlcompleter, SimpleXMLRPCServer, shelve, socket,
|
||||||
sqlite3, tarfile, Tkinter, test.test_support, textwrap, threading, tokenize,
|
subprocess, sqlite3, tarfile, Tkinter, test.test_support, textwrap,
|
||||||
traceback, urlparse, wsgiref, xml, xmlrpclib.
|
threading, tokenize, traceback, urlparse, wsgiref, xml, xmlrpclib.
|
||||||
|
|
||||||
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
||||||
raised an AttributeError.
|
raised an AttributeError.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue