PyVenvs.jl

Julian interface for Pythonic virtual environments

MIT License

Stars
6
Committers
1

PyVenvs: Julian interface for Pythonic virtual environments

module MyPackage

using PyVenvs

@pyvenv CLI_VENV requirements="""
Pygments ==2.*
docutils ==0.16.*
"""

function __init__()
    PyVenvs.init(CLI_VENV)
end

pygmentize(args::Cmd) = Cmd(CLI_VENV, `pygmentize $args`)
rst2html(args::Cmd) = Cmd(CLI_VENV, `rst2html.py $args`)

end # module

PyCall integration

julia> using PyVenvs

julia> PyVenvs.init_pycall()

julia> using PyCall

Note that PyVenvs.init_pycall should not be called in packages. Typically, it should be called at the beginning of a script or REPL session as soon as possible.