Hello Guix!
Disclaimer: To prevent this from beeing delayed yet another week, I have
decided to sent this as is. Hence this may not be very coherent.
This finally is an updated third version. Allmost all tests[0] in
`sagemath-testsuite' succed without any issues[1] (See the log below for
the remaining failures and the comments in the `sagemath' patch).
However two issues remain: `sage/env.py' and
`sage/interacts/test_jupyter.rst'. Maybe updating `python-pkgconfig' and
`python-ipywidgets' solve these but someone braver than I currently am
would have to try :).
Other remaining problems:
- I'm not sure about the licenses of the`sagemath-data-*' packages.
-- `sagemath-data-combinatorial-designs' Supposedly in the public
domain, see also the notes attached to the patch.
-- `sagemath-data-polytopes-db'
SageMath's `COPYING.txt' claims that this has no license as it is a
database. However the `SPKG.rst' for `polytopes_db' claims GPL.
-- `sagemath-data-graphs'
SageMath's `COPYING.txt' claims that this has no license as it is a
database. `smallgraphs.txt' and`isgci_sage.xml' seem to be taken from
data [2] which has a CC-BY-SA 3.0 icon/button in the footer if you
click on one of the articles.
-- `sagemath-data-conway-polynomials'
SageMath's `COPYING.txt' claims that this has no license as it is a
database.
-- `sagemath-data-elliptic-curves'
The file `allcurves.00000-09999' is taken from [4] which contains an
Artistic License 2.0.
If I interpret it correctly, Debian distributes
`combinatorial-designs' as public domain and the rest of them as
GPLv2 or later (see [4], [5], [6], [7], [8]).
- Not all package descriptions are great. For `gfan' in particular I
know to little algebraic geometry to decide what information from the
website would be relevant.
- Currently SageMath is split into two packages:
`python-sagemath-standard' provides the actual content but is not
tested; `sagemath' runs the testsuite and only provides a symlink to
the `sage' executable. This is similar to how NixOS does it. Upsides
to this approach are that one can compile everything and run the tests
independently from each other (the former takes for me ~18 minutes,
the latter ~24 minutes I think), preventing uneccessary work. Also, as
there are many propagated packages, this makes sure everything is
setup correctly.
- I gave up rebuilding all the dependent packages when `gnuradio' filled
my `/tmp' tmpfs and building `python-graph-tool' consumed all my RAM
- Package the documentation
- Package SageTeX
- The transitive closure of is huge: `guix size python-sagemath-standard'
reports 5002.1 MiB. It also propagates many packages.
- `zn-poly' was presumably added a long time ago as a dependency for
SageMath but is not used anymore and seems pretty dead.
- `pynac' was merged into SageMath[9]
How do we/I proceed?
- We would need a decision on what to do with the `sagemath-data-*'
packages regarding the licenses.
- I would need feedback whether the current split into the
`python-sagemath-standard' and `sagemath' packages would be
acceptable.
- The package additions (but not `sagemath-data-*') could be fine modulo
issues with the descriptions.
- The other patches (i.e. gap, maxima, pari-gp, singular) should be
fine.
A couple of the patches also have some notes attached.
0: SageMath also has tests marked as optional or taking a long time. The
tests run by default should hopefully be enough to catch all packaging
errors.
1: I see coredumps during some of the tests (for `python', `mwrank' from
`eclib', `ecl', `gentourng' from `nauty') but these don't seem to effect
the result ¯\_(?)_/¯. At least the ones for mwrank (in
`src/sage/interfaces/mwrank.py') can also be seen for sage as packaged
by Arch Linux (eclib 20230424) and NixOS (eclib 20221012), for the
others I haven't found the relevant tests.
Lastly, this is the log of the tests that currently fail:
sage -t --random-seed=81087110751557935317942447629980408147 sage/misc/sage_ostools.pyx
**********************************************************************
File "sage/misc/sage_ostools.pyx", line 35, in sage.misc.sage_ostools.have_program
Failed example:
have_program('sh', '/bin')
Expected:
True
Got:
False
**********************************************************************
1 item had failures:
1 of 7 in sage.misc.sage_ostools.have_program
[41 tests, 1 failure, 0.05 s]
sage -t --random-seed=81087110751557935317942447629980408147 sage/interfaces/gap_workspace.py
**********************************************************************
File "sage/interfaces/gap_workspace.py", line 56, in sage.interfaces.gap_workspace.gap_workspace_file
Failed example:
name1 = Popen([sys.executable, '-c', cmd], stdout=PIPE).communicate()[0]
Expected nothing
Got:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all.py", line 62, in <module>
from .all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all__sagemath_repl.py", line 83, in <module>
from .all__sagemath_objects import *
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all__sagemath_objects.py", line 16, in <module>
from sage.misc.all__sagemath_objects import *
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/misc/all__sagemath_objects.py", line 3, in <module>
import sage.structure.all # to break a cyclic import
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/structure/__init__.py", line 2, in <module>
import sage.structure.element
ModuleNotFoundError: No module named 'sage.structure.element'
**********************************************************************
File "sage/interfaces/gap_workspace.py", line 57, in sage.interfaces.gap_workspace.gap_workspace_file
Failed example:
name2 = Popen([sys.executable, '-c', cmd], stdout=PIPE).communicate()[0]
Expected nothing
Got:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all.py", line 62, in <module>
from .all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all__sagemath_repl.py", line 83, in <module>
from .all__sagemath_objects import *
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/all__sagemath_objects.py", line 16, in <module>
from sage.misc.all__sagemath_objects import *
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/misc/all__sagemath_objects.py", line 3, in <module>
import sage.structure.all # to break a cyclic import
File "/tmp/guix-build-sagemath-10.0.drv-0/source/src/sage/structure/__init__.py", line 2, in <module>
import sage.structure.element
ModuleNotFoundError: No module named 'sage.structure.element'
**********************************************************************
1 item had failures:
2 of 12 in sage.interfaces.gap_workspace.gap_workspace_file
[14 tests, 2 failures, 0.68 s]
sage -t --random-seed=81087110751557935317942447629980408147 sage/repl/ipython_kernel/kernel.py
**********************************************************************
File "sage/repl/ipython_kernel/kernel.py", line 47, in sage.repl.ipython_kernel.kernel.SageKernel.__init__
Failed example:
from sage.repl.ipython_kernel.kernel import SageKernel
Expected nothing
Got:
doctest:warning
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/bin/sage-runtests", line 154, in <module>
err = DC.run()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/control.py", line 1385, in run
self.run_doctests()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/control.py", line 1060, in run_doctests
self.dispatcher.dispatch()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2017, in dispatch
self.parallel_dispatch()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 1912, in parallel_dispatch
w.start() # This might take some time
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2186, in start
super().start()
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2158, in run
task(self.options, self.outtmpfile, msgpipe, self.result_queue)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2488, in __call__
doctests, extras = self._run(runner, options, results)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2540, in _run
result = runner.run(test)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 866, in run
return self._run(test, compileflags, out)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.repl.ipython_kernel.kernel.SageKernel.__init__[0]>", line 1, in <module>
from sage.repl.ipython_kernel.kernel import SageKernel
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/repl/ipython_kernel/kernel.py", line 19, in <module>
from ipykernel.ipkernel import IPythonKernel
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/d5883jyf46l3h4h3rc0d7ramgy47pab6-python-ipykernel-6.13.0/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 19, in <module>
from .debugger import Debugger, _is_debugpy_available
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/d5883jyf46l3h4h3rc0d7ramgy47pab6-python-ipykernel-6.13.0/lib/python3.10/site-packages/ipykernel/debugger.py", line 22, in <module>
from debugpy.server import api # noqa
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/78bgdvac53aw2zhn1cq2jmsj78bwx2ln-python-debugpy-1.6.0/lib/python3.10/site-packages/debugpy/server/__init__.py", line 40, in <module>
import pydevd # noqa
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/dnd753b65xbv3smqsnxvpl72lnnzlnll-python-pydevd-2.8.0-0.47e2984/lib/python3.10/site-packages/pydevd.py", line 41, in <module>
from _pydevd_bundle import pydevd_extension_utils, pydevd_frame_utils
File "<frozen importlib._bootstrap>", line 1078, in _handle_fromlist
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/dnd753b65xbv3smqsnxvpl72lnnzlnll-python-pydevd-2.8.0-0.47e2984/lib/python3.10/site-packages/_pydevd_bundle/pydevd_extension_utils.py", line 5, in <module>
import pydevd_plugins.extensions as extensions
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/gnu/store/dnd753b65xbv3smqsnxvpl72lnnzlnll-python-pydevd-2.8.0-0.47e2984/lib/python3.10/site-packages/pydevd_plugins/extensions/__init__.py", line 4, in <module>
__import__('pkg_resources').declare_namespace(__name__)
File "/gnu/store/06cjgrygh79bxbsr0x44ryx1wy1pwvh4-python-setuptools-67.6.1/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2338, in declare_namespace
warnings.warn(msg, DeprecationWarning, stacklevel=2)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions')`.
doctest:warning
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/bin/sage-runtests", line 154, in <module>
err = DC.run()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/control.py", line 1385, in run
self.run_doctests()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/control.py", line 1060, in run_doctests
self.dispatcher.dispatch()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2017, in dispatch
self.parallel_dispatch()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 1912, in parallel_dispatch
w.start() # This might take some time
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2186, in start
super().start()
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2158, in run
task(self.options, self.outtmpfile, msgpipe, self.result_queue)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj-python-sagemath-standard-10.0/lib/python3.10/site-packages/sage/doctest/forker.py", line 2488, in __call__
doctests, extras = self._run(runner, options, results)
File "/gnu/store/vmqp0r0w4ky8w6978kn6sgm8fl91i2lj