This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '7.3' into t/20278/ticket/20278
SageMath version 7.3
- Loading branch information
Showing
1,670 changed files
with
54,017 additions
and
18,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SageMath version 7.3.beta2, Release Date: 2016-05-28 | ||
SageMath version 7.3, Release Date: 2016-08-04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,23 @@ | ||
#!/usr/bin/env python | ||
|
||
# USAGE: | ||
# | ||
# sage-uncompress-spkg PKG [FILE] | ||
# | ||
# With a single argument, unpack the file PKG to the current directory. | ||
# | ||
# If FILE is specified, extract FILE from PKG and send it to | ||
# stdout. (This option is present only for backwards compatibility: | ||
# printing the SPKG.txt file from an old-style spkg.) | ||
|
||
import copy | ||
import os | ||
import sys | ||
import tarfile | ||
import zipfile | ||
|
||
|
||
class UmaskExtractTarFile(tarfile.TarFile): | ||
""" | ||
Sage as tarfile.TarFile, but applies the user's current umask to the | ||
permissions of al extracted files and directories. | ||
This mimics the default behavior of the ``tar`` utility. | ||
See http://trac.sagemath.org/ticket/20218#comment:16 for more background. | ||
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(UmaskExtractTarFile, self).__init__(*args, **kwargs) | ||
|
||
# Unfortunately the only way to get the current umask is to set it | ||
# and then restore it | ||
self.umask = os.umask(0777) | ||
os.umask(self.umask) | ||
|
||
def chmod(self, tarinfo, target): | ||
tarinfo = copy.copy(tarinfo) | ||
tarinfo.mode &= ~self.umask | ||
return super(UmaskExtractTarFile, self).chmod(tarinfo, target) | ||
|
||
|
||
if __name__ == '__main__': | ||
filename = sys.argv[1] | ||
if tarfile.is_tarfile(filename): | ||
# tar file, possibly compressed: | ||
archive = UmaskExtractTarFile.open(filename, 'r:*') | ||
if len(sys.argv) == 2: | ||
archive.extractall() | ||
else: | ||
member = sys.argv[2] | ||
if member in archive.getnames(): | ||
SPKG_TXT = archive.extractfile(member) | ||
sys.stdout.write(SPKG_TXT.read()) | ||
exit(1) | ||
archive.close() | ||
exit(0) | ||
if zipfile.is_zipfile(filename): | ||
# zip file: | ||
archive = zipfile.ZipFile(filename, 'r') | ||
if len(sys.argv) == 2: | ||
archive.extractall() | ||
else: | ||
member = sys.argv[2] | ||
if member in archive.namelist(): | ||
sys.stdout.write(archive.read(member)) | ||
else: | ||
exit(1) | ||
archive.close() | ||
exit(0) | ||
else: | ||
print ('Error: Unknown file type: {}'.format(filename)) | ||
exit(1) | ||
# usage: sage-uncompress-spkg [-h] [-d DIR] PKG [FILE] | ||
# | ||
# positional arguments: | ||
# PKG the archive to extract | ||
# FILE (deprecated) print the contents of the given archive member to | ||
# stdout | ||
# | ||
# optional arguments: | ||
# -h, --help show this help message and exit | ||
# -d DIR directory to extract archive contents into | ||
|
||
|
||
try: | ||
import sage_bootstrap | ||
except ImportError: | ||
import os, sys | ||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) | ||
import sage_bootstrap | ||
|
||
from sage_bootstrap.uncompress.cmdline import run | ||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
zlib $(MP_LIBRARY) glpk | ||
|
||
---------- | ||
All lines of this file are ignored except the first. | ||
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.