Closed strogdon closed 7 years ago
Interesting stuff. What are the useflags for python:2.7
?
This is for prefix and are the same on gentoo:
[I] dev-lang/python
Available versions:
(2.7) [m]2.7.12 2.7.12-r102[1] [m]2.7.13 [m]2.7.13-r100[1]
(3.4) [m]3.4.5(3.4/3.4m) [m]3.4.6(3.4/3.4m)
(3.5) [m]3.5.3(3.5/3.5m)
(3.6) [m]3.6.1-r1(3.6/3.6m)
{-berkdb build doc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"}
Installed versions: 2.7.12-r102(2.7)[1](12:48:20 PM 08/30/2017)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -build -doc -examples -hardened -libressl -tk -wininst ELIBC="-uclibc")
Homepage: https://www.python.org/
Description: An interpreted, interactive, object-oriented programming language
the [1] is "sage-on-gentoo" /var/lib/layman/sage-on-gentoo
Relative to sage -t --long usr/lib64/python2.7/site-packages/sage/graphs/graph_generators.py
it appears that a png
file is created for viewing but that file is empty.
The commands
sage: L = list(graphs(5, lambda G: G.size() <= 4))
....: graphs_list.show_graphs(L)
....:
which fail from the sage prompt do work in the jupyter notebook. Odd.
Very odd indeed. I would say something is loaded properly in jupyter and not in sage. Which is very strange considering the connection between jupyter and ipython.
The failure in FDS.in_lib should have been around for a while. Can you check if there is a file usr/lib64/python2.7/site-packages/sage/doctest/tests/__init.py__
? There shouldn't. I should change some mechanic around that small file.
Yes, you are correct, the failure in FDS.in_lib has been around since at least 7.6.beta2. I missed that. And there is __init.py__, __init__.pyc
and __init__.pyo
under sage/doctest/tests/
.
The third failure under https://github.com/cschwan/sage-on-gentoo/issues/482#issue-254462425 was not present in 8.0.beta11. Unfortunately I haven't tested all 8.1.betaX releases.
I am just wondering if the __init.py__
file is a left over from previous installs or if the removal mechanic is broken on prefix. Can you check the time stamp?
time stamp is new. I just finished rebuilding sage and I have
-rw-r--r-- 1 strogdon math 0 Aug 31 23:49 __init__.py
-rw-r--r-- 1 strogdon math 172 Sep 1 00:37 __init__.pyc
-rw-r--r-- 1 strogdon math 172 Sep 1 00:37 __init__.pyo
I think I know why. Can you try changing line 440 from
rm -f "${ED}"$(python_get_sitedir)/sage/doctest/tests/__init__.*
to
rm -f "${D}"$(python_get_sitedir)/sage/doctest/tests/__init__.*
I think my mistake is that python_get_sitedir
is already prefixed.
Actually, it probably shows up in the log during the install phase. Something like "cannot remove file ...".
Replacing ${ED}
with ${D}
removed __init__.*
. source.py
is now OK:
sage -t usr/lib64/python2.7/site-packages/sage/doctest/sources.py
[366 tests, 1.41 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
but some new stuff testing forker.py
:
sage -t usr/lib64/python2.7/site-packages/sage/doctest/forker.py
**********************************************************************
File "usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1123, in sage.doctest.forker.SageDocTestRunner.report_failure
Failed example:
print(sage0.eval("sdf.init_sage(); DTR.run(DT, clear_globs=False)")) # indirect doctest
Expected:
**********************************************************************
Line 1, in doubling
Failed example:
2*a
Expected:
1
Got:
34
**********************************************************************
Previously executed commands:
...
Got:
**********************************************************************
Line 1, in doubling
Failed example:
2*a
Expected:
1
Got:
34
**********************************************************************
Previously executed commands:
**********************************************************************
File "usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1135, in sage.doctest.forker.SageDocTestRunner.report_failure
Failed example:
sage0.eval("a")
Expected:
'...17'
Got:
''
**********************************************************************
File "usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1137, in sage.doctest.forker.SageDocTestRunner.report_failure
Failed example:
sage0.eval("quit")
Expected:
'Returning to doctests...TestResults(failed=1, attempted=2)'
Got:
'17'
**********************************************************************
1 item had failures:
3 of 29 in sage.doctest.forker.SageDocTestRunner.report_failure
[444 tests, 3 failures, 18.37 s]
----------------------------------------------------------------------
sage -t usr/lib64/python2.7/site-packages/sage/doctest/forker.py # 3 doctests failed
----------------------------------------------------------------------
This is now with ipython-5.4.1
and I suspect that that's the cause.
Moving doctesting of graph_generators.py
to its separate issue.
I usually don't have this many differences. The first two failures are obviously related. Relative to the last failure I do have
future
installed which providestkinter
.