mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 00:29:04 +02:00
Merge pull request #32943 from overleaf/cd-auto-install-python-packages
Auto-install python packages from the executing python script GitOrigin-RevId: e343312d61e1804d927688bf4e0de00b2bdb5382
This commit is contained in:
@@ -37,9 +37,9 @@ export const PythonExecutionContext = createContext<
|
||||
PythonExecutionContextValue | undefined
|
||||
>(undefined)
|
||||
|
||||
export const PythonExecutionProvider: FC<PropsWithChildren> = ({
|
||||
children,
|
||||
}) => {
|
||||
export const PythonExecutionProvider: FC<
|
||||
PropsWithChildren<{ packageBaseUrl?: string }>
|
||||
> = ({ children, packageBaseUrl }) => {
|
||||
const { openDocs } = useEditorManagerContext()
|
||||
const { projectSnapshot } = useProjectContext()
|
||||
const { pathInFolder } = useFileTreePathContext()
|
||||
@@ -99,13 +99,14 @@ export const PythonExecutionProvider: FC<PropsWithChildren> = ({
|
||||
fileId,
|
||||
baseAssetPathRef.current,
|
||||
() => getExecutionContext(fileId),
|
||||
createPyodideWorker
|
||||
createPyodideWorker,
|
||||
packageBaseUrl
|
||||
)
|
||||
runner.init()
|
||||
runnersRef.current.set(fileId, runner)
|
||||
return runner
|
||||
},
|
||||
[getExecutionContext]
|
||||
[getExecutionContext, packageBaseUrl]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user