Merged revisions 79191 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79191 | florent.xicluna | 2010-03-21 13:50:17 +0200 (Sun, 21 Mar 2010) | 3 lines No more deprecation warnings for distutils.sysconfig, following r78666. But when the "dl" module is available, it gives a py3k deprecation warning. ........
This commit is contained in:
parent
55624a2261
commit
e511c6ce8d
|
@ -160,7 +160,7 @@ def make_archive (base_name, format,
|
||||||
func = format_info[0]
|
func = format_info[0]
|
||||||
for (arg,val) in format_info[1]:
|
for (arg,val) in format_info[1]:
|
||||||
kwargs[arg] = val
|
kwargs[arg] = val
|
||||||
filename = apply(func, (base_name, base_dir), kwargs)
|
filename = func(base_name, base_dir, **kwargs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
filename = func(base_name, base_dir, **kwargs)
|
filename = func(base_name, base_dir, **kwargs)
|
||||||
|
|
|
@ -157,7 +157,7 @@ class build_py (Command):
|
||||||
|
|
||||||
if not self.package_dir:
|
if not self.package_dir:
|
||||||
if path:
|
if path:
|
||||||
return apply(os.path.join, path)
|
return os.path.join(*path)
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
else:
|
else:
|
||||||
|
@ -184,7 +184,7 @@ class build_py (Command):
|
||||||
tail.insert(0, pdir)
|
tail.insert(0, pdir)
|
||||||
|
|
||||||
if tail:
|
if tail:
|
||||||
return apply(os.path.join, tail)
|
return os.path.join(*tail)
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ def remove_tree (directory, verbose=0, dry_run=0):
|
||||||
_build_cmdtuple(directory, cmdtuples)
|
_build_cmdtuple(directory, cmdtuples)
|
||||||
for cmd in cmdtuples:
|
for cmd in cmdtuples:
|
||||||
try:
|
try:
|
||||||
apply(cmd[0], (cmd[1],))
|
cmd[0](cmd[1])
|
||||||
# remove dir from cache if it's already there
|
# remove dir from cache if it's already there
|
||||||
abspath = os.path.abspath(cmd[1])
|
abspath = os.path.abspath(cmd[1])
|
||||||
if abspath in _path_created:
|
if abspath in _path_created:
|
||||||
|
|
|
@ -68,7 +68,7 @@ class FileList:
|
||||||
sortable_files.sort()
|
sortable_files.sort()
|
||||||
self.files = []
|
self.files = []
|
||||||
for sort_tuple in sortable_files:
|
for sort_tuple in sortable_files:
|
||||||
self.files.append(apply(os.path.join, sort_tuple))
|
self.files.append(os.path.join(*sort_tuple))
|
||||||
|
|
||||||
|
|
||||||
# -- Other miscellaneous utility methods ---------------------------
|
# -- Other miscellaneous utility methods ---------------------------
|
||||||
|
|
|
@ -349,6 +349,11 @@ class BuildExtTestCase(support.TempdirManager,
|
||||||
self.assertEquals(wanted, path)
|
self.assertEquals(wanted, path)
|
||||||
|
|
||||||
def test_setuptools_compat(self):
|
def test_setuptools_compat(self):
|
||||||
|
try:
|
||||||
|
# on some platforms, it loads the deprecated "dl" module
|
||||||
|
test_support.import_module('setuptools_build_ext', deprecated=True)
|
||||||
|
except test_support.TestSkipped:
|
||||||
|
return
|
||||||
from setuptools_build_ext import build_ext as setuptools_build_ext
|
from setuptools_build_ext import build_ext as setuptools_build_ext
|
||||||
from setuptools_extension import Extension
|
from setuptools_extension import Extension
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,13 @@ the test_suite() function there returns a test suite that's ready to
|
||||||
be run.
|
be run.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from test import test_support
|
||||||
import distutils.tests
|
import distutils.tests
|
||||||
import test.test_support
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
with warnings.catch_warnings():
|
test_support.run_unittest(distutils.tests.test_suite())
|
||||||
warnings.filterwarnings("ignore",
|
test_support.reap_children()
|
||||||
"distutils.sysconfig.\w+ is deprecated",
|
|
||||||
DeprecationWarning)
|
|
||||||
test.test_support.run_unittest(distutils.tests.test_suite())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue