parsanol 1.3.46 → 1.3.47
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 +4 -4
- data/ext/parsanol_native/extconf.rb +19 -8
- data/lib/parsanol/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84b51a358f1867ed55ebfa7a9c6afbb2d442c23e93e8b44b338fd8479eb38f3c
|
|
4
|
+
data.tar.gz: 7d0e702019b1023b1ff41b36099c44b27eb8613d4e02c8b10ee60ac5501a0748
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d31070597c02776113dfdafe9749d86f2e2edcaf88700576823d10058a7c244114859f304a1c85856c29c520102dfa64d2553508a95259af1f530995e339bd6
|
|
7
|
+
data.tar.gz: d0a35ca10ec03ba72b40b1e7a37043b24065a3246bec795c19f32e3e6e023188b60402c31c775517a1d2a1576b3a392583f21f2ffb371286ee3727d498b096aa
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
# The Rust extension targets the CRuby C API through rb_sys/magnus. On
|
|
4
|
+
# engines whose C-extension story cannot build it (TruffleRuby compiles C
|
|
5
|
+
# extensions through Sulong and cannot load magnus-produced cdylibs; JRuby
|
|
6
|
+
# has no C-extension support), or when the pure-Ruby backend is requested
|
|
7
|
+
# explicitly, emit a no-op Makefile so the ruby-platform gem installs
|
|
8
|
+
# cleanly. Parsanol::Native already falls back to the pure-Ruby parser at
|
|
9
|
+
# runtime (lib/parsanol/native.rb rescues LoadError), so skipping the
|
|
10
|
+
# build here is sufficient — see
|
|
11
|
+
# https://github.com/parsanol/parsanol-ruby/issues/23
|
|
12
|
+
if ENV["PARSANOL_PURE_RUBY"] == "1" || ENV["PARSANOL_NATIVE"] == "0" ||
|
|
13
|
+
RUBY_ENGINE != "ruby"
|
|
14
|
+
# No mkmf yet (and not wanted on engines without a C toolchain): the
|
|
15
|
+
# hand-written no-op Makefile is the whole contract.
|
|
16
|
+
File.write("Makefile", <<~MAKEFILE)
|
|
17
|
+
all:
|
|
18
|
+
install:
|
|
19
|
+
clean:
|
|
20
|
+
MAKEFILE
|
|
11
21
|
warn "parsanol: skipping the Rust extension on #{RUBY_ENGINE} " \
|
|
12
22
|
"(pure-Ruby backend will be used)"
|
|
13
23
|
exit 0
|
|
14
24
|
end
|
|
15
25
|
|
|
26
|
+
require "mkmf"
|
|
16
27
|
require "rb_sys/mkmf"
|
|
17
28
|
|
|
18
29
|
create_rust_makefile("parsanol/parsanol_native") do |r|
|
data/lib/parsanol/version.rb
CHANGED