Skip to content

Commit

Permalink
Remove wrapper script (conda-forge#11)
Browse files Browse the repository at this point in the history
* Removed wrapper script

* Bumped build number

* Use juliarc (conda-forge#1)

* Add a custom juliarc.jl

Needed to ensure packages and other relevant information to the Julia
install are tracked in the conda environment.

* Install custom juliarc

Make sure that that our custom juliarc is available in the standard
location.

* Create the package directory

Make sure that Julia initializes our package directory and includes the
standard packages in it.

* Bump build number to 1

Needed to repackage after removal of the wrapper script, inclusion of
juliarc, and inclusion of the prepopulated package directory.

* Removed JULIA_HISTORY setting

* Drop package initialization (conda-forge#2)

This does not work correctly as `conda-build` strips out the `.git`
directory from `METADATA`. There are no clean fixes for this issue. As
we already try to initialize the package directory when Julia starts,
this will be handled anyways on the user's machine. In the end, this may
be best to avoid having a potentially out-of-date index in the package.

* Append juliarc.jl instead of replace

* Append juliarc.jl the right way

* Added post-link script for Pkg.init()

* Removed Pkg.init() from juliarc.jl

* Correct setting Base.LOAD_CACHE_PATH

* Correct setting Base.LOAD_CACHE_PATH again

(cherry picked from commit 19d96fa)
  • Loading branch information
dfornika authored and jakirkham committed Sep 13, 2017
1 parent 1ee6b9d commit 6d1b1e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 29 deletions.
6 changes: 2 additions & 4 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ make -j 4 prefix=${PREFIX} MARCH=core2 sysconfigdir=${PREFIX}/etc NO_GIT=1 \
TAGGED_RELEASE_BANNER="conda-forge-julia release" \
install

mv "$PREFIX/bin/julia" "$PREFIX/bin/julia_"
cp "$RECIPE_DIR/julia-wrapper.sh" "$PREFIX/bin/julia"
chmod +x "$PREFIX/bin/julia"

# Configure juliarc to use conda environment
cat "${RECIPE_DIR}/juliarc.jl" >> "${PREFIX}/etc/julia/juliarc.jl"
24 changes: 0 additions & 24 deletions recipe/julia-wrapper.sh

This file was deleted.

6 changes: 6 additions & 0 deletions recipe/juliarc.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
JULIA_PREFIX = abspath(joinpath(Base.source_path(), "..", "..", ".."))

if !("JULIA_PKGDIR" in keys(ENV))
ENV["JULIA_PKGDIR"] = joinpath(JULIA_PREFIX, "share", "julia", "site")
Base.LOAD_CACHE_PATH[1] = joinpath(ENV["JULIA_PKGDIR"], "lib", string("v", join(split(string(VERSION), ".")[1:2], ".")))
end
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source:

build:
skip: True # [osx or win]
number: 0
number: 1
features:
- blas_{{ variant }}

Expand Down
1 change: 1 addition & 0 deletions recipe/post-link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
julia -e 'Pkg.init()'

0 comments on commit 6d1b1e6

Please sign in to comment.