is there any way to have icon for .exe file that created as an entry point using pypi?
Question:
I made python package for a gui application(pyqt5 base) there is a problem when I search for it using windows search the app doesn’t have any icon is there any way to fix it ? I’m looking for a way through setup.py (config file for making python package)
setup.py
from distutils.core import setup
from setuptools import setup
setup(
name="subtodl",
packages = ['Scripts'],
version="0.0.1",
license='MIT',
description = 'a handy tools to download subtitle ',
author = 'mehdi',
install_requires=[
"pyqt5; platform_system=='Windows'",
"beautifulsoup4",
"lxml",
"PyQt5==5.11.3 ;platform_system=='Linux'",
"requests",
"wget",
],
classifiers=[
"Programming Language :: Python :: 3.6",
],
entry_points={
'gui_scripts': [
'subtodl= Scripts.subtodlmain:main',
],
},
)
Answers:
The easiest way to do what you want is:
- Create a shortcut to the app (drag it somewhere while holding ctrl and shift).
- Right click the shortcut and click properties.
- Click change icon, and select the icon file you want.
Now to open your app you just need to double click your shortcut that can be placed anywhere.
well i finally found the answer but it seems that is an old way to do so and i don’t know how to make it cross platform also don’t know how to not hard code path
but it does work i just test it on a Linux base machine
data_files=[
('/share/applications', [subtodl.desktop"])
]
I made python package for a gui application(pyqt5 base) there is a problem when I search for it using windows search the app doesn’t have any icon is there any way to fix it ? I’m looking for a way through setup.py (config file for making python package)
setup.py
from distutils.core import setup
from setuptools import setup
setup(
name="subtodl",
packages = ['Scripts'],
version="0.0.1",
license='MIT',
description = 'a handy tools to download subtitle ',
author = 'mehdi',
install_requires=[
"pyqt5; platform_system=='Windows'",
"beautifulsoup4",
"lxml",
"PyQt5==5.11.3 ;platform_system=='Linux'",
"requests",
"wget",
],
classifiers=[
"Programming Language :: Python :: 3.6",
],
entry_points={
'gui_scripts': [
'subtodl= Scripts.subtodlmain:main',
],
},
)
The easiest way to do what you want is:
- Create a shortcut to the app (drag it somewhere while holding ctrl and shift).
- Right click the shortcut and click properties.
- Click change icon, and select the icon file you want.
Now to open your app you just need to double click your shortcut that can be placed anywhere.
well i finally found the answer but it seems that is an old way to do so and i don’t know how to make it cross platform also don’t know how to not hard code path
but it does work i just test it on a Linux base machine
data_files=[
('/share/applications', [subtodl.desktop"])
]