Skip to content

Commit 05cdca1

Browse files
fredrikekreKristofferC
authored andcommitted
Download Pkg from GitHub releases. (#29615)
* Remove Pkg from the JuliaLang/julia repo. * Use git-external to install Pkg during build. (cherry picked from commit 1717adb)
1 parent c3ed038 commit 05cdca1

File tree

106 files changed

+63
-54533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+63
-54533
lines changed

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ all: debug release
99
# sort is used to remove potential duplicates
1010
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir))
1111
ifneq ($(BUILDROOT),$(JULIAHOME))
12-
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps test test/embedding)
12+
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps stdlib test test/embedding)
1313
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS))
1414
DIRS := $(DIRS) $(BUILDDIRS)
1515
$(BUILDDIRMAKE): | $(BUILDDIRS)
@@ -39,9 +39,6 @@ endif
3939
$(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir))))
4040
$(foreach link,base $(JULIAHOME)/test,$(eval $(call symlink_target,$(link),$(build_datarootdir)/julia,$(notdir $(link)))))
4141

42-
build_defaultpkgdir = $(build_datarootdir)/julia/stdlib/$(shell echo $(VERSDIR))
43-
$(eval $(call symlink_target,$(JULIAHOME)/stdlib,$(build_datarootdir)/julia/stdlib,$(shell echo $(VERSDIR))))
44-
4542
julia_flisp.boot.inc.phony: julia-deps
4643
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src julia_flisp.boot.inc.phony
4744

@@ -56,9 +53,12 @@ ifndef JULIA_VAGRANT_BUILD
5653
endif
5754
endif
5855

59-
julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test $(build_defaultpkgdir)
56+
julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test
6057
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/deps
6158

59+
julia-stdlib: | $(DIRS)
60+
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/stdlib
61+
6262
julia-base: julia-deps $(build_sysconfdir)/julia/startup.jl $(build_man1dir)/julia.1 $(build_datarootdir)/julia/julia-config.jl
6363
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/base
6464

@@ -74,10 +74,10 @@ julia-ui-release julia-ui-debug : julia-ui-% : julia-src-%
7474
julia-sysimg : julia-base julia-ui-$(JULIA_BUILD_MODE)
7575
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.ji JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'
7676

77-
julia-sysimg-release : julia-sysimg julia-ui-release
77+
julia-sysimg-release : julia-stdlib julia-sysimg julia-ui-release
7878
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.$(SHLIB_EXT)
7979

80-
julia-sysimg-debug : julia-sysimg julia-ui-debug
80+
julia-sysimg-debug : julia-stdlib julia-sysimg julia-ui-debug
8181
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys-debug.$(SHLIB_EXT)
8282

8383
julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest julia-base-cache
@@ -529,10 +529,11 @@ source-dist:
529529
full-source-dist: light-source-dist.tmp
530530
# Get all the dependencies downloaded
531531
@$(MAKE) -C deps getall NO_GIT=1
532+
@$(MAKE) -C stdlib getall
532533

533534
# Create file full-source-dist.tmp to hold all the filenames that go into the tarball
534535
cp light-source-dist.tmp full-source-dist.tmp
535-
-ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip deps/srccache/*.pem >> full-source-dist.tmp
536+
-ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip deps/srccache/*.pem stdlib/srccache/*.tar.gz >> full-source-dist.tmp
536537

537538
# Prefix everything with the current directory name (usually "julia"), then create tarball
538539
DIRNAME=$$(basename $$(pwd)); \
@@ -545,6 +546,7 @@ clean: | $(CLEAN_TARGETS)
545546
@-$(MAKE) -C $(BUILDROOT)/src clean
546547
@-$(MAKE) -C $(BUILDROOT)/ui clean
547548
@-$(MAKE) -C $(BUILDROOT)/test clean
549+
@-$(MAKE) -C $(BUILDROOT)/stdlib clean-pkg
548550
-rm -f $(BUILDROOT)/julia
549551
-rm -f $(BUILDROOT)/*.tar.gz
550552
-rm -f $(build_depsbindir)/stringreplace \
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a633a375be6e5649865d8feee23bc177
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9a16e4932017d0d159bcf65750eeeda1a637a51b6a1a4ebff957a81bc31fadc6db4be69426d6e99118129db9607e8b4d77df894c5df4fa55f88c45ebbb12d7b1

stdlib/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/srccache
2+
/Pkg

stdlib/Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
default: install
2+
3+
.PHONY: default extract-pkg get-pkg clean-pkg getall install
4+
5+
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
6+
JULIAHOME := $(abspath $(SRCDIR)/..)
7+
SRCCACHE := $(abspath $(SRCDIR)/srccache)
8+
BUILDDIR := $(SRCCACHE)
9+
10+
include $(JULIAHOME)/Make.inc
11+
include $(JULIAHOME)/deps/tools/common.mk
12+
include $(JULIAHOME)/deps/tools/git-external.mk
13+
14+
VERSDIR := v`cut -d. -f1-2 < $(JULIAHOME)/VERSION`
15+
16+
# Download and extract Pkg
17+
PKG := https://github.com/JuliaLang/Pkg.jl
18+
PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1
19+
$(eval $(call git-external,Pkg,PKG,,,$(BUILDDIR)))
20+
21+
extract-pkg: $(BUILDDIR)/$(PKG_SRC_DIR)/source-extracted
22+
Pkg: $(BUILDDIR)/$(PKG_SRC_DIR)/source-extracted
23+
rm -rf $@
24+
cp -r $(BUILDDIR)/$(PKG_SRC_DIR) $@
25+
get-pkg: Pkg
26+
clean-pkg:
27+
-rm -rf Pkg
28+
-rm -rf $(BUILDDIR)/$(PKG_SRC_DIR)
29+
30+
# Generate symlinks to all stdlibs from usr/share/julia/stdlib/vX.Y/
31+
STDLIBS = Base64 CRC32c Dates DelimitedFiles Distributed FileWatching \
32+
Future InteractiveUtils Libdl LibGit2 LinearAlgebra Logging \
33+
Markdown Mmap Printf Profile Random REPL Serialization SHA \
34+
SharedArrays Sockets SparseArrays Statistics SuiteSparse Test Unicode UUIDs
35+
36+
$(foreach pkg, $(STDLIBS), $(eval $(call symlink_target,$(JULIAHOME)/stdlib/$(pkg),$(build_datarootdir)/julia/stdlib/$(shell echo $(VERSDIR)),$(pkg))))
37+
$(eval $(call symlink_target,$(BUILDROOT)/stdlib/Pkg,$(build_datarootdir)/julia/stdlib/$(shell echo $(VERSDIR)),Pkg))
38+
39+
$(build_datarootdir)/julia/stdlib/$(shell echo $(VERSDIR)):
40+
mkdir -p $@
41+
42+
STDLIBS_LINK_TARGETS = $(addprefix $(build_datarootdir)/julia/stdlib/$(shell echo $(VERSDIR))/, $(STDLIBS) Pkg)
43+
44+
install: Pkg $(STDLIBS_LINK_TARGETS)
45+
getall: get-pkg
46+

stdlib/Pkg.version

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PKG_BRANCH = master
2+
PKG_SHA1 = d305e82fd353cb67e8a064800b9972ee1cb7b5e0

stdlib/Pkg/.codecov.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

stdlib/Pkg/.gitignore

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

stdlib/Pkg/.travis.yml

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

stdlib/Pkg/Compat.toml

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

0 commit comments

Comments
 (0)