Skip to content

Commit 256f1ba

Browse files
committed
If Conda needs this, they can patch it themselves
1 parent e3253e1 commit 256f1ba

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

av/__init__.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
import os
2-
import sys
3-
4-
# Some Python versions distributed by Conda have a buggy `os.add_dll_directory`
5-
# which prevents binary wheels from finding the FFmpeg DLLs in the `av.libs`
6-
# directory. We work around this by adding `av.libs` to the PATH.
7-
if (
8-
os.name == "nt"
9-
and sys.version_info[:2] in ((3, 8), (3, 9))
10-
and os.path.exists(os.path.join(sys.base_prefix, "conda-meta"))
11-
):
12-
os.environ["PATH"] = (
13-
os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, "av.libs"))
14-
+ os.pathsep
15-
+ os.environ["PATH"]
16-
)
17-
181
# MUST import the core before anything else in order to initialize the underlying
192
# library that is being wrapped.
203
from av._core import time_base, library_versions
@@ -77,6 +60,8 @@ def get_include() -> str:
7760
"""
7861
Returns the path to the `include` folder to be used when building extensions to av.
7962
"""
63+
import os
64+
8065
# Installed package
8166
include_path = os.path.join(os.path.dirname(__file__), "include")
8267
if os.path.exists(include_path):

0 commit comments

Comments
 (0)