PyAV
PyAV copied to clipboard
Allow building extensions without recompiling av
Any attempt to from av.packet cimport Packet
and build shows a failure that looks like this:
Error compiling Cython file:
------------------------------------------------------------
...
cimport libav as lib
^
------------------------------------------------------------
/home/jorge/.local/lib/python3.8/site-packages/av/packet.pxd:1:8: 'libav.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cimport libav as lib
Overview
It looks like while the base pxd files are included, there are some missing which will cause a build failure. If libav.pxd
and other files in include
were included in the distribution somehow this would allow someone with the correct ffmpeg headers to build extensions on top of pyav without having to fully build pyav itself.
Expected behavior
Build should succeed
Actual behavior
Build fails
Build report:
I'm not actually building pyav from source, i'm using a pip installed version and trying to use the pxd files included in the pip package.
Investigation
I looked in site-packages/av
and found that libav.pxd
is completely missing.
Reproduction
Run this in a jupyter notebook:
%%cython
from av.packet cimport Packet
Versions
- PyAV 12.0.0
Research
I have done the following:
- [x ] Checked the PyAV documentation
- [ x] Searched on Google
- [x ] Searched on Stack Overflow
- [x ] Looked through old GitHub issues
- [ ] Asked on PyAV Gitter
- [ ] ... and waited 72 hours for a response.
I wasn't sure which tag to file this under, maybe bug is more appropriate?
@WyattBlue This seems at minimum like a bug. The current pyav distribution includes pxd files which are impossible to use, so they should either be removed or fixed.
*edit: the current pypi distribution that is
@WyattBlue This seems at minimum like a bug. The current pyav distribution includes pxd files which are impossible to use, so they should either be removed or fixed.
*edit: the current pypi distribution that is
I don't have the admin permissions to modify or remove any release on the av
namespace. I'm labeling this as a feature request instead of a bug because, to my knowledge, no av release ever had this behaviour before and I don't think anyone expected this before.
The next step for this would be to find a minimal Cython project that demonstrations the settings needed to do this. Then a PR could be made.