cibuildgem 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dd30d3f6b257233e2f5991d749b6ee560195f4253ff302a0b19e3d98795ec81
4
- data.tar.gz: 93fcdc28047152ad315054d8850c19e4c790141bc587d6c0a49393b00151bb21
3
+ metadata.gz: 0152c669046c4b9442c984d262770838d30f8b8b32018f2786d4c9e45d9c1635
4
+ data.tar.gz: 40bc8495a735b757edc13cef1cd8488a9bbd5bb3864445e2c76f04e22c0d426d
5
5
  SHA512:
6
- metadata.gz: a2fc5685369969a0995862e67f39a754672be937e672afe336f4121d2b84b9a5d5946ea8a6b889ea2bf6cbf0ff561c9473904e48ffc62bf3e181bfba87f4350a
7
- data.tar.gz: 803c88ef7666c4789807cccec95b30cfe69e4543a86c9e92793d0fa2b66d8ceb3ec9fcf21af47d99c2a071fa146a06221cc45709b00612fa98d358cf36f6f526
6
+ metadata.gz: 8ab300429f6ada154fd8254f4ea3c215c4f3531e32335b74f2f89fc54641bab4f5b7051b7501ba8e53d84f95920bdc2db48d7f8f685a0f529c7aa8678bbe8551
7
+ data.tar.gz: 5317dae383a829e06d32a09063638651b61ea0f422adc3faab8aa36aa2a6182564c69068adb9478f4b75b37407b3106f62ab08ee4c92f6fce7a67f4c8cf803b7
@@ -137,8 +137,13 @@ module Cibuildgem
137
137
  rake_path = rake_specs.full_require_paths
138
138
  prism_path = Gem.loaded_specs["prism"].full_require_paths
139
139
  load_paths = (rake_compiler_path + rake_path + prism_path).join(File::PATH_SEPARATOR)
140
+ patch = File.expand_path("../extension_patch.rb", __FILE__)
140
141
 
141
- system({ "RUBYLIB" => load_paths }, "bundle exec #{RbConfig.ruby} #{rake_executable} #{all_tasks} -R#{rakelibdir}", exception: true)
142
+ system(
143
+ { "RUBYLIB" => load_paths },
144
+ "bundle exec #{RbConfig.ruby} #{rake_executable} #{all_tasks} -R#{rakelibdir} -r #{patch}",
145
+ exception: true,
146
+ )
142
147
  end
143
148
 
144
149
  def compilation_task
@@ -17,6 +17,8 @@ module Cibuildgem
17
17
  end
18
18
 
19
19
  def setup
20
+ Rake::ExtensionTask.enable!
21
+
20
22
  gemspec.extensions.each do |path|
21
23
  binary_name = parse_extconf(path)
22
24
  define_task(path, binary_name)
@@ -60,6 +62,7 @@ module Cibuildgem
60
62
  ext.gem_spec = gemspec
61
63
  ext.cross_platform = normalized_platform
62
64
  ext.cross_compile = true
65
+ ext.no_native = true
63
66
  end
64
67
 
65
68
  disable_shared unless Gem.win_platform?
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rake/extensiontask"
4
+
5
+ module Cibuildgem
6
+ module ExtensionPatch
7
+ class << self
8
+ def prepended(mod)
9
+ class << mod
10
+ attr_accessor :enabled
11
+
12
+ def enable!
13
+ @enabled = true
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ def define
20
+ super if self.class.enabled
21
+ end
22
+ end
23
+ end
24
+
25
+ Rake::ExtensionTask.prepend(Cibuildgem::ExtensionPatch)
@@ -5,11 +5,10 @@ require_relative "../compilation_tasks"
5
5
  task = Cibuildgem::CompilationTasks.new(!Rake::Task.task_defined?(:gem))
6
6
 
7
7
  task "cibuildgem:setup" do
8
- Rake.application.instance_variable_get(:@tasks).delete_if do |name, _|
9
- name == "native:#{task.gemspec.name}:#{task.normalized_platform}"
10
- end
11
-
12
8
  task.setup
9
+
10
+ task(:native) do
11
+ end
13
12
  end
14
13
 
15
14
  task "copy:stage:lib" do
@@ -82,6 +82,7 @@ jobs:
82
82
  with:
83
83
  step: "install"
84
84
  release:
85
+ environment: release
85
86
  permissions:
86
87
  id-token: write
87
88
  contents: read
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cibuildgem
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cibuildgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
@@ -73,6 +73,7 @@ files:
73
73
  - lib/cibuildgem/compilation_tasks.rb
74
74
  - lib/cibuildgem/create_makefile_finder.rb
75
75
  - lib/cibuildgem/errors.rb
76
+ - lib/cibuildgem/extension_patch.rb
76
77
  - lib/cibuildgem/ruby_series.rb
77
78
  - lib/cibuildgem/tasks/wrapper.rake
78
79
  - lib/cibuildgem/templates/github/workflows/cibuildgem.yaml.tt