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

PyAV recipe #782

Open
DexerBR opened this issue Mar 14, 2023 · 0 comments
Open

PyAV recipe #782

DexerBR opened this issue Mar 14, 2023 · 0 comments

Comments

@DexerBR
Copy link

DexerBR commented Mar 14, 2023

Is your feature request related to a problem? Please describe

I'm trying to compile PyAV for iOS. Up to a certain point the compilation seems to be successful, but when build_ext is executed, the compilation fails.

Note: I'm using the kivy-ios project workflow to test recipe creation

Describe the solution you'd like

I'd like some guidance on the possible reason for the error, or that at least this code/error would help someone implement the PyAV recipe

Additional context

PyAV setup.py: https://github.com/PyAV-Org/PyAV/blob/main/setup.py

PyAV recipe (WIP):

from kivy_ios.toolchain import CythonRecipe, shprint
import sh


class PyAVRecipe(CythonRecipe):

    name = "av"
    library = "av.a"
    version = "10.0.0"
    url = "https://github.com/PyAV-Org/PyAV/archive/v{version}.zip"

    depends = ["python3", "ffmpeg", "hostpython3"]
    opt_depends = ["openssl"]
    hostpython_prerequisites = ["Cython"]

    cythonize = False
    pre_build_ext = False

    def get_recipe_env(self, arch, with_flags_in_cc=True):
        env = super().get_recipe_env(arch)
        return env

    def build_arch(self, arch):
        hostpython3 = sh.Command(self.ctx.hostpython)
        ffmpeg_dir = self.get_recipe("ffmpeg", self.ctx).get_build_dir(
            arch.arch
        )
        shprint(
            hostpython3,
            "setup.py",
            "build",
            "--ffmpeg-dir={}".format(ffmpeg_dir),
        )
        self.biglink()


recipe = PyAVRecipe()

Error logs: https://pastebin.com/raw/b8AW6emG

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

No branches or pull requests

1 participant