From 8ec802ca83474e5ad0820de356057a0210f6e96b Mon Sep 17 00:00:00 2001 From: Jiahao Song Date: Thu, 19 Oct 2023 11:09:56 +0800 Subject: [PATCH] add precompile to speed up startup (#82) --- TyPython/Project.toml | 2 +- TyPython/src/CPython.jl | 4 +++- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TyPython/Project.toml b/TyPython/Project.toml index 0eae38e..b30a21c 100644 --- a/TyPython/Project.toml +++ b/TyPython/Project.toml @@ -1,7 +1,7 @@ name = "TyPython" uuid = "9c4566a2-237d-4c69-9a5e-9d27b7d0881b" authors = ["thautwarm "] -version = "0.2.4" +version = "0.2.5" [deps] IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89" diff --git a/TyPython/src/CPython.jl b/TyPython/src/CPython.jl index 38921a2..6a417ec 100644 --- a/TyPython/src/CPython.jl +++ b/TyPython/src/CPython.jl @@ -86,7 +86,7 @@ include("CPython.APIs.jl") include("CPython.Boot.jl") include("CPython.ORM.jl") -const G_ATTR_SYM_MAP = Dict{Symbol, Py}() +const G_ATTR_SYM_MAP = Dict{Symbol,Py}() const G_OB_POOL = Any[] let ln = LineNumberNode((@__LINE__), Symbol(@__FILE__)) @@ -110,4 +110,6 @@ function __init__() __init_julia_wrap__() end +precompile(init, ()) + end \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5332ec7..965a948 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "julia-numpy" -version = "0.4.7" +version = "0.4.8" description = "Writing Python C extensions in Julia within 5 minutes." authors = ["thautwarm "] maintainers = ["songjhaha "]