Skip to content

Commit

Permalink
cleanup v1.6 LTS
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Jan 6, 2022
2 parents 9b3568c + 7a7c123 commit e07c7bd
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 16 deletions.
16 changes: 14 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export LIBRARY_PATH=${PREFIX}/lib
export CMAKE_PREFIX_PATH=${PREFIX}
export PATH="${PREFIX}/bin:${PATH}"

# set JULIA_DEPOT_PATH in conda env
# export JULIA_DEPOT_PATH="${PREFIX}/share/julia/site:$JULIA_DEPOT_PATH"

# Hack to suppress building docs
cat > doc/Makefile << EOF
html :
Expand Down Expand Up @@ -62,9 +65,18 @@ make -j${CPU_COUNT} prefix=${PREFIX} sysconfigdir=${PREFIX}/etc \
USE_SYSTEM_ZLIB=1 \
USE_SYSTEM_P7ZIP=1 \
${EXTRA_MAKEFLAGS} \
TAGGED_RELEASE_BANNER="conda-forge-julia release" \
TAGGED_RELEASE_BANNER="https://github.com/conda-forge/julia-feedstock" \
CC=$CC CXX=$CXX FC=$FC \
install

# Configure juliarc to use conda environment
cat "${RECIPE_DIR}/juliarc.jl" >> "${PREFIX}/etc/julia/juliarc.jl"
# cat "${RECIPE_DIR}/juliarc.jl" >> "${PREFIX}/etc/julia/juliarc.jl"

# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/scripts/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done

6 changes: 0 additions & 6 deletions recipe/juliarc.jl

This file was deleted.

22 changes: 16 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ source:
sha256: {{ sha256 }}
patches:
## from https://github.com/archlinux/svntogit-community/tree/packages/julia/trunk
- julia-hardcoded-libs.patch
- patches/julia-hardcoded-libs.patch
## see: https://github.com/JuliaLang/julia/issues/43249#issuecomment-981147025
## and: https://github.com/archlinux/svntogit-community/blob/packages/julia/trunk/julia-libgit-1.2.patch
- patches/libgit2-patch.diff # [linux]
## unreliable tests:
## see: https://github.com/JuliaLang/julia/issues/43004
## - patches/0001-disable-testing-Vararg-Int-N-where.patch # [linux]
## issues with this precompile test, see https://github.com/JuliaLang/julia/issues/43535
## - patches/0002-disable-testing-Baz.baz-1.patch # [linux]
## see PR upstream: https://github.com/JuliaLang/julia/pull/42358
## - patches/0003-correct-test-for-julia-depot-path.patch

build:
skip: true # [win]
number: 0
number: 1
features:

