Commit 40fa0e0
committed
fix(setup): drop legacy numpy setup-flag check and declare runtime numpy dep
two follow-on fixes to the cherry-picked install fix from arcitec's pr #19:
- the `if "__NUMPY_SETUP__" in __builtins__` guard raises
`TypeError: argument of type 'module' is not iterable` under modern
setuptools where `__builtins__` is a module rather than a dict. drop it —
modern numpy doesn't set the flag anyway, so the guard is a no-op even
when it parses.
- add `install_requires=['numpy']` so a clean `pip install fastgrab` also
pulls numpy at install time. without it, `setup_requires` satisfied the
build but `import fastgrab.screenshot` failed at runtime with
`ModuleNotFoundError: numpy`. verified end-to-end on a fresh
`python:3.11-slim` container with no numpy preinstalled — the two-line
api now works after a single `pip install`.1 parent 94b18ee commit 40fa0e0
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
| |||
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
| 33 | + | |
38 | 34 | | |
39 | 35 | | |
0 commit comments