Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make anaconda_conda work in PyJulia imported in python interpreter statically-linked to libpython. #559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tkf
Copy link
Member

@tkf tkf commented Sep 6, 2018

Another approach could be to create a dummy deps.jl named (say) src/deps_nolibpython.jl like this:

const python = ""
const libpython = ""
const pyprogramname = ""
const wpyprogramname = Base.cconvert(Cwstring, "")
const pyversion_build = v"0.0.0"
const PYTHONHOME = ""
const wPYTHONHOME = Base.cconvert(Cwstring, "")

"True if we are using the Python distribution in the Conda package."
const conda = false

and then include it.

... imported in python interpreter statically-linked to libpython.
@@ -622,6 +622,9 @@ function anaconda_conda()
if conda || !occursin("conda", unsafe_string(ccall(@pysym(:Py_GetVersion), Ptr{UInt8}, ())))
return ""
end
if isempty(pyprogramname)
return ""
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means it will never find conda for statically linked libpython. Is that what we want?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But, I think that's fine because it's called from a Python executable. I don't think Python packages don't usually install Python package dependencies automatically at runtime.

Having said that, pyimport("sys")[:executable] is technically a valid option here. But I don't think that's the right thing to do. Please see #560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants