diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 23 |
1 files changed, 7 insertions, 16 deletions
@@ -23,25 +23,16 @@ import os import os.path -import glob -import shutil from scripts import setupcommon as common import setuptools -BASEDIR = os.path.dirname(os.path.realpath(__file__)) - - -icon_path = os.path.join('qutebrowser', 'icons') try: - shutil.rmtree(icon_path) -except OSError: - pass -os.mkdir(icon_path) -for fn in glob.glob('icons/*.png'): - shutil.copy(fn, icon_path) + BASEDIR = os.path.dirname(os.path.realpath(__file__)) +except NameError: + BASEDIR = None try: @@ -54,10 +45,10 @@ try: test_suite='qutebrowser.test', zip_safe=True, install_requires=['pypeg2', 'jinja2', 'pygments'], - data_files=[('icons', glob.glob('icons/*'))], **common.setupdata ) finally: - path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') - if os.path.exists(path): - os.remove(path) + if BASEDIR is not None: + path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') + if os.path.exists(path): + os.remove(path) |