Hi Maarten,
IMHO you'd need to update your package to work with modern setuptools
(no distutils).
Just think of sage as of a Python dependency. (It still works, in
fact, but this might not be
for too long).
If one has Sage installed and running in a "usual" venv, then
installing your package breaks it, because it uninstalls sagemath and
"installs" meaningless sagemath 1.3.0.
(sage-src) dima@tarski ~/software/sage-src $ ./sage # all works...
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.8.beta2, Release Date: 2025-09-07 │
│ Using Python 3.13.5. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage:
(sage-src) dima@tarski ~/software/sage-src $ cd tmp
(sage-src) dima@tarski ~/software/sage-src/tmp $ git clone
g...@github.com:koffie/mdsage.git
Cloning into 'mdsage'...
[...]
(sage-src) dima@tarski ~/software/sage-src/tmp $ cd mdsage
(sage-src) dima@tarski ~/software/sage-src/tmp/mdsage $ uv pip install .
Using Python 3.13.5 environment at: /home/dima/software/sage-src/.venv
Resolved 3 packages in 484ms
Built mdsage @ file:///home/dima/software/sage-src/tmp/mdsage
Prepared 1 package in 159ms
Uninstalled 1 package in 37ms
Installed 2 packages in 9ms
+ mdsage==0.1.0 (from file:///home/dima/software/sage-src/tmp/mdsage)
- sagemath==10.8b2 (from file:///home/dima/software/sage-src)
+ sagemath==1.3.0
(sage-src) dima@tarski ~/software/sage-src/tmp/mdsage $ ./sage
bash: ./sage: No such file or directory
(sage-src) dima@tarski ~/software/sage-src/tmp/mdsage $ cd ../../
(sage-src) dima@tarski ~/software/sage-src $ ./sage # oops :-(
Traceback (most recent call last):
File "/home/dima/software/sage-src/src/bin/sage-ipython", line 9, in <module>
from sage.misc.banner import banner
ModuleNotFoundError: No module named 'sage'
However, if I do the same, but with your requirements.txt removed, then
the above sequence just works.
Moreover, tests pass (one fails due to a deprecation notice)
$ ./sage -t tmp/mdsage/mdsage
Running doctests with ID 2025-09-07-21-50-34-567e0d32.
Git branch: HEAD
Git ref: 10.8.beta0-715-g31babe2a65d-dirty
Running with SAGE_LOCAL='/home/dima/software/sage-src/local' and
SAGE_VENV='/home/dima/software/sage-src/local/var/lib/sage/venv-python3.13'
Using --optional=gentoo,pip,sage
Features to be detected:
4ti2,SAGE_SRC,benzene,bliss,buckygen,conway_polynomials,coxeter3,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_ellcurves,database_graphs,database_jones_numfield,database_knotinfo,dot2tex,dvipng,ecm,flatter,fpylll,fricas,gap_package_atlasrep,gap_package_design,gap_package_grape,gap_package_guava,gap_package_hap,gap_package_polenta,gap_package_polycyclic,gap_package_qpa,gap_package_quagroup,gfan,giac,glucose,graphviz,imagemagick,info,ipython,jmol,jupymake,jupyter_sphinx,kenzo,khoca,kissat,latte_int,lrcalc_python,lrslib,mathics,matroid_database,mcqd,meataxe,meson_editable,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pycosat,pycryptosat,pynormaliz,pyparsing,python_igraph,regina,requests,rpy2,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.braiding,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.giac,sage.libs.homfly,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.sat,sage.schemes,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sirocco,sloane_database,sphinx,symengine_py,sympy,tdlib,threejs,topcom
Doctesting 14 files.
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/__init__.py
[0 tests, 0.00s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/canonical_rings.py
[14 tests, 0.40s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/congruence_subgroups.py
[6 tests, 1.14s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/cuspidal_classgroup.py
[17 tests, 1.54s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/kamiennys_criterion.py
**********************************************************************
File "tmp/mdsage/mdsage/kamiennys_criterion.py", line 1079, in
mdsage.kamiennys_criterion.KamiennyCriterion.?
Failed example:
C.verify_criterion(4)
Expected:
(True,
'All conditions are satified for Gamma1 d=4 p=43. Using n=5,
modp=65521, q=3 in Kamienny Version 1.5 and SageMath version ...',
[Vector space of degree 4 and dimension 0 over Finite Field of size 2
Basis matrix:
[], Vector space of degree 23 and dimension 2 over Finite Field of size 2
Basis matrix:
[1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 0]
[0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0], Vector space of
degree 42 and dimension 11 over Finite Field of size 2
Basis matrix:
[1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0
1 1 0 0 1 1 1 1 1 1]
[0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0
1 1 1 1 0 0 0 1 0 0]
[0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 1 1 0 0 1 0]
[0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0
0 1 0 1 0 0 0 1 0 0]
[0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0
0 1 0 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 1
0 0 1 0 0 0 1 1 0 1]
[0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0
0 1 1 0 0 0 1 1 1 1]
[0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 1 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1
0 0 0 0 1 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0
1 0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0
0 1 1 1 0 1 1 0 0 0]])
Got:
doctest:warning
File "<doctest
mdsage.kamiennys_criterion.KamiennyCriterion.?[4]>", line 1, in
<module>
C.verify_criterion(Integer(4))
File "/home/dima/software/sage-src/.venv/lib/python3.13/site-packages/mdsage/kamiennys_criterion.py",
line 1131, in verify_criterion
% (self.congruence_type, d, self.p, n, p, q, Kamienny_Version,
version()),
File "/home/dima/software/sage-src/.venv/lib/python3.13/site-packages/sage/misc/banner.py",
line 37, in version
deprecation(39015, "Use sage.version instead.")
File "/home/dima/software/sage-src/.venv/lib/python3.13/site-packages/sage/misc/superseded.py",
line 99, in deprecation
warning(issue_number, message, DeprecationWarning, stacklevel)
File "/home/dima/software/sage-src/.venv/lib/python3.13/site-packages/sage/misc/superseded.py",
line 180, in warning
warn(message, warning_class, stacklevel)
File "/usr/lib/python3.13/warnings.py", line 110, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
DeprecationWarning: Use sage.version instead.
See
https://github.com/sagemath/sage/issues/39015 for details.
(True,
'All conditions are satified for Gamma1 d=4 p=43. Using n=5,
modp=65521, q=3 in Kamienny Version 1.5 and SageMath version
10.8.beta2, Release Date: 2025-09-07',
[Vector space of degree 4 and dimension 0 over Finite Field of size 2
Basis matrix:
[],
Vector space of degree 23 and dimension 2 over Finite Field of size 2
Basis matrix:
[1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 0]
[0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0],
Vector space of degree 42 and dimension 11 over Finite Field of size 2
Basis matrix:
[1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0
1 1 0 0 1 1 1 1 1 1]
[0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0
1 1 1 1 0 0 0 1 0 0]
[0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 1 1 0 0 1 0]
[0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0
0 1 0 1 0 0 0 1 0 0]
[0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0
0 1 0 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 1
0 0 1 0 0 0 1 1 0 1]
[0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0
0 1 1 0 0 0 1 1 1 1]
[0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 1 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1
0 0 0 0 1 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0
1 0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0
0 1 1 1 0 1 1 0 0 0]])
**********************************************************************
1 item had failures:
1 of 12 in mdsage.kamiennys_criterion.KamiennyCriterion.?
[64 tests, 1 failure, 2.63s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/maartens_sage_functions.py
[28 tests, 0.31s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/modular_degrees_oldforms.py
[28 tests, 1.17s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/modular_unit_divisors.py
[2 tests, 0.01s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/one_cython_file.pyx
[4 tests, 0.01s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/quadratic_class_numbers.py
[17 tests, 0.91s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/ramification.py
[12 tests, 1.85s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/sage_bugs.py
[0 tests, 0.00s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/ultimate_question.py
[7 tests, 0.01s wall]
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/utilities.py
[12 tests, 0.19s wall]
----------------------------------------------------------------------
sage-runtests --warn-long 5.0
--random-seed=177091587185286457373292283220227525984
tmp/mdsage/mdsage/kamiennys_criterion.py # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 10.5 seconds
cpu time: 9.8 seconds
cumulative wall time: 10.2 seconds
Features detected for doctesting:
(sage-src) dima@tarski ~/software/sage-src $
HTH
Dima
> --
> 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+...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/sage-devel/7f8aef4e-4d47-4692-89eb-ad90c93a4febn%40googlegroups.com.