[pypy-svn] r36244 - in pypy/dist/pypy/tool/build: . test
guido at codespeak.net
guido at codespeak.net
Mon Jan 8 12:15:47 CET 2007
Author: guido
Date: Mon Jan 8 12:15:46 2007
New Revision: 36244
Modified:
pypy/dist/pypy/tool/build/client.py
pypy/dist/pypy/tool/build/test/test_client.py
Log:
(cfbolz, guido): not adding .o files to zip
Modified: pypy/dist/pypy/tool/build/client.py
==============================================================================
--- pypy/dist/pypy/tool/build/client.py (original)
+++ pypy/dist/pypy/tool/build/client.py Mon Jan 8 12:15:46 2007
@@ -125,6 +125,8 @@
def zip_dir(res_dir, tofile):
zip = ZipFile(tofile, 'w')
for fpath in res_dir.visit():
+ if fpath.ext in ['.o']:
+ continue
try:
zip.writestr(fpath.relto(res_dir), fpath.read())
except (py.error.ENOENT, py.error.EISDIR), exc:
Modified: pypy/dist/pypy/tool/build/test/test_client.py
==============================================================================
--- pypy/dist/pypy/tool/build/test/test_client.py (original)
+++ pypy/dist/pypy/tool/build/test/test_client.py Mon Jan 8 12:15:46 2007
@@ -86,6 +86,7 @@
tempdir = py.test.ensuretemp('zip_dir')
tempdir.mkdir('foo')
tempdir.join('foo/bar.txt').write('bar')
+ tempdir.join('foo/bar.o').write('this should not be in the zip (.o file)')
zip = StringIO()
client.zip_dir(tempdir, zip)
@@ -95,6 +96,8 @@
data = zf.read('foo/bar.txt')
assert data == 'bar'
+ py.test.raises(KeyError, 'zf.read("foo/bar.o")')
+
def test_tempdir():
parent = py.test.ensuretemp('tempdir')
for i in range(10):
More information about the Pypy-commit
mailing list