diff options
author | Florian Bruhin <git@the-compiler.org> | 2014-12-28 14:50:25 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2014-12-28 14:50:25 +0100 |
commit | f1435ce51f2fa2bfac9dcff55d94992e4b5e7e00 (patch) | |
tree | 32b77ef285447f68784f18685dd38eea6a4d6657 /setup.py | |
parent | 2a4e884e1b89b731301cf3bc46c7abe4115c3b44 (diff) | |
download | qutebrowser-f1435ce51f2fa2bfac9dcff55d94992e4b5e7e00.tar.gz qutebrowser-f1435ce51f2fa2bfac9dcff55d94992e4b5e7e00.zip |
Use a dirty hack to copy icon files into package.
See #325.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -24,16 +24,21 @@ import os import os.path import glob +import shutil from scripts import setupcommon as common import setuptools -try: - BASEDIR = os.path.dirname(os.path.realpath(__file__)) -except NameError: - BASEDIR = None +BASEDIR = os.path.dirname(os.path.realpath(__file__)) + + +icon_path = os.path.join('qutebrowser', 'icons') +shutil.rmtree(icon_path) +os.mkdir(icon_path) +for fn in glob.glob('icons/*.png'): + shutil.copy(fn, icon_path) try: @@ -50,7 +55,6 @@ try: **common.setupdata ) finally: - if BASEDIR is not None: - path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') - if os.path.exists(path): - os.remove(path) + path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') + if os.path.exists(path): + os.remove(path) |