parent
0b253b2075
commit
fd7fcb17c8
@ -1,5 +1 @@
|
||||
/Inline-Python-0.49.tar.gz
|
||||
/Inline-Python-0.50.tar.gz
|
||||
/Inline-Python-0.52.tar.gz
|
||||
/Inline-Python-0.54.tar.gz
|
||||
/Inline-Python-0.56.tar.gz
|
||||
/*.tar.gz
|
||||
|
@ -0,0 +1,62 @@
|
||||
From 9edd5893d574e3b6778723714787fd5f3dd09524 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 18 Oct 2022 19:07:29 +0200
|
||||
Subject: [PATCH] Fix Makefile logic
|
||||
|
||||
- shared_lib_priority() checks that the shared library exist in LIBPL.
|
||||
No need to do the same check again when shared_lib_priority() is true.
|
||||
|
||||
- check_static_library() should check that the static library exists.
|
||||
|
||||
- Add LIBPL, but not LIBDIR, to RPATH.
|
||||
---
|
||||
Makefile.PL | 18 ++++++++++--------
|
||||
1 file changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile.PL b/Makefile.PL
|
||||
index 7d1a1b4..407451c 100644
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -310,12 +310,6 @@ sub special_non_windows_check_shared_static_libs {
|
||||
|
||||
if (shared_lib_priority($ref)) {
|
||||
$ref->{libpython} = $ref->{ldlib};
|
||||
- my $shared_lib = File::Spec->catfile($ref->{libpath}, $ref->{libpython});
|
||||
- if (!-f $shared_lib) {
|
||||
- # Special case for pyenv. The shared library exists in $LIBDIR instead of in
|
||||
- # $LIBPL
|
||||
- $ref->{libpath} = get_config_var($ref, "LIBDIR");
|
||||
- }
|
||||
$ref->{rpath} = $ref->{libpath};
|
||||
}
|
||||
else {
|
||||
@@ -340,9 +334,14 @@ sub special_non_windows_check_shared_static_libs {
|
||||
. "WARNING: This is known to not work on linux.\n";
|
||||
}
|
||||
}
|
||||
- $ref->{libpath} = get_config_var($ref, "LIBDIR");
|
||||
$ref->{libpython} = $ref->{ldlib};
|
||||
- $ref->{rpath} = $ref->{libpath};
|
||||
+ my $shared_lib = File::Spec->catfile($ref->{libpath}, $ref->{libpython});
|
||||
+ if (!-f $shared_lib) {
|
||||
+ $ref->{libpath} = get_config_var($ref, "LIBDIR");
|
||||
+ }
|
||||
+ else {
|
||||
+ $ref->{rpath} = $ref->{libpath};
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,6 +362,9 @@ sub shared_lib_priority {
|
||||
sub check_static_library_ok {
|
||||
my ($ref) = @_;
|
||||
|
||||
+ my $static_lib = File::Spec->catfile($ref->{libpath}, $ref->{libpython});
|
||||
+ return 0 if (!-f $static_lib);
|
||||
+
|
||||
# We should check if the static library was compiled with -fPIC, or else
|
||||
# we cannot create a shared Python.so from it.
|
||||
# TODO: It seem like it is possible to build python with --enable-shared
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 90b68bdf370c07b1d3fdd46bbdf1b154ed74b91b Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Wed, 18 Aug 2021 16:41:10 +0200
|
||||
Subject: [PATCH] Call Py_Initialize() before calling PyBytes_FromString()
|
||||
|
||||
Not doing this gives a segmentation fault with Python 3.10
|
||||
---
|
||||
Python.xs | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Python.xs b/Python.xs
|
||||
index 11d5033..7a3c793 100644
|
||||
--- a/Python.xs
|
||||
+++ b/Python.xs
|
||||
@@ -25,14 +25,6 @@ void do_pyinit() {
|
||||
#ifdef EXPOSE_PERL
|
||||
PyObject *main_dict;
|
||||
PyObject *perl_obj;
|
||||
-
|
||||
-#if PY_MAJOR_VERSION >= 3
|
||||
- PyObject *dummy1 = PyBytes_FromString(""),
|
||||
- *dummy2 = PyBytes_FromString("main");
|
||||
-#else
|
||||
- PyObject *dummy1 = PyString_FromString(""),
|
||||
- *dummy2 = PyString_FromString("main");
|
||||
-#endif
|
||||
#endif
|
||||
/* sometimes Python needs to know about argc and argv to be happy */
|
||||
int _python_argc = 1;
|
||||
@@ -48,6 +40,14 @@ void do_pyinit() {
|
||||
PySys_SetArgv(_python_argc, _python_argv); /* Tk needs this */
|
||||
|
||||
#ifdef EXPOSE_PERL
|
||||
+#if PY_MAJOR_VERSION >= 3
|
||||
+ PyObject *dummy1 = PyBytes_FromString(""),
|
||||
+ *dummy2 = PyBytes_FromString("main");
|
||||
+#else
|
||||
+ PyObject *dummy1 = PyString_FromString(""),
|
||||
+ *dummy2 = PyString_FromString("main");
|
||||
+#endif
|
||||
+
|
||||
/* create the perl module and add functions */
|
||||
initperl();
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (Inline-Python-0.56.tar.gz) = d5fffec8a377ec10c8b21ed9324e2de5a77d10304fc2a89196df89984e55869e3e4e0ef970f1aa4651068b8a6d834fa8eb18d70a052c646ddd98ef338f772e7d
|
||||
SHA512 (Inline-Python-0.57.tar.gz) = 1cf32e8fb746b0b2420eb732178ac6e5e6813501534a159c6865b1a8a6e402eed0a4769d6a85c6639e628e4dea0c2b3d9e99bb291506d343267118b2f148e9b9
|
||||
|
Loading…
Reference in new issue