diff options
author | nagachika <nagachika@ruby-lang.org> | 2022-10-15 16:26:46 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-10-15 16:26:46 +0900 |
commit | 2d26e45135af8b427d9ccc6d47082c21be8b9c74 (patch) | |
tree | 1ab39aa069c26c6d9b589b20bd0c940677bcd711 /tool | |
parent | 4a986a11e2b2d7037f1e95b0317aa012dc0ee5fb (diff) |
merge revision(s) a2c66f52f402cb58372e271226f3341065561e53:
Make dependency-free gemspec files
The default gems have not been installed yet in the build directory,
bundled gems depending on them can not work. As those dependencies
should be usable there even without rubygems, make temporary gemspec
files without the dependencies, and use them in the build directory.
---
ext/extmk.rb | 11 +++++++++++
tool/gem-unpack.rb | 4 ++++
2 files changed, 15 insertions(+)
Diffstat (limited to 'tool')
-rw-r--r-- | tool/gem-unpack.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/gem-unpack.rb b/tool/gem-unpack.rb index 16ee89f62d..0ba23ef4d3 100644 --- a/tool/gem-unpack.rb +++ b/tool/gem-unpack.rb @@ -18,5 +18,9 @@ def Gem.unpack(file, dir = nil, spec_dir = nil) end FileUtils.mkdir_p(spec_dir) File.binwrite(File.join(spec_dir, "#{spec.name}-#{spec.version}.gemspec"), spec.to_ruby) + unless spec.extensions.empty? or spec.dependencies.empty? + spec.dependencies.clear + end + File.binwrite(File.join(spec_dir, ".bundled.#{spec.name}-#{spec.version}.gemspec"), spec.to_ruby) puts "Unpacked #{file}" end |