Skip to content

Commit 074adab

Browse files
vcarpaniNicolasHug
andauthored
Add flag to ignore ffmpeg in python build. (#6199)
* Add flag to ignore ffmpeg in python build. * Update setup.py to avoid potential collisions with other projects that are using FFMPEG Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Nicolas Hug <[email protected]>
1 parent 32e6341 commit 074adab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ def get_extensions():
356356
print("Error fetching ffmpeg version, ignoring ffmpeg.")
357357
has_ffmpeg = False
358358

359+
use_ffmpeg = os.getenv("TORCHVISION_USE_FFMPEG", "1") == "1"
360+
has_ffmpeg = has_ffmpeg and use_ffmpeg
359361
print(f"FFmpeg found: {has_ffmpeg}")
360362

361363
if has_ffmpeg:

0 commit comments

Comments
 (0)