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

whl package does not include an executable #94

Open
LuckyTurtleDev opened this issue Apr 11, 2022 · 4 comments
Open

whl package does not include an executable #94

LuckyTurtleDev opened this issue Apr 11, 2022 · 4 comments

Comments

@LuckyTurtleDev
Copy link

The whl package does only include side packages and no executable.

$ tree 
.
└── lib
    └── python3.10
        └── site-packages
            ├── syncmymoodle
            │   ├── debug.py
            │   ├── __init__.py
            │   ├── __main__.py
            │   └── __pycache__
            │       ├── debug.cpython-310.opt-1.pyc
            │       ├── debug.cpython-310.pyc
            │       ├── __init__.cpython-310.opt-1.pyc
            │       ├── __init__.cpython-310.pyc
            │       ├── __main__.cpython-310.opt-1.pyc
            │       └── __main__.cpython-310.pyc
            └── syncMyMoodle-0.0.3.dist-info
                ├── LICENSE
                ├── METADATA
                ├── RECORD
                ├── top_level.txt
                └── WHEEL

Step to reproduce:

  • build whl package
  • install whl package
python -m build --wheel --no-isolation
python -m installer --destdir=test dist/*.whl
@septatrix
Copy link
Collaborator

I am not sure what you are missing. syncmymoodle like most python packages does not have a binary executable and in the shown directory structure every file required to run smm seems to be present.

@septatrix
Copy link
Collaborator

Please clarify, otherwise this will be closed

@LuckyTurtleDev
Copy link
Author

I have execute the install command listed above. But the executable is missing. Sadly I am not familiar enough with python, to be able to say, why this happen.
I have try to follow the arch package guidelines for pythons wheel format, witch is used by this project.
see https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)

I was able to workaround this issues by installing manual the __main__.py and ignore the package system of python.
see https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=sync-my-moodle-git#n28.
But this avoid that pycache can be used.

@septatrix
Copy link
Collaborator

Ah yes to packaging tools this is just a library and has no entrypoints. On the v2 Branch I have declared a proper entrypoint though I have not touched that branch in months sadly.

However with your current setup you should still be able to call it like python3 -m syncmymoodle.

@n0toose n0toose changed the title whl package does only include side packages whl package does not include an executable Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants