Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Use Pkg.BinaryPlatforms and Pkg.PlatformEngines to do the heavy lifting #190

Merged
merged 1 commit into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ task:
name: FreeBSD
env:
matrix:
- JULIA_VERSION: 1.0
- JULIA_VERSION: 1.1
- JULIA_VERSION: 1.3
- JULIA_VERSION: nightly
install_script:
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
Expand Down
17 changes: 1 addition & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,11 @@ os:
- linux
- osx
julia:
- 0.7
- 1.0
- 1.3
- nightly
notifications:
email: false

matrix:
include:
# Make sure to override to "wget" at least once
- julia: 1.0
os: linux
env: BINARYPROVIDER_DOWNLOAD_ENGINE="wget"

# Test with `busybox` tools
# NOTE: This disabled for now, as Ubuntu's busybox doesn't support HTTPS.
# Tested locally to be working on alpine linux, so good enough for now.
#- julia: 1.0
# os: linux
# env: BINARYPROVIDER_DOWNLOAD_ENGINE="busybox wget" BINARYPROVIDER_COMPRESSION_ENGINE="busybox tar"

# Ironic. He could provide binaries for others but not himself...
addons:
apt:
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name = "BinaryProvider"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.5"
version = "0.6.0"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[compat]
julia = "0.7, 1.0"
julia = "1.3"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Pkg", "Test"]
test = ["Test"]
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
matrix:
- julia_version: 1.0
- julia_version: 1.3
- julia_version: latest

platform:
Expand Down
25 changes: 18 additions & 7 deletions src/BinaryProvider.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
module BinaryProvider

using Libdl, Logging
using Pkg, Pkg.PlatformEngines, Pkg.BinaryPlatforms
import Pkg.PlatformEngines: package, download
import Pkg.BinaryPlatforms: Linux
export platform_key, platform_key_abi, platform_dlext, valid_dl_path,
triplet, select_platform, platforms_match,
Linux, MacOS, Windows, FreeBSD,
parse_7z_list, parse_tar_list, verify,
download_verify, unpack, package, download_verify_unpack,
list_tarball_files, list_tarball_symlinks

# Some compatibility mapping
const choose_download = Pkg.BinaryPlatforms.select_platform
Linux(arch::Symbol, libc::Symbol) = Linux(arch; libc=libc)
function platform_key(machine::AbstractString = Sys.MACHINE)
Base.depwarn("platform_key() is deprecated, use platform_key_abi() from now on", :binaryprovider_platform_key)
platkey = platform_key_abi(machine)
return typeof(platkey)(arch(platkey); libc=libc(platkey), call_abi=call_abi(platkey))
end

# Utilities for controlling verbosity
include("LoggingUtils.jl")
# Include our subprocess running functionality
include("OutputCollector.jl")
# External utilities such as downloading/decompressing tarballs
include("PlatformEngines.jl")
# Platform naming
include("PlatformNames.jl")
# Everything related to file/path management
include("Prefix.jl")
# Abstraction of "needing" a file, that would trigger an install
include("Products.jl")

# Compat shims
include("CompatShims.jl")

function __init__()
global global_prefix

Expand Down
20 changes: 0 additions & 20 deletions src/CompatShims.jl

This file was deleted.

Loading