On 05/08/17 23:56, Frédéric Chapoton wrote:
Could you please try with the branch "public/python3-experiment-v0" that I have just put in trac. This is a (very ugly) sequence of ad-hoc fix-up commits, just to see up to where we can go.



That bit is not python2 compatible:
diff --git a/sage/libs/singular/singular.pyx b/sage/libs/singular/singular.pyx
index fa8cd7ad8e..f79cbe724f 100644
--- a/sage/libs/singular/singular.pyx
+++ b/sage/libs/singular/singular.pyx
@@ -774,7 +774,8 @@ cdef init_libsingular():
     if not os.path.exists(lib):
raise ImportError("cannot locate Singular library ({})".format(lib))

-    handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
+    lib = bytes(lib, encoding='utf-8')
+    handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
     if not handle:
         err = dlerror()
         raise ImportError("cannot load Singular library ({})".format(err))

"bytes" is apparently really an alias for "str" in python2.7.
Anyway it breaks when I try to build the doc with python2.7
(I am not trying to build it with python3 until sage starts):
File "sage/libs/singular/singular.pyx", line 804, in init sage.libs.singular.singular
    init_libsingular()
File "sage/libs/singular/singular.pyx", line 777, in sage.libs.singular.singular.init_libsingular (/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/libs/singular/singular.cpp:8508)
    lib = bytes(lib, encoding='utf-8')
TypeError: str() takes at most 1 argument (2 given)

So if we want to keep compatibility this will have to be
guarded by python version.

Francois

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to