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

Allow building extensions without recompiling av #1356

Closed
2 tasks
voxeljorge opened this issue Mar 25, 2024 · 3 comments · Fixed by #1455
Closed
2 tasks

Allow building extensions without recompiling av #1356

voxeljorge opened this issue Mar 25, 2024 · 3 comments · Fixed by #1455

Comments

@voxeljorge
Copy link

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:

@voxeljorge
Copy link
Author

I wasn't sure which tag to file this under, maybe bug is more appropriate?

@WyattBlue WyattBlue changed the title from av.packet cimport Packet fails to build Allow building extensions without recompiling av Mar 25, 2024
@voxeljorge
Copy link
Author

voxeljorge commented Mar 26, 2024

@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
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants