File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 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.
203from 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 ):
You can’t perform that action at this time.
0 commit comments