Kaydet (Commit) 440e2f51 authored tarafından Greg Ward's avatar Greg Ward

Patch from Perry Stoll: typo fix, make sure we only compile .py files.

üst 5d60fcf0
......@@ -9,7 +9,7 @@ from distutils.util import copy_tree
class InstallPy (Command):
options = [('dir=', 'd', "directory to install to"),
('build-dir=' 'b', "build directory (where to install from)"),
('build-dir=','b', "build directory (where to install from)"),
('compile', 'c', "compile .py to .pyc"),
('optimize', 'o', "compile .py to .pyo (optimized)"),
]
......@@ -54,6 +54,9 @@ class InstallPy (Command):
for f in outfiles:
# XXX can't assume this filename mapping!
# only compile the file if it is actually a .py file
if f[-3:] == '.py':
out_fn = string.replace (f, '.py', '.pyc')
self.make_file (f, out_fn, compile, (f,),
......
......@@ -9,7 +9,7 @@ from distutils.util import copy_tree
class InstallPy (Command):
options = [('dir=', 'd', "directory to install to"),
('build-dir=' 'b', "build directory (where to install from)"),
('build-dir=','b', "build directory (where to install from)"),
('compile', 'c', "compile .py to .pyc"),
('optimize', 'o', "compile .py to .pyo (optimized)"),
]
......@@ -54,6 +54,9 @@ class InstallPy (Command):
for f in outfiles:
# XXX can't assume this filename mapping!
# only compile the file if it is actually a .py file
if f[-3:] == '.py':
out_fn = string.replace (f, '.py', '.pyc')
self.make_file (f, out_fn, compile, (f,),
......
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