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

Commit 841b068

Browse files
committed
Use Pkg.BinaryPlatforms and Pkg.PlatformEngines to do the heavy lifting
Now that `Pkg` has inlined the majority of the work that BP was doing, it doesn't make sense to maintain multiple copies of the same code; instead, just have `BP` wrap around `Pkg` for compatibility, and push everyone to migrate to Artifacts.
1 parent 81f03da commit 841b068

File tree

12 files changed

+69
-2209
lines changed

12 files changed

+69
-2209
lines changed

.cirrus.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ task:
44
name: FreeBSD
55
env:
66
matrix:
7-
- JULIA_VERSION: 1.0
8-
- JULIA_VERSION: 1.1
7+
- JULIA_VERSION: 1.3
98
- JULIA_VERSION: nightly
109
install_script:
1110
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"

.travis.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,11 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.7
8-
- 1.0
7+
- 1.3
98
- nightly
109
notifications:
1110
email: false
1211

13-
matrix:
14-
include:
15-
# Make sure to override to "wget" at least once
16-
- julia: 1.0
17-
os: linux
18-
env: BINARYPROVIDER_DOWNLOAD_ENGINE="wget"
19-
20-
# Test with `busybox` tools
21-
# NOTE: This disabled for now, as Ubuntu's busybox doesn't support HTTPS.
22-
# Tested locally to be working on alpine linux, so good enough for now.
23-
#- julia: 1.0
24-
# os: linux
25-
# env: BINARYPROVIDER_DOWNLOAD_ENGINE="busybox wget" BINARYPROVIDER_COMPRESSION_ENGINE="busybox tar"
26-
2712
# Ironic. He could provide binaries for others but not himself...
2813
addons:
2914
apt:

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name = "BinaryProvider"
22
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
3-
version = "0.5.5"
3+
version = "0.6.0"
44

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

1011
[compat]
11-
julia = "0.7, 1.0"
12+
julia = "1.3"
1213

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

1717
[targets]
18-
test = ["Pkg", "Test"]
18+
test = ["Test"]

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
environment:
22
matrix:
3-
- julia_version: 1.0
3+
- julia_version: 1.3
44
- julia_version: latest
55

66
platform:

src/BinaryProvider.jl

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
module BinaryProvider
22

33
using Libdl, Logging
4+
using Pkg, Pkg.PlatformEngines, Pkg.BinaryPlatforms
5+
import Pkg.PlatformEngines: package, download
6+
import Pkg.BinaryPlatforms: Linux
7+
export platform_key, platform_key_abi, platform_dlext, valid_dl_path,
8+
triplet, select_platform, platforms_match,
9+
Linux, MacOS, Windows, FreeBSD,
10+
parse_7z_list, parse_tar_list, verify,
11+
download_verify, unpack, package, download_verify_unpack,
12+
list_tarball_files, list_tarball_symlinks
13+
14+
# Some compatibility mapping
15+
const choose_download = Pkg.BinaryPlatforms.select_platform
16+
Linux(arch::Symbol, libc::Symbol) = Linux(arch; libc=libc)
17+
function platform_key(machine::AbstractString = Sys.MACHINE)
18+
Base.depwarn("platform_key() is deprecated, use platform_key_abi() from now on", :binaryprovider_platform_key)
19+
platkey = platform_key_abi(machine)
20+
return typeof(platkey)(arch(platkey); libc=libc(platkey), call_abi=call_abi(platkey))
21+
end
422

523
# Utilities for controlling verbosity
624
include("LoggingUtils.jl")
725
# Include our subprocess running functionality
826
include("OutputCollector.jl")
9-
# External utilities such as downloading/decompressing tarballs
10-
include("PlatformEngines.jl")
11-
# Platform naming
12-
include("PlatformNames.jl")
1327
# Everything related to file/path management
1428
include("Prefix.jl")
1529
# Abstraction of "needing" a file, that would trigger an install
1630
include("Products.jl")
1731

18-
# Compat shims
19-
include("CompatShims.jl")
20-
2132
function __init__()
2233
global global_prefix
2334

src/CompatShims.jl

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)