requirements:
Expand All @@ -30,7 +40,7 @@ requirements:
host:
- openblas-ilp64
- patchelf # [linux]
- openlibm
- openlibm <0.8.0
- gmp
- mpfr
- curl
Expand All @@ -54,7 +64,7 @@ requirements:
- libunwind # [linux]
- gmp
- mpfr
- openlibm
- openlibm <0.8.0
- arpack
- suitesparse
- pcre2
Expand All @@ -73,8 +83,8 @@ test:
- julia -e 'Base.runtests(["subarray", "core", "compiler", "worlds", "keywordargs", "numbers", "subtype", "char", "strings", "triplequote", "unicode", "intrinsics", "dict", "hashing", "iobuffer", "staged", "offsetarray", "arrayops", "tuple", "reduce", "reducedim", "abstractarray", "intfuncs", "simdloop", "vecelement",
"rational", "bitarray", "copy", "fastmath", "functional", "iterators", "operators", "ordering", "path", "ccall", "parse", "loading", "gmp", "sorting", "spawn", "backtrace", "exceptions", "file", "read", "version", "namedtuple", "mpfr", "broadcast", "complex", "floatapprox", "reflection", "regex", "float16", "combinatorics",
"sysinfo", "env", "rounding", "ranges", "mod2pi", "euler", "show", "client", "errorshow", "sets", "goto", "llvmcall", "llvmcall2", "ryu", "some", "meta", "stacktraces", "docs", "misc", "threads", "stress", "binaryplatforms", "atexit", "enums", "cmdlineargs", "int", "interpreter", "checked", "bitset", "floatfuncs",
"precompile", "boundscheck", "error", "ambiguous", "cartesian", "osutils", "channels", "iostream", "secretbuffer", "specificity", "reinterpretarray", "syntax", "corelogging", "missing", "asyncmap", "smallarrayshrink", "download"])' # all except stdlib, add "opaque_closure", "filesystem" with 1.7
- julia -e 'Base.runtests(["math"])' # [not osx] due to failure on math.jl:296, pre-haswell processor
"precompile", "boundscheck", "error", "ambiguous", "cartesian", "osutils", "channels", "iostream", "secretbuffer", "specificity", "reinterpretarray", "syntax", "corelogging", "missing", "asyncmap", "smallarrayshrink", "download"]; ncores=ceil(Int, Sys.CPU_THREADS))' # all except stdlib, add "opaque_closure", "filesystem" with 1.7
- julia -e 'Base.runtests(["math"]; ncores=ceil(Int, Sys.CPU_THREADS))' # [not osx] due to failure on math.jl:296, pre-haswell processor
- julia -e 'import Pkg;Pkg.add("LibSSH2_jll")'
- julia -e 'import Pkg;Pkg.add("Sundials")'
requires:
Expand Down
29 changes: 29 additions & 0 deletions recipe/patches/0001-disable-testing-Vararg-Int-N-where.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 7d9a74a0eb59e62d9d64dbbe274184549fbbc752 Mon Sep 17 00:00:00 2001
From: ngam <[email protected]>
Date: Mon, 27 Dec 2021 01:36:02 +0000
Subject: [PATCH 1/3] disable testing Vararg{Int, N} where

---
test/core.jl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/core.jl b/test/core.jl
index 74edc7cddf..6dcbd6a362 100644
--- a/test/core.jl
+++ b/test/core.jl
@@ -3516,9 +3516,9 @@ end
@test_throws TypeError Union{Int, 1}

@test_throws ErrorException Vararg{Any,-2}
-@test_throws ErrorException Vararg{Int, N} where N<:T where T
-@test_throws ErrorException Vararg{Int, N} where N<:Integer
-@test_throws ErrorException Vararg{Int, N} where N>:Integer
+# @test_throws ErrorException Vararg{Int, N} where N<:T where T
+# @test_throws ErrorException Vararg{Int, N} where N<:Integer
+# @test_throws ErrorException Vararg{Int, N} where N>:Integer

mutable struct FooNTuple{N}
z::Tuple{Integer, Vararg{Int, N}}
--
2.34.1

25 changes: 25 additions & 0 deletions recipe/patches/0002-disable-testing-Baz.baz-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 31e9de0137db669f1a41e933da701b0e2c7ea6f2 Mon Sep 17 00:00:00 2001
From: ngam <[email protected]>
Date: Mon, 27 Dec 2021 01:36:51 +0000
Subject: [PATCH 2/3] disable testing Baz.baz == 1

---
test/precompile.jl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/precompile.jl b/test/precompile.jl
index 51b25b8325..8abd491a63 100644
--- a/test/precompile.jl
+++ b/test/precompile.jl
@@ -421,7 +421,7 @@ precompile_test_harness(false) do dir

@test Base.compilecache(Base.PkgId("Baz")) == Base.PrecompilableError() # due to __precompile__(false)
@eval using Baz
- @test Base.invokelatest(Baz.baz) == 1
+ # @test Base.invokelatest(Baz.baz) == 1

# Issue #12720
FooBar1_file = joinpath(dir, "FooBar1.jl")
--
2.34.1

25 changes: 25 additions & 0 deletions recipe/patches/0003-correct-test-for-julia-depot-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From e4f0e7c7f750dc0f27fd59c1fe7cd8d70dbd2fc9 Mon Sep 17 00:00:00 2001
From: ngam <[email protected]>
Date: Sun, 26 Dec 2021 21:45:50 -0500
Subject: [PATCH 3/3] Correct test for JULIA_DEPOT_PATH, See JuliaLang/julia#42358

---
test/cmdlineargs.jl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl
index 3d1efdd0d2..7fb7e5ad9e 100644
--- a/test/cmdlineargs.jl
+++ b/test/cmdlineargs.jl
@@ -119,7 +119,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`
# handling of @projectname in --project and JULIA_PROJECT
let expanded = abspath(Base.load_path_expand("@foo"))
@test expanded == readchomp(`$exename --project='@foo' -e 'println(Base.active_project())'`)
- @test expanded == readchomp(setenv(`$exename -e 'println(Base.active_project())'`, "JULIA_PROJECT" => "@foo", "HOME" => homedir()))
+ @test expanded == readchomp(addenv(`$exename -e 'println(Base.active_project())'`, "JULIA_PROJECT" => "@foo", "HOME" => homedir()))
end

# --quiet, --banner
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,3 @@ index 8b98c76..d926449 100644
function __init__()
--
2.33.0

15 changes: 15 additions & 0 deletions recipe/patches/libgit2-patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl
index 9ffcaa3646..5f571e7b26 100644
--- a/stdlib/LibGit2/src/types.jl
+++ b/stdlib/LibGit2/src/types.jl
@@ -230,6 +230,9 @@ Matches the [`git_remote_callbacks`](https://libgit2.org/libgit2/#HEAD/type/git_
push_update_reference::Ptr{Cvoid} = C_NULL
push_negotiation::Ptr{Cvoid} = C_NULL
transport::Ptr{Cvoid} = C_NULL
+ @static if LibGit2.VERSION >= v"1.2.0"
+ remote_ready::Ptr{Cvoid} = C_NULL
+ end
payload::Any = nothing
@static if LibGit2.VERSION >= v"0.99.0"
resolve_url::Ptr{Cvoid} = C_NULL

1 change: 0 additions & 1 deletion recipe/pre-unlink.sh

This file was deleted.

18 changes: 18 additions & 0 deletions recipe/scripts/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export JULIA_DEPOT_PATH_BACKUP=${JULIA_DEPOT_PATH:-}
export JULIA_PROJECT_BACKUP=${JULIA_PROJECT:-}
export JULIA_LOAD_PATH_BACKUP=${JULIA_LOAD_PATH:-}

# Move ~/.julia to a conda environment specific location
export JULIA_DEPOT_PATH="$CONDA_PREFIX/share/julia:$JULIA_DEPOT_PATH"

# Create a named environment for each conda environment
# Use of @ to specify a shared named environment is new as of Julia 1.7
# https://github.com/JuliaLang/julia/pull/40025
# The name of the environment is the last directory of the CONDA_PREFIX
# export JULIA_PROJECT="@${CONDA_PREFIX##*/}"
# Modify load path so that projects stack on the conda-named environment
# export JULIA_LOAD_PATH="@:$JULIA_PROJECT:@stdlib"

# make julia use same cert
export JULIA_SSL_CA_ROOTS_PATH_BACKUP=${JULIA_SSL_CA_ROOTS_PATH:-}
export JULIA_SSL_CA_ROOTS_PATH=$CONDA_PREFIX/ssl/cacert.pem
22 changes: 22 additions & 0 deletions recipe/scripts/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export JULIA_DEPOT_PATH=$JULIA_DEPOT_PATH_BACKUP
export JULIA_PROJECT=$JULIA_PROJECT_BACKUP
export JULIA_LOAD_PATH=$JULIA_LOAD_PATH_BACKUP
export JULIA_SSL_CA_ROOTS_PATH=$JULIA_SSL_CA_ROOTS_PATH_BACKUP

unset JULIA_DEPOT_PATH_BACKUP
unset JULIA_PROJECT_BACKUP
unset JULIA_LOAD_PATH_BACKUP
unset JULIA_SSL_CA_ROOTS_PATH_BACKUP

if [ -z $JULIA_DEPOT_PATH ]; then
unset JULIA_DEPOT_PATH
fi
if [ -z $JULIA_PROJECT ]; then
unset JULIA_PROJECT
fi
if [ -z $JULIA_LOAD_PATH ]; then
unset JULIA_LOAD_PATH
fi
if [ -z $JULIA_SSL_CA_ROOTS_PATH ]; then
unset JULIA_SSL_CA_ROOTS_PATH
fi

0 comments on commit e07c7bd

Please sign in to comment.