Skip to content

Commit d0cc3f7

Browse files
author
Christopher Doris
committed
Merge branch 'main' into v1
2 parents 63a3e60 + 42a7e44 commit d0cc3f7

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

docs/src/pythoncall-reference.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,17 @@ Py(x::MyType) = x.py
218218
@pyconst
219219
```
220220

221+
## The Python interpreter
222+
223+
These functions are not exported. They give information about which Python interpreter is
224+
being used.
225+
```@docs
226+
PythonCall.python_version
227+
PythonCall.python_executable_path
228+
PythonCall.python_library_path
229+
PythonCall.python_library_handle
230+
```
231+
221232
## Low-level API
222233

223234
The functions here are not exported. They are mostly unsafe in the sense that you can

docs/src/releasenotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* `PythonCall.GC` is now more like `Base.GC`: `enable(true)` replaces `enable()`, `enable(false)` replaces `disable()`, and `gc()` is added.
55

66
## Unreleased
7+
* New unexported functions: `python_executable_path`, `python_library_path`, `python_library_handle` and `python_version`.
78
* `Py` is now treated as a scalar when broadcasting.
89
* Bug fixes.
910

src/PythonCall.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@ include("Compat/Compat.jl")
1717
for m in [:Core, :Convert, :PyMacro, :Wrap, :JlWrap, :Compat]
1818
for k in names(@eval($m))
1919
if k != m
20-
@eval const $k = $m.$k
20+
@eval using .$m: $k
2121
@eval export $k
2222
end
2323
end
2424
end
2525

2626
# non-exported API
2727
for k in [:python_executable_path, :python_library_path, :python_library_handle, :python_version]
28-
@eval const $k = C.$k
28+
@eval using .C: $k
2929
end
3030
for k in [:pynew, :pyisnull, :pycopy!, :getptr, :pydel!, :unsafe_pynext, :PyNULL, :CONFIG]
31-
@eval const $k = Core.$k
31+
@eval using .Core: $k
3232
end
3333
for k in [:pyconvert_add_rule, :pyconvert_return, :pyconvert_unconverted, :PYCONVERT_PRIORITY_WRAP, :PYCONVERT_PRIORITY_ARRAY, :PYCONVERT_PRIORITY_CANONICAL, :PYCONVERT_PRIORITY_NORMAL, :PYCONVERT_PRIORITY_FALLBACK]
34-
@eval const $k = Convert.$k
34+
@eval using .Convert: $k
3535
end
3636
for k in [:event_loop_on, :event_loop_off, :fix_qt_plugin_path]
37-
@eval const $k = Compat.$k
37+
@eval using .Compat: $k
3838
end
3939

4040
# not API but used in tests
4141
for k in [:pyjlanytype, :pyjlarraytype, :pyjlvectortype, :pyjlbinaryiotype, :pyjltextiotype, :pyjldicttype, :pyjlmoduletype, :pyjlintegertype, :pyjlrationaltype, :pyjlrealtype, :pyjlcomplextype, :pyjlsettype, :pyjltypetype]
42-
@eval const $k = JlWrap.$k
42+
@eval using .JlWrap: $k
4343
end
4444

4545
end

0 commit comments

Comments
 (0)