Skip to content

Commit

Permalink
Skip __init__ when precompiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ames committed Jun 22, 2023
1 parent e374e25 commit 8ad6e50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PythonCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ include("compat/ipython.jl")
include("compat/tables.jl")

function __init__()
ccall(:jl_generating_output, Cint, ()) == 1 && return nothing

C.with_gil() do
init_consts()
init_pyconvert()
Expand Down
2 changes: 2 additions & 0 deletions src/cpython/CPython.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ include("gil.jl")
include("jlwrap.jl")

function __init__()
ccall(:jl_generating_output, Cint, ()) == 1 && return nothing

init_context()
with_gil() do
init_jlwrap()
Expand Down

0 comments on commit 8ad6e50

Please sign in to comment.