SomberNight 3 years ago
parent
commit
a15ed939b7
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 18
      setup.py

18
setup.py

@ -33,21 +33,11 @@ version_spec.loader.exec_module(version_module)
data_files = []
if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
parser = argparse.ArgumentParser()
parser.add_argument('--root=', dest='root_path', metavar='dir', default='/')
opts, _ = parser.parse_known_args(sys.argv[1:])
usr_share = os.path.join(sys.prefix, "share")
icons_dirname = 'pixmaps'
if not os.access(opts.root_path + usr_share, os.W_OK) and \
not os.access(opts.root_path, os.W_OK):
icons_dirname = 'icons'
if 'XDG_DATA_HOME' in os.environ.keys():
usr_share = os.environ['XDG_DATA_HOME']
else:
usr_share = os.path.expanduser('~/.local/share')
# note: we can't use absolute paths here. see #7787
data_files += [
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
(os.path.join(usr_share, icons_dirname), ['electrum/gui/icons/electrum.png']),
(os.path.join('share', 'applications'), ['electrum.desktop']),
(os.path.join('share', 'pixmaps'), ['electrum/gui/icons/electrum.png']),
(os.path.join('share', 'icons/hicolor/128x128/apps'), ['electrum/gui/icons/electrum.png']),
]
extras_require = {

Loading…
Cancel
Save