Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python wheel install failure on Fedora 30 #26

Open
hello-adam opened this issue Oct 27, 2020 · 2 comments
Open

Python wheel install failure on Fedora 30 #26

hello-adam opened this issue Oct 27, 2020 · 2 comments
Labels
implemented New feature added.

Comments

@hello-adam
Copy link

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

@hustlei
Copy link
Owner

hustlei commented Nov 14, 2020

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
Copy link
Owner

hustlei commented Dec 23, 2020

new version will directly using app:main in wheel

@hustlei hustlei added the implemented New feature added. label Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implemented New feature added.
Projects
None yet
Development

No branches or pull requests

2 participants