|
| 1 | +diff '--color=auto' -uNr PyAV-17.0.0/setup.py PyAV-17.0.0.mod/setup.py |
| 2 | +--- PyAV-17.0.0/setup.py 2026-03-14 19:42:41.000000000 +0530 |
| 3 | ++++ PyAV-17.0.0.mod/setup.py 2026-05-22 08:21:47.438004827 +0530 |
| 4 | +@@ -79,20 +79,21 @@ |
| 5 | + """ |
| 6 | + Get distutils-compatible extension arguments using pkg-config. |
| 7 | + """ |
| 8 | +- pkg_config = os.environ.get("PKG_CONFIG", "pkg-config") |
| 9 | +- try: |
| 10 | +- raw_cflags = subprocess.check_output( |
| 11 | +- [pkg_config, "--cflags", "--libs"] |
| 12 | +- + ["lib" + name for name in FFMPEG_LIBRARIES] |
| 13 | +- ) |
| 14 | +- except FileNotFoundError: |
| 15 | +- print(f"{pkg_config} is required for building PyAV") |
| 16 | +- exit(1) |
| 17 | +- except subprocess.CalledProcessError: |
| 18 | +- print(f"{pkg_config} could not find libraries {FFMPEG_LIBRARIES}") |
| 19 | +- exit(1) |
| 20 | ++ # pkg_config = os.environ.get("PKG_CONFIG", "pkg-config") |
| 21 | ++ # try: |
| 22 | ++ # raw_cflags = subprocess.check_output( |
| 23 | ++ # [pkg_config, "--cflags", "--libs"] |
| 24 | ++ # + ["lib" + name for name in FFMPEG_LIBRARIES] |
| 25 | ++ # ) |
| 26 | ++ # except FileNotFoundError: |
| 27 | ++ # print(f"{pkg_config} is required for building PyAV") |
| 28 | ++ # exit(1) |
| 29 | ++ # except subprocess.CalledProcessError: |
| 30 | ++ # print(f"{pkg_config} could not find libraries {FFMPEG_LIBRARIES}") |
| 31 | ++ # exit(1) |
| 32 | + |
| 33 | +- known, unknown = parse_cflags(raw_cflags.decode("utf-8")) |
| 34 | ++ raw_cflags = "-lavdevice -lavfilter -lavformat -lavcodec -lswscale -lswresample -lavutil" |
| 35 | ++ known, unknown = parse_cflags(raw_cflags) |
| 36 | + if unknown: |
| 37 | + print("pkg-config returned flags we don't understand: {}".format(unknown)) |
| 38 | + if "-pthread" in unknown: |
0 commit comments