-
-
Notifications
You must be signed in to change notification settings - Fork 121
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 pip module is broken #2803
Comments
There is something not quite right here. The pip package for v3.0.9 has the following contents: ll src/notcurses/
total 24
0 -rw-r--r--@ 1 mk staff 0B Nov 28 2021 __init__.py
8 -rw-r--r--@ 1 mk staff 2.5K Dec 8 2021 build_notcurses.py
16 -rwxr-xr-x@ 1 mk staff 5.2K Dec 8 2021 notcurses.py* Note the zero bytes module file. Moreover, wc -l src/notcurses/notcurses.py
184 src/notcurses/notcurses.py When I check out g co v3.0.9
HEAD is now at 040ff99fb v3.0.9
ll python/notcurses/
total 376
8 -rw-r--r-- 1 mk staff 3.2K Nov 8 10:15 __init__.py
48 -rw-r--r-- 1 mk staff 23K Nov 8 10:15 channels.c
48 -rw-r--r-- 1 mk staff 22K Nov 8 10:15 context.c
8 -rw-r--r-- 1 mk staff 3.5K Nov 8 10:15 functions.c
16 -rw-r--r-- 1 mk staff 4.4K Nov 8 10:15 main.c
8 -rw-r--r-- 1 mk staff 1.9K Nov 8 10:15 misc.c
16 -rw-r--r-- 1 mk staff 7.9K Nov 8 10:15 notcurses-python.h
88 -rw-r--r-- 1 mk staff 41K Nov 8 10:15 notcurses.py
136 -rw-r--r-- 1 mk staff 65K Nov 8 10:15 plane.c
0 -rw-r--r-- 1 mk staff 0B Nov 8 10:15 py.typed Note that the module is now 3.2K and: wc -l python/notcurses/notcurses.py
1338 python/notcurses/notcurses.py So it seems that the pip package is missing a substantial amount of code. What am I missing here? 🤔 |
Could this be related to this commit? 7b27e50 It references this issue: #2484 How and where is the pip package assembled that is published at https://pypi.org/project/notcurses/? |
Think I found it: Line 39 in bfb65c2
FWIW, this works fine for me: CFLAGS=-I/opt/homebrew/include python setup.py build Why was this build step disabled? 🤔 I think for now I'll just vendor this code and the object file. Would be nice to have this available again as a pip module though. |
Looks like a duplicate of #2624 |
@mttkay Just to add onto your observations, I also wanted python bindings for latest release. Pip gave me the same issues you referenced in #2484 . I did the following:
This got me a similar line count:
Let me know how I can help getting this into PyPI. |
On macOS Sonoma 14.7 using homebrew for package management. Python 3.12.3 (using asdf shim).
Expected behavior
Running the Python sample apps should work using the
notcurses
pip module available here: https://pypi.org/project/notcurses/For example:
See https://github.com/dankamongmen/notcurses/blob/fb9b326e1877831af6bffcd79138baf161965ed8/python/examples/000-print-version.py
Actual behavior
Program fails with:
I also found that this file is completely empty, which seems wrong?
This file is not empty in the project repo: https://github.com/dankamongmen/notcurses/blob/7e1a5d48e728e8e8e3ce6dc47fdb37c7a7d169bf/python/notcurses/__init__.py
The text was updated successfully, but these errors were encountered: