# HG changeset patch # User Denis Laxalde # Date 1467708245 -7200 # Node ID 06bcb7e7a69cec9d1ba575f6ae295741926a7222 # Parent b5cd8a2cccabbd19b548116a6908d57dde5f8bf8 [pkg] Handle verbose option in setup.py's export function Make debugging easier. diff -r b5cd8a2cccab -r 06bcb7e7a69c setup.py --- a/setup.py Tue Jul 05 10:20:33 2016 +0200 +++ b/setup.py Tue Jul 05 10:44:05 2016 +0200 @@ -118,15 +118,23 @@ import errno if ex.errno != errno.EEXIST: raise + else: + if verbose: + print('created %s directory' % to_dir) for dirpath, dirnames, filenames in os.walk(from_dir): for norecurs in blacklist: try: dirnames.remove(norecurs) except ValueError: pass + else: + if verbose: + print('not recursing in %s' % join(dirpath, norecurs)) for dirname in dirnames: dest = join(to_dir, dirname) if not exists(dest): + if verbose: + print('creating %s directory' % dest) os.mkdir(dest) for filename in filenames: # don't include binary files @@ -138,6 +146,8 @@ continue if exists(dest): os.remove(dest) + if verbose: + print('copying %s to %s' % (src, dest)) shutil.copy2(src, dest) @@ -153,7 +163,7 @@ if include_dirs: for directory in include_dirs: dest = join(self.install_dir, modname, directory) - export(directory, dest, verbose=False) + export(directory, dest, verbose=self.verbose) # write required share/cubicweb/cubes/__init__.py class MyInstallData(install_data.install_data):