pycall 0.1.0.alpha.20170311 → 0.1.0.alpha.20170317
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pycall/libpython.rb +11 -5
- data/lib/pycall/pyerror.rb +1 -1
- data/lib/pycall/python/investigator.py +2 -2
- data/lib/pycall/version.rb +1 -1
- data/pycall.gemspec +8 -1
- metadata +2 -3
- data/Guardfile +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82eaa5c280e2f8206627b19e57cc630938807c4d
|
4
|
+
data.tar.gz: 7d78f624374cf5ef65d7a292f96de5ba3fc218f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4b46544cebf53e321c1436d20fd523d3c58a7f1d54fa64dcc92b9eb76657bd808ac1aece7be3be8bfbaa8a418b4d4686b761eb93cfacc499b9960ff97a00ab1
|
7
|
+
data.tar.gz: 8667a9bd1f58598db6de020c4739f14619ce4fa694d71ef50435ccaedc725536c2013b8682c205ff4fe316d51a4027d5b0487c57575457310e30db09aac32733
|
data/lib/pycall/libpython.rb
CHANGED
@@ -41,7 +41,7 @@ module PyCall
|
|
41
41
|
executable = python_config[:executable]
|
42
42
|
libpaths = [ python_config[:LIBDIR] ]
|
43
43
|
if FFI::Platform.windows?
|
44
|
-
libpaths << dirname(executable)
|
44
|
+
libpaths << File.dirname(executable)
|
45
45
|
else
|
46
46
|
libpaths << File.expand_path('../../lib', executable)
|
47
47
|
end
|
@@ -73,10 +73,16 @@ module PyCall
|
|
73
73
|
libsuffix = FFI::Platform::LIBSUFFIX
|
74
74
|
libs.each do |lib|
|
75
75
|
libpaths.each do |libpath|
|
76
|
-
|
76
|
+
next unless libpath
|
77
|
+
# NOTE: File.join doesn't use File::ALT_SEPARATOR
|
78
|
+
libpath_lib = [libpath, lib].join(File::ALT_SEPARATOR || File::SEPARATOR)
|
77
79
|
if File.file?("#{libpath_lib}.#{libsuffix}")
|
78
|
-
|
79
|
-
|
80
|
+
begin
|
81
|
+
libs = ffi_lib("#{libpath_lib}.#{libsuffix}")
|
82
|
+
return libs.first
|
83
|
+
rescue LoadError
|
84
|
+
# skip load error
|
85
|
+
end
|
80
86
|
end
|
81
87
|
end
|
82
88
|
end
|
@@ -88,7 +94,7 @@ module PyCall
|
|
88
94
|
{}.tap do |config|
|
89
95
|
io.each_line do |line|
|
90
96
|
key, value = line.chomp.split(': ', 2)
|
91
|
-
config[key.to_sym] = value
|
97
|
+
config[key.to_sym] = value if value != 'None'
|
92
98
|
end
|
93
99
|
end
|
94
100
|
end
|
data/lib/pycall/pyerror.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from distutils.sysconfig import get_config_var
|
2
2
|
import sys
|
3
3
|
for var in ('executable', 'exec_prefix', 'prefix'):
|
4
|
-
print(var + ': ' + getattr(sys, var))
|
4
|
+
print(var + ': ' + str(getattr(sys, var)))
|
5
5
|
for var in ('VERSION', 'LIBRARY', 'LDLIBRARY', 'LIBDIR', 'PYTHONFRAMEWORKPREFIX'):
|
6
|
-
print(var + ': ' + get_config_var(var))
|
6
|
+
print(var + ': ' + str(get_config_var(var)))
|
data/lib/pycall/version.rb
CHANGED
data/pycall.gemspec
CHANGED
@@ -15,8 +15,15 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
-
f
|
18
|
+
case f
|
19
|
+
when %r{^Guardfile}, # NOTE: Skip symlink for Windows
|
20
|
+
%r{^(test|spec|features)/}
|
21
|
+
true
|
22
|
+
else
|
23
|
+
false
|
24
|
+
end
|
19
25
|
end
|
26
|
+
|
20
27
|
spec.bindir = "exe"
|
21
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
29
|
spec.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pycall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.alpha.
|
4
|
+
version: 0.1.0.alpha.20170317
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Murata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- ".rspec"
|
78
78
|
- ".travis.yml"
|
79
79
|
- Gemfile
|
80
|
-
- Guardfile
|
81
80
|
- LICENSE.txt
|
82
81
|
- README.md
|
83
82
|
- Rakefile
|
data/Guardfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
./config/Guardfile
|