Skip to content

Commit 99b16f5

Browse files
committed
We won't build H3 any more.
1 parent 991df2c commit 99b16f5

File tree

7 files changed

+2
-37
lines changed

7 files changed

+2
-37
lines changed

Rakefile

-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11
require "rspec/core/rake_task"
22
RSpec::Core::RakeTask.new(:spec)
33

4-
desc "Build H3 C library"
5-
task :build do
6-
unless Dir.exist?("ext/h3/src/build")
7-
`git submodule update --init --recursive`
8-
print "Building h3..."
9-
`cd ext/h3; make > /dev/null 2>&1`
10-
puts " done."
11-
end
12-
end
13-
14-
desc "Remove compiled H3 library"
15-
task :clean do
16-
FileUtils.remove_dir("ext/h3/src/build") if Dir.exist?("ext/h3/src/build")
17-
end
18-
19-
task spec: :build
20-
21-
desc "Recompile the H3 C library"
22-
task rebuild: %i[clean build]
23-
244
task default: :spec

ext/h3/Makefile

-6
This file was deleted.

ext/h3/extconf.rb

-2
This file was deleted.

ext/h3/src

Submodule src deleted from 5035cd1

h3.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ Gem::Specification.new do |spec|
2323
spec.add_development_dependency "yard", "~> 0.9"
2424
spec.add_development_dependency "pry", "~> 0.14"
2525

26-
spec.extensions << "ext/h3/extconf.rb"
2726
end

lib/h3/bindings/base.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ module Bindings
55
# When extended, this module sets up FFI to use the H3 C library.
66
module Base
77
def self.extended(base)
8-
lib_path = File.expand_path(__dir__ + "/../../../ext/h3/src/build/lib")
98
base.extend FFI::Library
109
base.extend Gem::Deprecate
1110
base.include Structs
1211
base.include Types
13-
base.ffi_lib ["#{lib_path}/libh3.dylib", "#{lib_path}/libh3.so"]
12+
base.ffi_lib ["libh3.dylib", "libh3.so"]
1413
base.typedef :ulong_long, :h3_index
1514
base.typedef :int, :k_distance
1615
base.typedef :uint, :h3_error_code

spec/spec_helper.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
# require "coveralls"
44
# Coveralls.wear!
55

6-
begin
7-
require "h3"
8-
rescue LoadError
9-
raise "Could not load h3. Run `rake rebuild` to recompile."
10-
end
6+
require "h3"
117

128
# This file was generated by the `rspec --init` command. Conventionally, all
139
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.

0 commit comments

Comments
 (0)