Repository navigation
WIP: pyjulia updates - #54
Conversation
|
|
||
| if init_julia: | ||
| # Replace the cache directory with a private one. PyCall needs a different | ||
| # configuration and so do any packages that depend on it. Ideally, we could |
There was a problem hiding this comment.
Needs a different configuration (in-process vs shared library).
| # but that would be significantly more complicated and brittle, and may not | ||
| # be worth it. | ||
| self._call(u"empty!(Base.LOAD_CACHE_PATH)") | ||
| self._call(u"push!(Base.LOAD_CACHE_PATH, abspath(Pkg.Dir._pkgroot()," + |
There was a problem hiding this comment.
using internal methods here doesn't look like a great idea for stability's sake
There was a problem hiding this comment.
You mean _pkgroot? Unfortunately that's how to determine where this directory is. If you want to advocate for exporting that method from Base, be my guest.
There was a problem hiding this comment.
Or use the existing LOAD_CACHE_PATH and just modify that.
There was a problem hiding this comment.
Seems like an ok option/
9bbbe4c to
f3aba3c
Compare
| if not sys.platform.startswith('linux'): | ||
| return False | ||
| lddoutput = subprocess.check_output(["ldd",sys.executable]) | ||
| return not lddoutput.conains("libpython") |
There was a problem hiding this comment.
Yes already fixed locally. Give me a few more mins and I'll push all the windows code.
|
There's a travis failure here I don't understand: |
|
|
||
| branches: | ||
| only: | ||
| - clean-julia-0.4 |
There was a problem hiding this comment.
should probably change this to only master, otherwise you get duplicate builds (branch and pr)
|
Do we really want |
|
Yes, it's not the real julia-debug.exe, it's just a very small COFF wrapper. |
|
win32 or win64? |
|
win64, though as long as your os is 64bit it doesn't matter. I suppose I could just compile it as 32bit and have it work anywhere. |
|
if it's just executed as a command line wrapper, that might work more places. we did have a complaint that 0.4.6 doesn't work in a win32 os, so there are still some users. |
|
Your Travis syntax is broken here and is eating up a lot of JuliaLang's queue. Could you enable it on your fork and work things out on a different branch for now? |
|
We could also move this package to JuliaInterop. |
|
Yep, will move to JuliaInterop |
|
I enabled AppVeyor here so if you have pyjulia under your AppVeyor account, you can modify it to point here. :) |
748b646 to
451e123
Compare
| notifications: | ||
| email: false | ||
| before_script: | ||
| - echo ./ci/install-julia.sh $JULIA_VERSION |
There was a problem hiding this comment.
if you end up needing to make changes to this script I'd still rather "upstream" them and have just one copy that lives in the website repo, once you get it all working
Drop the TODO list, which should go into issues.
|
Windows test failure is due to it trying to find |
|
|
||
| # As an optimization, share precompiled packages with the main cache directory | ||
| libjulia.jl_eval_string(b""" | ||
| outputji = Base.JLOptions().outputji |
There was a problem hiding this comment.
should this use a let to avoid always defining this?
There was a problem hiding this comment.
This is after the incremental image has been written, so it'll go away.
Create a python script that emulates being julia and simply hands off control. This is necessary because the precompilation and runtime environment needs to be the same in order for PyCall to be able to be used without major modification. Try a different approach Only use hack if python is statically linked New version yet again
Commit small COFF stubs that essentially fill the role of the redirect bash scripts, since there's no shebang support in the windows kernel.
Fix suggested by jakebolewski and is used instead of np.array_equal to avoid introducing a numpy dependency into the pyjulia test.
They fail because on 0.4 we were looking for libm symbols in the executable and python does not have them. This works fine on 0.5 probably due to one of the architectural changes to the JIT, so it's unlikely this will be backported to 0.4.
|
Ok, I'm gonna go and merge this. Travis OS X is complaining, but that's an ecosystem wide problem right now, so oh well. If it turns out to be broken after, I'll fix that separately. |
This does two things:
The approach taken to 2) is to
a. Separate out cache files into a separate directory to reflect the fact that this is a quite different environment. It may be theoretically possible to share packages that do not depend on PyCall, but this could turn out to be quite brittle and the necessary logic does not currently exist in julia to handle this situation. I think a clean separation as is done here is the best way to go.
b. Use a python script that calls the argument parsing routines directly. This is necessary because the precompilation and runtime environment needs to be the same in order for PyCall to be able to be used without major modification (small PyCall PR to enable loading in-process symbols is forthcoming). I played with a couple of variants here, but I think I've arrived at a very simple/effective solution.
Remaining todo: