diff options
author | Andre Arko <andre@arko.net> | 2016-02-03 21:57:49 -0800 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-23 15:42:55 -0600 |
commit | 8584d5969a42d9027ef4faecddd90f492bd3e7dc (patch) | |
tree | 9d158f97973e4abe0d9cab1b8457185e8b59e841 | |
parent | c761d649688479e4f5bcb182c495ff360fd3e57e (diff) | |
download | bundler-8584d5969a42d9027ef4faecddd90f492bd3e7dc.tar.gz |
don’t rebuild already-built git gem extensions
closes #4082
-rw-r--r-- | lib/bundler/source/git.rb | 4 | ||||
-rw-r--r-- | lib/bundler/source/path.rb | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 90bbd13d34..51fcd44dfd 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -222,6 +222,10 @@ module Bundler private + def build_extensions(installer) + super if installer.spec.missing_extensions? + end + def serialize_gemspecs_in(destination) expanded_path = destination.expand_path(Bundler.root) Dir["#{expanded_path}/#{@glob}"].each do |spec_path| diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 10f19f4889..c5cf005cdb 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -197,8 +197,7 @@ module Bundler SharedHelpers.chdir(gem_dir) do installer = Path::Installer.new(spec, :env_shebang => false) run_hooks(:pre_install, installer) - installer.build_extensions unless disable_extensions - run_hooks(:post_build, installer) + build_extensions(installer) unless disable_extensions installer.generate_bin run_hooks(:post_install, installer) end @@ -216,6 +215,11 @@ module Bundler Bundler.ui.warn "The validation message from Rubygems was:\n #{e.message}" end + def build_extensions(installer) + installer.build_extensions + run_hooks(:post_build, installer) + end + def run_hooks(type, installer) hooks_meth = "#{type}_hooks" return unless Gem.respond_to?(hooks_meth) |