mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 19:55:54 -04:00
Rebuild for ntl 11.4.0.
Add primecount support, including the -primecount patch. Add still more gap packages, nearly finishing the set shipped by upstream.
This commit is contained in:
parent
aa45a20afa
commit
05ae6fe453
3 changed files with 148 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
diff -up src/module_list.py.orig src/module_list.py
|
diff -up src/module_list.py.orig src/module_list.py
|
||||||
--- src/module_list.py.orig 2019-06-26 14:41:04.000000000 -0600
|
--- src/module_list.py.orig 2019-06-26 14:41:04.000000000 -0600
|
||||||
+++ src/module_list.py 2019-09-11 08:38:22.467995023 -0600
|
+++ src/module_list.py 2019-09-17 16:06:38.678583204 -0600
|
||||||
@@ -357,16 +357,16 @@ ext_modules = [
|
@@ -357,16 +357,16 @@ ext_modules = [
|
||||||
Extension('sage.graphs.matchpoly',
|
Extension('sage.graphs.matchpoly',
|
||||||
sources = ['sage/graphs/matchpoly.pyx']),
|
sources = ['sage/graphs/matchpoly.pyx']),
|
||||||
|
@ -38,6 +38,18 @@ diff -up src/module_list.py.orig src/module_list.py
|
||||||
|
|
||||||
Extension('sage.graphs.spanning_tree',
|
Extension('sage.graphs.spanning_tree',
|
||||||
sources = ['sage/graphs/spanning_tree.pyx']),
|
sources = ['sage/graphs/spanning_tree.pyx']),
|
||||||
|
@@ -440,9 +440,9 @@ ext_modules = [
|
||||||
|
##
|
||||||
|
################################
|
||||||
|
|
||||||
|
- OptionalExtension("sage.interfaces.primecount",
|
||||||
|
+ Extension("sage.interfaces.primecount",
|
||||||
|
["sage/interfaces/primecount.pyx"],
|
||||||
|
- package = "primecount"),
|
||||||
|
+ libraries = ["primecount"]),
|
||||||
|
|
||||||
|
Extension('*', ['sage/interfaces/*.pyx']),
|
||||||
|
|
||||||
@@ -461,21 +461,19 @@ ext_modules = [
|
@@ -461,21 +461,19 @@ ext_modules = [
|
||||||
##
|
##
|
||||||
################################
|
################################
|
||||||
|
|
110
sagemath-primecount.patch
Normal file
110
sagemath-primecount.patch
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
diff -up src/sage/interfaces/primecount.pyx.orig src/sage/interfaces/primecount.pyx
|
||||||
|
--- src/sage/interfaces/primecount.pyx.orig 2019-06-26 14:41:04.000000000 -0600
|
||||||
|
+++ src/sage/interfaces/primecount.pyx 2019-09-17 16:13:46.316032782 -0600
|
||||||
|
@@ -22,7 +22,7 @@ cdef inline int _do_sig(int64_t n):
|
||||||
|
"threshold for sig_on/sig_off"
|
||||||
|
return n >> 26
|
||||||
|
|
||||||
|
-cpdef int64_t prime_pi(int64_t n, method=None) except -1:
|
||||||
|
+cpdef int64_t prime_pi(int64_t n) except -1:
|
||||||
|
r"""
|
||||||
|
Return the number of prime numbers smaller or equal than ``n``.
|
||||||
|
|
||||||
|
@@ -30,76 +30,22 @@ cpdef int64_t prime_pi(int64_t n, method
|
||||||
|
|
||||||
|
- ``n`` - an integer
|
||||||
|
|
||||||
|
- - ``method`` - ``None`` or a string that determines the primecount
|
||||||
|
- function to be called
|
||||||
|
-
|
||||||
|
- - ``"deleglise_rivat"``
|
||||||
|
- - ``"legendre"``
|
||||||
|
- - ``"lehmer"``
|
||||||
|
- - ``"lmo"``
|
||||||
|
- - ``"meissel"``
|
||||||
|
- - ``"primesieve"``
|
||||||
|
-
|
||||||
|
EXAMPLES::
|
||||||
|
|
||||||
|
sage: from sage.interfaces.primecount import prime_pi # optional - primecount
|
||||||
|
|
||||||
|
sage: prime_pi(1000) == 168 # optional - primecount
|
||||||
|
True
|
||||||
|
- sage: prime_pi(1000, "deleglise_rivat") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "legendre") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "lehmer") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "lmo") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "meissel") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "primesieve") == 168 # optional - primecount
|
||||||
|
- True
|
||||||
|
- sage: prime_pi(1000, "youpi") # optional - primecount
|
||||||
|
- Traceback (most recent call last):
|
||||||
|
- ...
|
||||||
|
- ValueError: unknown method 'youpi'
|
||||||
|
"""
|
||||||
|
cdef int64_t ans
|
||||||
|
- if method is None:
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "deleglise_rivat":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_deleglise_rivat(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "legendre":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_legendre(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "lehmer":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_lehmer(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "lmo":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_lmo(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "meissel":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_meissel(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- elif method == "primesieve":
|
||||||
|
- if _do_sig(n): sig_on()
|
||||||
|
- ans = primecount.pi_primesieve(n)
|
||||||
|
- if _do_sig(n): sig_off()
|
||||||
|
- else:
|
||||||
|
- raise ValueError("unknown method {!r}".format(method))
|
||||||
|
-
|
||||||
|
+ if _do_sig(n): sig_on()
|
||||||
|
+ ans = primecount.pi(n)
|
||||||
|
+ if _do_sig(n): sig_off()
|
||||||
|
return ans
|
||||||
|
|
||||||
|
cpdef prime_pi_128(n):
|
||||||
|
r"""
|
||||||
|
- Return the number of prime number smaller than ``n``.
|
||||||
|
+ Return the number of prime numbers smaller than ``n``.
|
||||||
|
|
||||||
|
EXAMPLES::
|
||||||
|
|
||||||
|
diff -up src/sage/libs/primecount.pxd.orig src/sage/libs/primecount.pxd
|
||||||
|
--- src/sage/libs/primecount.pxd.orig 2019-06-26 14:41:05.000000000 -0600
|
||||||
|
+++ src/sage/libs/primecount.pxd 2019-09-17 16:11:06.678851358 -0600
|
||||||
|
@@ -9,13 +9,6 @@ cdef extern from "primecount.hpp" namesp
|
||||||
|
|
||||||
|
cppstring pi(const cppstring& x)
|
||||||
|
|
||||||
|
- int64_t pi_deleglise_rivat(int64_t x)
|
||||||
|
- int64_t pi_legendre(int64_t x)
|
||||||
|
- int64_t pi_lehmer(int64_t x)
|
||||||
|
- int64_t pi_lmo(int64_t x)
|
||||||
|
- int64_t pi_meissel(int64_t x)
|
||||||
|
- int64_t pi_primesieve(int64_t x)
|
||||||
|
-
|
||||||
|
int64_t nth_prime(int64_t n)
|
||||||
|
|
||||||
|
int64_t phi(int64_t x, int64_t a)
|
|
@ -77,7 +77,7 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Spkg equivalents of required rpms; we pretend they are installed as spkgs.
|
# Spkg equivalents of required rpms; we pretend they are installed as spkgs.
|
||||||
%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 cbc-2.10.3 CoCoALib-0.99601 coxeter3-1.1 cryptominisat-5.6.8 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.10.2 gmp-6.1.2 libsirocco-2.0 lrslib-070 mcqd-1.0 qepcad-B.1.72 saclib-2.2.7 surf-1.0.6-gcc6
|
%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 cbc-2.10.3 CoCoALib-0.99601 coxeter3-1.1 cryptominisat-5.6.8 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.10.2 gmp-6.1.2 libsirocco-2.0 lrslib-070 mcqd-1.0 primecount-5.1 qepcad-B.1.72 saclib-2.2.7 surf-1.0.6-gcc6
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
%global SAGE_REQUIRED_PKGS %{SAGE_REQUIRED_PKGS} fes-0.2
|
%global SAGE_REQUIRED_PKGS %{SAGE_REQUIRED_PKGS} fes-0.2
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
Name: sagemath
|
Name: sagemath
|
||||||
Summary: A free open-source mathematics software system
|
Summary: A free open-source mathematics software system
|
||||||
Version: 8.8
|
Version: 8.8
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
|
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
|
||||||
# Additionally, every $files section has a comment with the license name
|
# Additionally, every $files section has a comment with the license name
|
||||||
# before files with that license
|
# before files with that license
|
||||||
|
@ -220,6 +220,9 @@ Patch32: %{name}-sagenb-python3.patch
|
||||||
# https://git.sagemath.org/sage.git/commit/?id=bbd5b28fc8e451bea4f87c2f2b0c27586386262a
|
# https://git.sagemath.org/sage.git/commit/?id=bbd5b28fc8e451bea4f87c2f2b0c27586386262a
|
||||||
Patch33: %{name}-formatargspec.patch
|
Patch33: %{name}-formatargspec.patch
|
||||||
|
|
||||||
|
# Adapt to primecount 5.x
|
||||||
|
Patch34: %{name}-primecount.patch
|
||||||
|
|
||||||
BuildRequires: 4ti2
|
BuildRequires: 4ti2
|
||||||
BuildRequires: arb-devel
|
BuildRequires: arb-devel
|
||||||
BuildRequires: bliss-devel
|
BuildRequires: bliss-devel
|
||||||
|
@ -242,6 +245,7 @@ BuildRequires: gap
|
||||||
BuildRequires: GAPDoc
|
BuildRequires: GAPDoc
|
||||||
BuildRequires: gap-libs
|
BuildRequires: gap-libs
|
||||||
BuildRequires: gap-pkg-atlasrep
|
BuildRequires: gap-pkg-atlasrep
|
||||||
|
BuildRequires: gap-pkg-corelg
|
||||||
BuildRequires: gap-pkg-crime
|
BuildRequires: gap-pkg-crime
|
||||||
BuildRequires: gap-pkg-design
|
BuildRequires: gap-pkg-design
|
||||||
BuildRequires: gap-pkg-forms
|
BuildRequires: gap-pkg-forms
|
||||||
|
@ -250,6 +254,11 @@ BuildRequires: gap-pkg-guava
|
||||||
BuildRequires: gap-pkg-hapcryst
|
BuildRequires: gap-pkg-hapcryst
|
||||||
BuildRequires: gap-pkg-hecke
|
BuildRequires: gap-pkg-hecke
|
||||||
BuildRequires: gap-pkg-jupyterviz
|
BuildRequires: gap-pkg-jupyterviz
|
||||||
|
BuildRequires: gap-pkg-liealgdb
|
||||||
|
BuildRequires: gap-pkg-liepring
|
||||||
|
BuildRequires: gap-pkg-loops
|
||||||
|
BuildRequires: gap-pkg-mapclass
|
||||||
|
BuildRequires: gap-pkg-repsn
|
||||||
BuildRequires: gap-pkg-singular
|
BuildRequires: gap-pkg-singular
|
||||||
BuildRequires: gap-pkg-sonata
|
BuildRequires: gap-pkg-sonata
|
||||||
BuildRequires: gap-pkg-toric
|
BuildRequires: gap-pkg-toric
|
||||||
|
@ -302,6 +311,7 @@ BuildRequires: pari-seadata
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: planarity-devel
|
BuildRequires: planarity-devel
|
||||||
BuildRequires: ppl-devel
|
BuildRequires: ppl-devel
|
||||||
|
BuildRequires: primecount-devel
|
||||||
BuildRequires: pynac-devel
|
BuildRequires: pynac-devel
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-cypari2-devel
|
BuildRequires: python3-cypari2-devel
|
||||||
|
@ -419,6 +429,7 @@ Requires: 4ti2
|
||||||
Requires: cddlib-tools
|
Requires: cddlib-tools
|
||||||
Requires: gap
|
Requires: gap
|
||||||
Requires: gap-pkg-atlasrep
|
Requires: gap-pkg-atlasrep
|
||||||
|
Requires: gap-pkg-corelg
|
||||||
Requires: gap-pkg-crime
|
Requires: gap-pkg-crime
|
||||||
Requires: gap-pkg-design
|
Requires: gap-pkg-design
|
||||||
Requires: gap-pkg-forms
|
Requires: gap-pkg-forms
|
||||||
|
@ -427,6 +438,11 @@ Requires: gap-pkg-guava
|
||||||
Requires: gap-pkg-hapcryst
|
Requires: gap-pkg-hapcryst
|
||||||
Requires: gap-pkg-hecke
|
Requires: gap-pkg-hecke
|
||||||
Requires: gap-pkg-jupyterviz
|
Requires: gap-pkg-jupyterviz
|
||||||
|
Requires: gap-pkg-liealgdb
|
||||||
|
Requires: gap-pkg-liepring
|
||||||
|
Requires: gap-pkg-loops
|
||||||
|
Requires: gap-pkg-mapclass
|
||||||
|
Requires: gap-pkg-repsn
|
||||||
Requires: gap-pkg-sonata
|
Requires: gap-pkg-sonata
|
||||||
Requires: gap-pkg-toric
|
Requires: gap-pkg-toric
|
||||||
Requires: gfan
|
Requires: gfan
|
||||||
|
@ -908,6 +924,7 @@ popd
|
||||||
%patch31
|
%patch31
|
||||||
%patch32
|
%patch32
|
||||||
%patch33
|
%patch33
|
||||||
|
%patch34
|
||||||
|
|
||||||
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
|
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
|
||||||
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
|
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
|
||||||
|
@ -1889,7 +1906,7 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_
|
||||||
%lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA
|
%lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA
|
||||||
%if %{with bundled_widgetsnbextension}
|
%if %{with bundled_widgetsnbextension}
|
||||||
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
|
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
|
||||||
%{_datadir}/jupyter/nbextensions/
|
%{_datadir}/jupyter/nbextensions/*
|
||||||
%{python3_sitelib}/widgetsnbextension*
|
%{python3_sitelib}/widgetsnbextension*
|
||||||
%endif
|
%endif
|
||||||
%{_datadir}/jupyter/kernels/sagemath/
|
%{_datadir}/jupyter/kernels/sagemath/
|
||||||
|
@ -1916,6 +1933,11 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 26 2019 Jerry James <loganjerry@gmail.com> - 8.8-6
|
||||||
|
- Rebuild for ntl 11.4.0
|
||||||
|
- Add primecount support, including the -primecount patch
|
||||||
|
- Add still more gap packages, nearly finishing the set shipped by upstream
|
||||||
|
|
||||||
* Thu Sep 12 2019 Jerry James <loganjerry@gmail.com> - 8.8-5
|
* Thu Sep 12 2019 Jerry James <loganjerry@gmail.com> - 8.8-5
|
||||||
- Improve the -ecm patch
|
- Improve the -ecm patch
|
||||||
- Add -formatargspec patch to silence doc-building warnings
|
- Add -formatargspec patch to silence doc-building warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue