Created
February 2, 2015 09:52
-
-
Save andydude/437bbc4a3752d0889b70 to your computer and use it in GitHub Desktop.
Inline::Python on MacOSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile.in b/Makefile.in | |
index 8172d27..dd0fc06 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in | |
@@ -1,8 +1,9 @@ | |
+EXTOPTS="-arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector" | |
.PHONY: clean test | |
all: %DESTDIR%/Inline/pyhelper%SO% | |
clean: | |
rm %DESTDIR%/Inline/pyhelper%SO% | |
%DESTDIR%/Inline/pyhelper%SO%: pyhelper.c | |
- %CC% pyhelper.c -Wall -I"%INCLUDEPY%" -L"%LIBPLPY%" -l%LIBRARYPY% `perl -MExtUtils::Embed -e ccopts -e ldopts` - | |
+ %CC% pyhelper.c -Wall -I"%INCLUDEPY%" -L"%LIBPLPY%" -l%LIBRARYPY% $(EXTOPTS) -shared -o %DESTDIR%/Inline/pyhelpe | |
test: all | |
prove -e 'perl6 -Ilib' t | |
diff --git a/lib/Inline/Python.pm6 b/lib/Inline/Python.pm6 | |
index c64f0e2..fec204f 100644 | |
--- a/lib/Inline/Python.pm6 | |
+++ b/lib/Inline/Python.pm6 | |
@@ -8,7 +8,7 @@ has &!call_method; | |
use NativeCall; | |
sub native(Sub $sub) { | |
- my $so = 'pyhelper.so'; | |
+ my $so = 'pyhelper.dylib'; | |
state Str $path; | |
unless $path { | |
for @*INC { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ prove -e 'perl6 -Ilib' t | |
t/call.t ................ ok | |
t/call_back.t ........... ok | |
t/callables.t ........... ok | |
t/eval.t ................ ok | |
t/eval_return_values.t .. ok | |
t/exceptions.t .......... 1/? WARNING:root:foo | |
t/exceptions.t .......... ok | |
t/inherit.t ............. 1/8 Too few positionals passed; expected 2 arguments but got 1 | |
in method invoke at /Users/ajr/Workspaces/Perl6/Inline-Python/lib/Inline/Python.pm6:488 | |
in block <unit> at t/inherit.t:63 | |
# Looks like you planned 8 tests, but ran 4 | |
t/inherit.t ............. Dubious, test returned 255 (wstat 65280, 0xff00) | |
Failed 4/8 subtests | |
t/invoke.t .............. ok | |
t/p6_to_py.t ............ ok | |
t/precomp.t ............. ok | |
t/py_to_p6.t ............ ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment