File tree Expand file tree Collapse file tree 4 files changed +28
-26
lines changed
Expand file tree Collapse file tree 4 files changed +28
-26
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,15 @@ matrix:
4949# https://github.com/pytest-dev/pytest/pull/3893
5050
5151 - &test-aot
52- name : " AOT (Julia: 1.0 )"
52+ name : " AOT (Julia: 1.4 )"
5353 language : julia
5454 os : linux
5555 env : PYTHON=python3
56- julia : 1.0
56+ julia : 1.4
5757 script :
58- - julia --color=yes -e 'using Pkg; Pkg.add(" PackageCompiler") '
58+ - julia --color=yes -e 'using Pkg; pkg"add PackageCompiler@1" '
5959 - julia --color=yes aot/compile.jl
60+ - aot/assert_has_pycall.jl
6061 - aot/runtests.sh
6162 after_success : skip
6263 - {<<: *test-aot, name: "AOT (Julia: nightly)", julia: nightly}
Original file line number Diff line number Diff line change 1+ # !/bin/bash
2+ # -*- mode: julia -*-
3+ #=
4+ thisdir="$(dirname "${BASH_SOURCE[0]}")"
5+ exec "$thisdir/julia.sh" --startup-file=no "$@" ${BASH_SOURCE[0]}
6+ =#
7+
8+ pkgid = Base. PkgId (Base. UUID (" 438e738f-606a-5dbb-bf0a-cddfbfd45ab0" ), " PyCall" )
9+ sysimage_path = unsafe_string (Base. JLOptions (). image_file)
10+ if haskey (Base. loaded_modules, pkgid)
11+ @info " PyCall is compiled in: `$(sysimage_path) `"
12+ else
13+ error (" PyCall is not compiled in: " , sysimage_path)
14+ end
Original file line number Diff line number Diff line change 44exec "${JULIA:-julia}" "$@" ${BASH_SOURCE[0]}
55=#
66
7+ using Libdl
8+ using PackageCompiler
79using Pkg
10+
811Pkg. activate (@__DIR__ )
9- Pkg. add (" MacroTools" )
1012Pkg. develop (PackageSpec (name= " PyCall" , path= dirname (@__DIR__ )))
1113Pkg. build (" PyCall" )
1214Pkg. activate ()
1315
14- using PackageCompiler
15- sysout, _curr_syso = compile_incremental (
16- joinpath (@__DIR__ , " Project.toml" ),
17- joinpath (@__DIR__ , " precompile.jl" ),
16+ sysimage_path = joinpath (@__DIR__ , " sys.$(Libdl. dlext) " )
17+ create_sysimage (
18+ [:PyCall ],
19+ sysimage_path = sysimage_path,
20+ project = @__DIR__ (),
21+ precompile_execution_file = joinpath (@__DIR__ , " precompile.jl" ),
1822)
1923
20- pysysout = joinpath (@__DIR__ , basename (sysout))
21- cp (sysout, pysysout, force= true )
22-
2324write (joinpath (@__DIR__ , " _julia_path" ), Base. julia_cmd (). exec[1 ])
2425
25- @info " System image: $pysysout "
26+ @info " System image: $sysimage_path "
Original file line number Diff line number Diff line change 1- # Activate ./Project.toml. Excluding `"@v#.#"` from `Base.LOAD_PATH`
2- # to make compilation more reproducible.
3- using Pkg
4- empty! (Base. LOAD_PATH )
5- append! (Base. LOAD_PATH , [" @" , " @stdlib" ])
6- Pkg. activate (@__DIR__ )
7-
8- # Manually invoking `__init__` to workaround:
9- # https://github.com/JuliaLang/julia/issues/22910
10-
11- import MacroTools
12- isdefined (MacroTools, :__init__ ) && MacroTools. __init__ ()
13-
141using PyCall
15- PyCall. __init__ ()
162PyCall. pyimport (" sys" )[:executable ]
173
184has_numpy = try
You can’t perform that action at this time.
0 commit comments