Skip to content

Commit 5289298

Browse files
author
Release Manager
committed
gh-39533: build/pkgs: update eclib to version 20250122 Update the version of eclib in sage-the-distro to 20250122 on top of #38962 **Dependencies**: * #38962 URL: #39533 Reported by: Michael Orlitzky Reviewer(s): John Cremona
2 parents 7420a27 + 5d94a65 commit 5289298

File tree

6 files changed

+13
-19
lines changed

6 files changed

+13
-19
lines changed

build/pkgs/eclib/SPKG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ Upstream Contact
3030
- Author: John Cremona
3131
3232
- Website:
33-
http://homepages.warwick.ac.uk/staff/J.E.Cremona/mwrank/index.html
33+
https://johncremona.github.io/mwrank/index.html
3434
- Repository: https://github.com/JohnCremona/eclib

build/pkgs/eclib/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=eclib-VERSION.tar.bz2
2-
sha1=3028ac95e1b76699f5f9e871ac706cda363ab842
3-
sha256=32d116a3e359b0de4f6486c2bb6188bb8b553c8b833f618cc2596484e8b6145a
4-
upstream_url=https://github.com/JohnCremona/eclib/releases/download/vVERSION/eclib-VERSION.tar.bz2
2+
sha1=ec8dd87df46ac5a54b548354681085d1da6e7e13
3+
sha256=9f8c2b32e24a4f20d7cc2d336ea30c8ea03b5b0953c2d32adda0c496e7616899
4+
upstream_url=https://github.com/JohnCremona/eclib/releases/download/VERSION/eclib-VERSION.tar.bz2

build/pkgs/eclib/package-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20231212
1+
20250122

build/pkgs/eclib/spkg-configure.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SAGE_SPKG_CONFIGURE([eclib], [
22
SAGE_SPKG_DEPCHECK([ntl pari flint], [
33
dnl use existing eclib only if the version reported by pkg-config is recent enough
4-
m4_pushdef([SAGE_ECLIB_VER],["20231212"])
4+
m4_pushdef([SAGE_ECLIB_VER],["20241112"])
55
PKG_CHECK_MODULES([ECLIB], [eclib >= SAGE_ECLIB_VER], [
66
AC_CACHE_CHECK([for mwrank version == SAGE_ECLIB_VER], [ac_cv_path_MWRANK], [
77
AC_PATH_PROGS_FEATURE_CHECK([MWRANK], [mwrank], [

src/sage/libs/eclib/__init__.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ cdef extern from "eclib/matrix.h":
5555
cdef cppclass mat:
5656
mat()
5757
mat(mat m)
58-
scalar* get_entries()
5958
scalar sub(long, long)
6059
long nrows()
6160
long ncols()
@@ -67,7 +66,6 @@ cdef extern from "eclib/smatrix.h":
6766
cdef cppclass smat:
6867
smat()
6968
smat(smat m)
70-
scalar* get_entries()
7169
scalar sub(long, long)
7270
long nrows()
7371
long ncols()

src/sage/libs/eclib/mat.pyx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
1111
from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
1212
from sage.rings.integer cimport Integer
1313

14-
1514
cdef class Matrix:
1615
"""
1716
A Cremona Matrix.
@@ -212,30 +211,27 @@ cdef class Matrix:
212211
<class 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
213212
"""
214213
cdef long n = self.nrows()
215-
cdef long i, j, k
216-
cdef scalar* v = <scalar*> self.M.get_entries() # coercion needed to deal with const
214+
cdef long i, j
217215

218216
cdef Matrix_integer_dense Td
219217
cdef Matrix_integer_sparse Ts
220218

221219
# Ugly code...
222220
if sparse:
223221
Ts = MatrixSpace(ZZ, n, sparse=sparse).zero_matrix().__copy__()
224-
k = 0
225222
for i from 0 <= i < n:
226223
for j from 0 <= j < n:
227-
if v[k]:
228-
Ts.set_unsafe(i, j, Integer(v[k]))
229-
k += 1
224+
Mij = Integer(self.M.sub(i+1,j+1))
225+
if Mij:
226+
Ts.set_unsafe(i, j, Mij)
230227
return Ts
231228
else:
232229
Td = MatrixSpace(ZZ, n, sparse=sparse).zero_matrix().__copy__()
233-
k = 0
234230
for i from 0 <= i < n:
235231
for j from 0 <= j < n:
236-
if v[k]:
237-
Td.set_unsafe(i, j, Integer(v[k]))
238-
k += 1
232+
Mij = Integer(self.M.sub(i+1,j+1))
233+
if Mij:
234+
Td.set_unsafe(i, j, Mij)
239235
return Td
240236

241237

0 commit comments

Comments
 (0)