from types import *
from distutils.core import Command, DEBUG
from distutils import sysconfig
-from distutils.util import write_file, native_path, subst_vars, change_root
+from distutils.util import write_file, convert_path, subst_vars, change_root
from distutils.errors import DistutilsOptionError
from glob import glob
# convert to local form in case Unix notation used (as it
# should be in setup scripts)
- extra_dirs = native_path (extra_dirs)
+ extra_dirs = convert_path (extra_dirs)
else:
path_file = None
from types import *
from glob import glob
from distutils.core import Command
-from distutils.util import newer, create_tree, remove_tree, native_path, \
+from distutils.util import newer, create_tree, remove_tree, convert_path, \
write_file
from distutils.archive_util import check_archive_formats
from distutils.text_file import TextFile
action)
continue
- pattern_list = map(native_path, words[1:])
+ pattern_list = map(convert_path, words[1:])
elif action in ('recursive-include','recursive-exclude'):
if len (words) < 3:
action)
continue
- dir = native_path(words[1])
- pattern_list = map (native_path, words[2:])
+ dir = convert_path(words[1])
+ pattern_list = map (convert_path, words[2:])
elif action in ('graft','prune'):
if len (words) != 2:
action)
continue
- dir_pattern = native_path (words[1])
+ dir_pattern = convert_path (words[1])
else:
template.warn ("invalid manifest template line: " +
# get_platform()
-def native_path (pathname):
+def convert_path (pathname):
"""Return 'pathname' as a name that will work on the native
filesystem, i.e. split it on '/' and put it back together again
using the current directory separator. Needed because filenames in
if pathname[-1] == '/':
raise ValueError, "path '%s' cannot end with '/'" % pathname
if os.sep != '/':
- if os.sep in pathname:
- raise ValueError, \
- "path '%s' cannot contain '%c' character" % (pathname, os.sep)
- else:
- paths = string.split (pathname, '/')
- return apply (os.path.join, paths)
+ paths = string.split (pathname, '/')
+ return apply (os.path.join, paths)
else:
return pathname
-# native_path ()
+# convert_path ()
def change_root (new_root, pathname):