QssStylesheetEditor
QssStylesheetEditor copied to clipboard
Python wheel install failure on Fedora 30
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
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.
new version will directly using app:main
in wheel