mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Merged revisions 69692 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69692 | tarek.ziade | 2009-02-16 22:38:01 +0100 (Mon, 16 Feb 2009) | 1 line Fixed #2279: distutils.sdist.add_defaults now add files listed in package_data and data_files ........
This commit is contained in:
parent
25e26a02f4
commit
0d0506ecef
6 changed files with 162 additions and 42 deletions
|
@ -42,6 +42,19 @@ class TempdirManager(object):
|
|||
self.tempdirs.append(d)
|
||||
return d
|
||||
|
||||
def write_file(self, path, content):
|
||||
"""Writes a file in the given path.
|
||||
|
||||
|
||||
path can be a string or a sequence.
|
||||
"""
|
||||
if isinstance(path, (list, tuple)):
|
||||
path = os.path.join(*path)
|
||||
f = open(path, 'w')
|
||||
try:
|
||||
f.write(content)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
class DummyCommand:
|
||||
"""Class to store options for retrieval via set_undefined_options()."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue