drawbot-skia
drawbot-skia copied to clipboard
Dependency issues
~~First, pillow is required to run the test suite and doesn't seem to be mentioned as a test dependency anywhere.~~ I must be blind, it's right there in requirements-dev.txt.
Second it seems numpy should be listed as a test dependency, not as a regular dependency. It is used directly for tests. I looked through the skip-python code based and it seems the same there, it is never used directly in the library but it is used for the test suite. As such they seem to have it specified properly and the only improper thing is where this shows up and moving it to test deps would be appropriate:
https://github.com/justvanrossum/drawbot-skia/blob/f9d5314ee8cf99c9f11b58a914bd76728fe383af/setup.py#L26
My observation is this: in a Python environment without numpy installed, creating a skia.Surface fails:
>>> import skia
>>> skia.Surface(100, 100)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
>>>
Silly me searching only in their Python code. The usage is in C++ bound with pybind. So yes, this is a skip-python project bug.
My PR upstream has been merged so this should be fixed in the next release. I guess the thing to do now is leave this open until there is a tagged release with this fix available, then fix this dependency by moving it to tests only after the skia dep is bumped.