hustlei / QssStylesheetEditor

Editor for qt stylesheet (qss). Real-time preview, and user can define varibles in qss.
GNU General Public License v3.0
1.31k stars 255 forks source link

Python wheel install failure on Fedora 30 #26

Open hello-adam opened 4 years ago

hello-adam commented 4 years ago

When I try to install the 1.6 release python wheel with pip, I get the following error:

ERROR: For req: QssStylesheetEditor==1.6. Invalid script entry point: <ExportEntry QssStylesheetEditor = bootstrapper:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.

I was able to get it to work by unpacking the wheel, adding a run_main function to bootstrapper.py, and then changing the [gui_scripts] section of entry_points.txt as follows:

[gui_scripts]
QssStylesheetEditor = bootstrapper:run_main

For clarity, this is what my bootstrapper.py looks like:

#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Bootstrapper for the program

Invoked the main function in app module.

Copyright (c) 2019 lileilei <hustlei@sina.cn>
"""

from app import main

def run_main():
    main()

I'm confused about why bootstrapper.py is needed at all (why not just use the app:main entrypoint?)

Thanks for sharing this program on GitHub - I'm hoping it will help me make a stylesheet for hobbits

hustlei commented 4 years ago

why bootstrapper.py is needed: just for os.path.dirname(__file__) won't work when directly execute python app.py.

maybe bootstrapper.py should be removed in wheel pkg.

hustlei commented 3 years ago

new version will directly using app:main in wheel