diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2022-02-10 09:35:46 +1100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-10 14:25:38 +0700 |
commit | 166bf5b0eb1b4189dd7efa3b9f4dfafbe35a83a6 (patch) | |
tree | c12a83801d30390a3bfe2aab69fac2eb97f8c426 /academic | |
parent | c60b44cb9ee71c14ff609e8ff5dbc0e80d6f1db7 (diff) | |
download | slackbuilds-166bf5b0eb1b4189dd7efa3b9f4dfafbe35a83a6.tar.gz |
academic/sage-bin: Updated for version 9.4
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/sage-bin/9.4.patch | 258 | ||||
-rw-r--r-- | academic/sage-bin/9.4_sh | 6 | ||||
-rw-r--r-- | academic/sage-bin/sage-bin.SlackBuild | 17 | ||||
-rw-r--r-- | academic/sage-bin/sage-bin.info | 10 |
4 files changed, 283 insertions, 8 deletions
diff --git a/academic/sage-bin/9.4.patch b/academic/sage-bin/9.4.patch new file mode 100644 index 0000000000..307a558acb --- /dev/null +++ b/academic/sage-bin/9.4.patch @@ -0,0 +1,258 @@ +--- opt/SageMath/local/lib/python3.9/site-packages/sage/combinat/posets/poset_examples.py.bu 2021-08-22 19:12:42.000000000 +1000 ++++ opt/SageMath/local/lib/python3.9/site-packages/sage/combinat/posets/poset_examples.py 2022-01-02 13:10:42.447658457 +1100 +@@ -155,7 +155,7 @@ + + @staticmethod + def BooleanLattice(n, facade=None, use_subsets=False): +- """ ++ r""" + Return the Boolean lattice containing `2^n` elements. + + - ``n`` -- integer; number of elements will be `2^n` +--- opt/SageMath/local/lib/python3.9/site-packages/traitlets/config/loader.py.bu 2021-08-22 22:00:01.000000000 +1000 ++++ opt/SageMath/local/lib/python3.9/site-packages/traitlets/config/loader.py 2022-01-11 11:39:00.600018177 +1100 +@@ -792,7 +792,7 @@ + nargs = '?' + else: + nargs = None +- if len(key) is 1: ++ if len(key) == 1: + paa('-'+key, '--'+key, type=text_type, dest=value, nargs=nargs) + else: + paa('--'+key, type=text_type, dest=value, nargs=nargs) +@@ -801,7 +801,7 @@ + # + self.alias_flags[self.aliases[key]] = value + continue +- if len(key) is 1: ++ if len(key) == 1: + paa('-'+key, '--'+key, action='append_const', dest='_flags', const=value) + else: + paa('--'+key, action='append_const', dest='_flags', const=value) +--- opt/SageMath/local/lib/python3.9/site-packages/psutil/_pslinux.py.bu 2021-08-22 21:58:18.000000000 +1000 ++++ opt/SageMath/local/lib/python3.9/site-packages/psutil/_pslinux.py 2022-01-11 12:14:46.007349527 +1100 +@@ -548,7 +548,7 @@ + # https://github.com/giampaolo/psutil/issues/200 + # try to parse /proc/stat as a last resort + if num == 0: +- search = re.compile('cpu\d') ++ search = re.compile(r'cpu\d') + with open_text('%s/stat' % get_procfs_path()) as f: + for line in f: + line = line.split(' ')[0] +@@ -1465,9 +1465,9 @@ + @wrap_exceptions + def memory_full_info( + self, +- _private_re=re.compile(b"Private.*:\s+(\d+)"), +- _pss_re=re.compile(b"Pss.*:\s+(\d+)"), +- _swap_re=re.compile(b"Swap.*:\s+(\d+)")): ++ _private_re=re.compile(br"Private.*:\s+(\d+)"), ++ _pss_re=re.compile(br"Pss.*:\s+(\d+)"), ++ _swap_re=re.compile(br"Swap.*:\s+(\d+)")): + basic_mem = self.memory_info() + # Note: using 3 regexes is faster than reading the file + # line by line. +@@ -1580,7 +1580,7 @@ + raise + + @wrap_exceptions +- def num_ctx_switches(self, _ctxsw_re=re.compile(b'ctxt_switches:\t(\d+)')): ++ def num_ctx_switches(self, _ctxsw_re=re.compile(br'ctxt_switches:\t(\d+)')): + data = self._read_status_file() + ctxsw = _ctxsw_re.findall(data) + if not ctxsw: +@@ -1593,7 +1593,7 @@ + return _common.pctxsw(int(ctxsw[0]), int(ctxsw[1])) + + @wrap_exceptions +- def num_threads(self, _num_threads_re=re.compile(b'Threads:\t(\d+)')): ++ def num_threads(self, _num_threads_re=re.compile(br'Threads:\t(\d+)')): + # Note: on Python 3 using a re is faster than iterating over file + # line by line. On Python 2 is the exact opposite, and iterating + # over a file on Python 3 is slower than on Python 2. +@@ -1649,7 +1649,7 @@ + return cext.proc_cpu_affinity_get(self.pid) + + def _get_eligible_cpus( +- self, _re=re.compile(b"Cpus_allowed_list:\t(\d+)-(\d+)")): ++ self, _re=re.compile(br"Cpus_allowed_list:\t(\d+)-(\d+)")): + # See: https://github.com/giampaolo/psutil/issues/956 + data = self._read_status_file() + match = _re.findall(data) +@@ -1811,13 +1811,13 @@ + return int(self._parse_stat_file()[2]) + + @wrap_exceptions +- def uids(self, _uids_re=re.compile(b'Uid:\t(\d+)\t(\d+)\t(\d+)')): ++ def uids(self, _uids_re=re.compile(br'Uid:\t(\d+)\t(\d+)\t(\d+)')): + data = self._read_status_file() + real, effective, saved = _uids_re.findall(data)[0] + return _common.puids(int(real), int(effective), int(saved)) + + @wrap_exceptions +- def gids(self, _gids_re=re.compile(b'Gid:\t(\d+)\t(\d+)\t(\d+)')): ++ def gids(self, _gids_re=re.compile(br'Gid:\t(\d+)\t(\d+)\t(\d+)')): + data = self._read_status_file() + real, effective, saved = _gids_re.findall(data)[0] + return _common.pgids(int(real), int(effective), int(saved)) +./opt/SageMath/local/lib/python3.9/site-packages/sage/symbolic/RCS +diff -u -r1.1 expression_conversions.py +--- opt/SageMath/local/lib/python3.9/site-packages/sage/symbolic/expression_conversions.py 2021/08/22 09:12:43 1.1 ++++ opt/SageMath/local/lib/python3.9/site-packages/sage/symbolic/expression_conversions.py 2022/01/28 02:07:09 +@@ -969,7 +969,7 @@ + super(FriCASConverter, self).__init__(sage.interfaces.fricas.fricas) + + def pyobject(self, ex, obj): +- """ ++ r""" + Return a string which, when evaluated by FriCAS, returns the + object as an expression. + +./opt/SageMath/local/lib/python3.9/site-packages/IPython/core/RCS +diff -u -r1.1 oinspect.py +./opt/SageMath/local/lib/python3.9/site-packages/requests/RCS +diff -u -r1.1 api.py +--- opt/SageMath/local/lib/python3.9/site-packages/requests/api.py 2021/08/22 11:52:24 1.1 ++++ opt/SageMath/local/lib/python3.9/site-packages/requests/api.py 2022/01/28 00:49:42 +@@ -57,7 +57,7 @@ + + + def get(url, params=None, **kwargs): +- """Sends a GET request. ++ r"""Sends a GET request. + + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`. +@@ -71,7 +71,7 @@ + + + def options(url, **kwargs): +- """Sends a OPTIONS request. ++ r"""Sends a OPTIONS request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +@@ -84,7 +84,7 @@ + + + def head(url, **kwargs): +- """Sends a HEAD request. ++ r"""Sends a HEAD request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +@@ -97,7 +97,7 @@ + + + def post(url, data=None, json=None, **kwargs): +- """Sends a POST request. ++ r"""Sends a POST request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -111,7 +111,7 @@ + + + def put(url, data=None, **kwargs): +- """Sends a PUT request. ++ r"""Sends a PUT request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -125,7 +125,7 @@ + + + def patch(url, data=None, **kwargs): +- """Sends a PATCH request. ++ r"""Sends a PATCH request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -139,7 +139,7 @@ + + + def delete(url, **kwargs): +- """Sends a DELETE request. ++ r"""Sends a DELETE request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +diff -u -r1.1 models.py +--- opt/SageMath/local/lib/python3.9/site-packages/requests/models.py 2021/08/22 11:52:24 1.1 ++++ opt/SageMath/local/lib/python3.9/site-packages/requests/models.py 2022/01/28 00:45:51 +@@ -840,7 +840,7 @@ + return content + + def json(self, **kwargs): +- """Returns the json-encoded content of a response, if any. ++ r"""Returns the json-encoded content of a response, if any. + + :param \*\*kwargs: Optional arguments that ``json.loads`` takes. + :raises ValueError: If the response body does not contain valid json. +diff -u -r1.1 sessions.py +--- opt/SageMath/local/lib/python3.9/site-packages/requests/sessions.py 2021/08/22 11:52:24 1.1 ++++ opt/SageMath/local/lib/python3.9/site-packages/requests/sessions.py 2022/01/28 01:00:24 +@@ -490,7 +490,7 @@ + return resp + + def get(self, url, **kwargs): +- """Sends a GET request. Returns :class:`Response` object. ++ r"""Sends a GET request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +@@ -501,7 +501,7 @@ + return self.request('GET', url, **kwargs) + + def options(self, url, **kwargs): +- """Sends a OPTIONS request. Returns :class:`Response` object. ++ r"""Sends a OPTIONS request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +@@ -512,7 +512,7 @@ + return self.request('OPTIONS', url, **kwargs) + + def head(self, url, **kwargs): +- """Sends a HEAD request. Returns :class:`Response` object. ++ r"""Sends a HEAD request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. +@@ -523,7 +523,7 @@ + return self.request('HEAD', url, **kwargs) + + def post(self, url, data=None, json=None, **kwargs): +- """Sends a POST request. Returns :class:`Response` object. ++ r"""Sends a POST request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -535,7 +535,7 @@ + return self.request('POST', url, data=data, json=json, **kwargs) + + def put(self, url, data=None, **kwargs): +- """Sends a PUT request. Returns :class:`Response` object. ++ r"""Sends a PUT request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -546,7 +546,7 @@ + return self.request('PUT', url, data=data, **kwargs) + + def patch(self, url, data=None, **kwargs): +- """Sends a PATCH request. Returns :class:`Response` object. ++ r"""Sends a PATCH request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. +@@ -557,7 +557,7 @@ + return self.request('PATCH', url, data=data, **kwargs) + + def delete(self, url, **kwargs): +- """Sends a DELETE request. Returns :class:`Response` object. ++ r"""Sends a DELETE request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. diff --git a/academic/sage-bin/9.4_sh b/academic/sage-bin/9.4_sh new file mode 100644 index 0000000000..7e29552a0d --- /dev/null +++ b/academic/sage-bin/9.4_sh @@ -0,0 +1,6 @@ +cp -a opt/SageMath/local/lib/python3.9/site-packages/sage/combinat/posets/poset_examples.py opt/SageMath/src/sage/combinat/posets +cp -a opt/SageMath/local/lib/python3.9/site-packages/sage/combinat/posets/poset_examples.py opt/SageMath/pkgs/sagemath-standard/build/lib.linux-x86_64-3.9/sage/combinat/posets +tar xf $CWD/debian_binaries-11.2.tar.xz -U -C opt/SageMath/local/lib64/gcc/x86_64-pc-linux-gnu/10.3.0 +tar xf $CWD/debian_libraries-11.2.tar.xz -U -C opt/SageMath/local/lib +mkdir -p usr/lib64 +mv opt/SageMath/local/lib/libbrotlicommon.so* usr/lib64/ diff --git a/academic/sage-bin/sage-bin.SlackBuild b/academic/sage-bin/sage-bin.SlackBuild index a81b408c5e..2ff263c6dd 100644 --- a/academic/sage-bin/sage-bin.SlackBuild +++ b/academic/sage-bin/sage-bin.SlackBuild @@ -25,11 +25,13 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=sage-bin -VERSION=${VERSION:-8.3} -DEBVERSION=${DEBVERSION:-9} +VERSION=${VERSION:-9.4} +DEBVERSION=${DEBVERSION:-11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +SLK_VERSION=${SLK_VERSION:-$(cat /etc/slackware-version|cut -d' ' -f2)} +[ $SLK_VERSION = 14.2 ] && PYTHON=python || PYTHON=python2 if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -63,6 +65,8 @@ mkdir -p $TMP $PKG $OUTPUT cd $PKG mkdir root proc opt tar xvf $CWD/sage-$VERSION-Debian_GNU_Linux_$DEBVERSION-$ARCH.tar.bz2 -C $PKG/opt +[ ! -r $CWD/$VERSION.patch ] || patch -p0 < $CWD/$VERSION.patch +[ ! -r $CWD/${VERSION}_sh ] || . $CWD/${VERSION}_sh chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -71,8 +75,9 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkchroot . -addchroot . python sed util-linux +addchroot . $PYTHON sed util-linux chroot . <<//// +export SAGE_BANNER=bare mount -t proc proc proc opt/SageMath/sage < /dev/null # Run sage patch system umount proc @@ -84,6 +89,7 @@ rm -rf Tools bin dev etc lib64 proc root sbin usr # and other junk rm -rf $PKG/opt/SageMath/.git +mkdir -p $PKG/etc/profile.d install -D -m0755 $CWD/profile.d/sage.sh $PKG/etc/profile.d install -D -m0755 $CWD/profile.d/sage.csh $PKG/etc/profile.d @@ -103,8 +109,9 @@ for res in 16x16 32x32 64x64 128x128 ; do $PKG/usr/share/icons/hicolor/$res/mimetypes done -find $PKG/opt/SageMath/local/share/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/opt/SageMath/local/share/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +# Some man pages and their symlinks are already gzipped +find $PKG/opt/SageMath/local/share/man -type f ! -name '*.gz' -exec gzip -9 {} \; +for i in $( find $PKG/opt/SageMath/local/share/man -type l ! -name '*.gz' ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a opt/SageMath/*.{md,txt} $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/academic/sage-bin/sage-bin.info b/academic/sage-bin/sage-bin.info index eddc8fbee5..90b93d6cf4 100644 --- a/academic/sage-bin/sage-bin.info +++ b/academic/sage-bin/sage-bin.info @@ -1,10 +1,14 @@ PRGNAM="sage-bin" -VERSION="8.3" +VERSION="9.4" HOMEPAGE="http://www.sagemath.org" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="http://mirrors.mit.edu/sage/linux/64bit/sage-8.3-Debian_GNU_Linux_9-x86_64.tar.bz2" -MD5SUM_x86_64="a97ff237de39d74faedc06b9f4e1fbcc" +DOWNLOAD_x86_64="http://mirrors.mit.edu/sage/linux/64bit/sage-9.4-Debian_GNU_Linux_11-x86_64.tar.bz2 \ + https://sourceforge.net/projects/slackbuildsdirectlinks/files/sage-bin/debian_binaries-11.2.tar.xz \ + https://sourceforge.net/projects/slackbuildsdirectlinks/files/sage-bin/debian_libraries-11.2.tar.xz \ +MD5SUM_x86_64="3128ef3530f514932cabcaf62b78030a \ + dc0f1b19c9b73821865599e1cefe66b6 \ + 9380db91d6afbbc4e5a23ba13553d616" REQUIRES="mkchroot" MAINTAINER="Duncan Roe" EMAIL="duncan_roe@optusnet.com.au" |