QssStylesheetEditor icon indicating copy to clipboard operation
QssStylesheetEditor copied to clipboard

Python wheel install failure on Fedora 30

Open hello-adam opened this issue 3 years ago • 2 comments

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 <[email protected]>
"""

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

hello-adam avatar Oct 27 '20 20:10 hello-adam

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 avatar Nov 14 '20 15:11 hustlei

new version will directly using app:main in wheel

hustlei avatar Dec 23 '20 14:12 hustlei