Fixed filename extention matching. closes #193
This commit is contained in:
parent
e4e4c1cd89
commit
1ca7756dc1
1 changed files with 4 additions and 4 deletions
|
@ -835,12 +835,12 @@ class PythonRecipe(Recipe):
|
||||||
self.install_python_package()
|
self.install_python_package()
|
||||||
self.reduce_python_package()
|
self.reduce_python_package()
|
||||||
|
|
||||||
def remove_junk(self, d):
|
@staticmethod
|
||||||
exts = ["pyc", "py", "so.lib", "so.o", "sh"]
|
def remove_junk(d):
|
||||||
|
exts = [".pyc", ".py", ".so.lib", ".so.o", ".sh"]
|
||||||
for root, dirnames, filenames in walk(d):
|
for root, dirnames, filenames in walk(d):
|
||||||
for fn in filenames:
|
for fn in filenames:
|
||||||
ext = fn.rsplit(".", 1)[-1]
|
if any([fn.endswith(ext) for ext in exts]):
|
||||||
if ext in exts:
|
|
||||||
unlink(join(root, fn))
|
unlink(join(root, fn))
|
||||||
|
|
||||||
def install_python_package(self, name=None, env=None, is_dir=True):
|
def install_python_package(self, name=None, env=None, is_dir=True):
|
||||||
|
|
Loading…
Reference in a new issue