From 09396d6e4d2b8b134977d5d35539f5c14c79df07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 26 Jan 2018 12:46:35 +0100 Subject: [PATCH] distutils: don't load all modules to look for scss files --- setup.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index 0ca62f64..ac9c7560 100644 --- a/setup.py +++ b/setup.py @@ -92,16 +92,14 @@ class compile_scss(Command): if not sass_bin: raise CompileError('A sass compiler is required but none was found. See sass-lang.com for choices.') - for package in self.distribution.packages: - for package_path in __import__(package).__path__: - for path, dirnames, filenames in os.walk(package_path): - for filename in filenames: - if not filename.endswith('.scss'): - continue - if filename.startswith('_'): - continue - subprocess.check_call([sass_bin, '%s/%s' % (path, filename), - '%s/%s' % (path, filename.replace('.scss', '.css'))]) + for path, dirnames, filenames in os.walk('combo'): + for filename in filenames: + if not filename.endswith('.scss'): + continue + if filename.startswith('_'): + continue + subprocess.check_call([sass_bin, '%s/%s' % (path, filename), + '%s/%s' % (path, filename.replace('.scss', '.css'))]) class build(_build):