Kaydet (Commit) 9bd39c11 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

put downloaded test support files in Lib/test/data instead of the cwd

üst 51f32c00
...@@ -14,24 +14,7 @@ platform ...@@ -14,24 +14,7 @@ platform
pyconfig.h pyconfig.h
libpython*.a libpython*.a
python.exe python.exe
CP936.TXT
SHIFT_JISX0213.TXT
JOHAB.TXT
EUC-JP.TXT
NormalizationTest-3.2.0.txt
NormalizationTest.txt
BIG5.TXT
BIG5HKSCS-2004.TXT
CP949.TXT
EUC-CN.TXT
BIG5HKSCS.TXT
SHIFTJIS.TXT
EUC-KR.TXT
EUC-JISX0213.TXT
CP932.TXT
CP950.TXT
reflog.txt reflog.txt
gb-18030-2000.xml
tags tags
TAGS TAGS
.gdb_history .gdb_history
......
.gdb_history .gdb_history
.purify .purify
.svn .svn
BIG5.TXT
BIG5HKSCS-2004.TXT
BIG5HKSCS.TXT
CP932.TXT
CP936.TXT
CP949.TXT
CP950.TXT
EUC-CN.TXT
EUC-JISX0213.TXT
EUC-JP.TXT
EUC-KR.TXT
JOHAB.TXT
Makefile Makefile
Makefile.pre Makefile.pre
NormalizationTest-3.2.0.txt
NormalizationTest.txt
SHIFTJIS.TXT
SHIFT_JISX0213.TXT
TAGS TAGS
autom4te.cache autom4te.cache
build build
...@@ -28,7 +12,6 @@ config.log ...@@ -28,7 +12,6 @@ config.log
config.status config.status
config.status.lineno config.status.lineno
db_home db_home
gb-18030-2000.xml
platform platform
pyconfig.h pyconfig.h
python python
......
...@@ -468,13 +468,12 @@ def open_urlresource(url): ...@@ -468,13 +468,12 @@ def open_urlresource(url):
requires('urlfetch') requires('urlfetch')
filename = urlparse.urlparse(url)[2].split('/')[-1] # '/': it's URL! filename = urlparse.urlparse(url)[2].split('/')[-1] # '/': it's URL!
for path in [os.path.curdir, os.path.pardir]: fn = os.path.join(os.path.dirname(__file__), "data", filename)
fn = os.path.join(path, filename) if os.path.exists(fn):
if os.path.exists(fn): return open(fn)
return open(fn)
print >> get_original_stdout(), '\tfetching %s ...' % url print >> get_original_stdout(), '\tfetching %s ...' % url
fn, _ = urllib.urlretrieve(url, filename) fn, _ = urllib.urlretrieve(url, fn)
return open(fn) return open(fn)
......
...@@ -1173,6 +1173,7 @@ clobber: clean profile-removal ...@@ -1173,6 +1173,7 @@ clobber: clean profile-removal
# remove all generated files, even Makefile[.pre] # remove all generated files, even Makefile[.pre]
# Keep configure and Python-ast.[ch], it's possible they can't be generated # Keep configure and Python-ast.[ch], it's possible they can't be generated
distclean: clobber distclean: clobber
-rm -f Lib/test/data/*
-rm -f core Makefile Makefile.pre config.status \ -rm -f core Makefile Makefile.pre config.status \
Modules/Setup Modules/Setup.local Modules/Setup.config Modules/Setup Modules/Setup.local Modules/Setup.config
find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment