mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix: qt icons not available when installed as python package
follow-up #5053
This commit is contained in:
parent
7ea01e9e91
commit
4fa87d8595
4 changed files with 9 additions and 5 deletions
1
electrum/gui/icons
Symbolic link
1
electrum/gui/icons
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../icons/
|
|
@ -797,7 +797,7 @@ def get_parent_main_window(widget):
|
||||||
|
|
||||||
|
|
||||||
def icon_path(icon_basename):
|
def icon_path(icon_basename):
|
||||||
return resource_path('icons', icon_basename)
|
return resource_path('gui', 'icons', icon_basename)
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=1000)
|
@lru_cache(maxsize=1000)
|
||||||
|
|
|
@ -490,11 +490,11 @@ def user_dir():
|
||||||
|
|
||||||
|
|
||||||
def resource_path(*parts):
|
def resource_path(*parts):
|
||||||
return os.path.join(base_dir, *parts)
|
return os.path.join(pkg_dir, *parts)
|
||||||
|
|
||||||
|
|
||||||
# absolute path to project root dir when running from source
|
# absolute path to python package folder of electrum ("lib")
|
||||||
base_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
|
pkg_dir = os.path.split(os.path.realpath(__file__))[0]
|
||||||
|
|
||||||
|
|
||||||
def is_valid_email(s):
|
def is_valid_email(s):
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -47,7 +47,7 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
|
||||||
usr_share = os.path.expanduser('~/.local/share')
|
usr_share = os.path.expanduser('~/.local/share')
|
||||||
data_files += [
|
data_files += [
|
||||||
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
|
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
|
||||||
(os.path.join(usr_share, icons_dirname), ['icons/electrum.png'])
|
(os.path.join(usr_share, icons_dirname), ['icons/electrum.png']),
|
||||||
]
|
]
|
||||||
|
|
||||||
extras_require = {
|
extras_require = {
|
||||||
|
@ -79,6 +79,9 @@ setup(
|
||||||
'wordlist/*.txt',
|
'wordlist/*.txt',
|
||||||
'locale/*/LC_MESSAGES/electrum.mo',
|
'locale/*/LC_MESSAGES/electrum.mo',
|
||||||
],
|
],
|
||||||
|
'electrum.gui': [
|
||||||
|
'icons/*',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
scripts=['electrum/electrum'],
|
scripts=['electrum/electrum'],
|
||||||
data_files=data_files,
|
data_files=data_files,
|
||||||
|
|
Loading…
Add table
Reference in a new issue