File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ dependencies = [
8484 " roman-numerals-py>=1.0.0" ,
8585 " packaging>=23.0" ,
8686 " colorama>=0.4.6; sys_platform == 'win32'" ,
87- " filelock>=3.0" ,
8887]
8988dynamic = [" version" ]
9089
@@ -108,6 +107,9 @@ lint = [
108107 " pypi-attestations==0.0.25" ,
109108 " betterproto==2.0.0b6" ,
110109]
110+ package = [
111+ " filelock>=3.0" ,
112+ ]
111113test = [
112114 " pytest>=8.0" ,
113115 " pytest-xdist[psutil]>=3.4" ,
Original file line number Diff line number Diff line change 1717from subprocess import CalledProcessError
1818from typing import TYPE_CHECKING
1919
20- import filelock
2120from docutils import nodes
2221
2322import sphinx
@@ -275,7 +274,12 @@ def render_math(
275274 lock : Any = contextlib .nullcontext ()
276275 if self .builder .parallel_ok :
277276 lockfile = generated_path .with_suffix (generated_path .suffix + '.lock' )
278- lock = filelock .FileLock (lockfile )
277+ try :
278+ import filelock # type: ignore[import-not-found]
279+
280+ lock = filelock .FileLock (lockfile )
281+ except ImportError :
282+ pass
279283
280284 with lock :
281285 if not generated_path .is_file ():
You can’t perform that action at this time.
0 commit comments