Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop' into t/20559/interactivelpproblem__dictionarie…
Browse files Browse the repository at this point in the history
…s__add_constraint___add_row_methods
  • Loading branch information
novoselt committed Jul 17, 2016
2 parents 92f4868 + b7cfa42 commit 9847157
Show file tree
Hide file tree
Showing 1,129 changed files with 41,414 additions and 9,862 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> "Creating a Viable Open Source Alternative to
> Magma, Maple, Mathematica, and MATLAB"
> Copyright (C) 2005-2014 The Sage Development Team
> Copyright (C) 2005-2016 The Sage Development Team
http://www.sagemath.org

Expand Down Expand Up @@ -67,7 +67,7 @@ source. More detailed instructions, including how to build faster on
multicore machines, are contained later in this README and in the
Installation Guide:

http://www.sagemath.org/doc/installation
http://doc.sagemath.org/html/en/installation

__1. Make sure you have the dependencies and 5 GB of free disk space.__

Expand Down Expand Up @@ -110,14 +110,19 @@ __3. cd into the Sage directory and type make:__
should work fine on all fully supported platforms. If it does not, we
want to know!

If you'd like to contribute to Sage, be sure to read the
Developer's Guide:

http://doc.sagemath.org/html/en/developer/index.html


Environment Variables
---------------------

There are a lot of environment variables which control the install
process of Sage, see:

http://sagemath.org/doc/installation/source.html#environment-variables
http://doc.sagemath.org/html/en/installation/source.html#environment-variables


Implementation
Expand Down Expand Up @@ -325,7 +330,7 @@ SAGE_ROOT Root directory (sage-x.y.z in Sage tarball)
```
For more details, see:

http://sagemath.org/doc/developer/coding_basics.html#files-and-directory-structure
http://doc.sagemath.org/html/en/developer/coding_basics.html#files-and-directory-structure


Relocation
Expand All @@ -343,7 +348,7 @@ Sage as root at least once prior to using the system-wide Sage as a
normal user. See the Installation Guide for further information on
performing a system-wide installation:

http://www.sagemath.org/doc/installation/source.html#installation-in-a-multiuser-environment
http://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment

If you find anything that doesn't work correctly after you moved the
directory, please email the sage-support mailing list.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 7.3.beta4, Release Date: 2016-06-12
SageMath version 7.3.beta8, Release Date: 2016-07-14
4 changes: 2 additions & 2 deletions build/bin/sage-download-file
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ except ImportError:
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import sage_bootstrap

from sage_bootstrap.cmdline import SageDownloadFileApplication
SageDownloadFileApplication().run()
from sage_bootstrap.download.cmdline import run_safe
run_safe()
4 changes: 2 additions & 2 deletions build/bin/sage-package
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ except ImportError:
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import sage_bootstrap

from sage_bootstrap.cmdline import SagePkgApplication
SagePkgApplication().run()
from sage_bootstrap.cmdline import run
run()
28 changes: 16 additions & 12 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -520,32 +520,36 @@ fi
##################################################################

if [ "$USE_LOCAL_SCRIPTS" = yes ]; then
# New-style package
echo "Setting up build directory for $PKG_NAME"
cp -Rp "$PKG_SCRIPTS" "$PKG_NAME"
cd "$PKG_NAME" || exit $?

sage-uncompress-spkg -d src "$PKG_SRC"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to extract $PKG_SRC"
exit 1
fi
else
# Old-style package (deprecated)
echo "Extracting package $PKG_SRC"
ls -l "$PKG_SRC"
fi

sage-uncompress-spkg -d src "$PKG_SRC"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to extract $PKG_SRC"
exit 1
fi

if [ "$USE_LOCAL_SCRIPTS" = yes ]; then
echo "Finished set up"
else
echo "Finished extraction"
sage-uncompress-spkg "$PKG_SRC"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to extract $PKG_SRC"
exit 1
fi

cd "$PKG_NAME"
if [ $? -ne 0 ]; then
echo >&2 "Error: after extracting, the directory $PKG_NAME does not exist"
echo >&2 "Error: after extracting, the directory '$PKG_NAME' does not exist"
exit 1
fi
fi

echo "Finished extraction"

##################################################################
# The package has been extracted, prepare for installation
##################################################################
Expand Down
46 changes: 32 additions & 14 deletions build/bin/sage-uncompress-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ from __future__ import print_function
import argparse
import copy
import os
import stat
import sys
import tarfile
import zipfile
Expand Down Expand Up @@ -84,9 +85,14 @@ class SageTarFile(tarfile.TarFile):
See http://trac.sagemath.org/ticket/20218#comment:16 for more background.
"""

def __init__(self, *args, **kwargs):
super(SageTarFile, self).__init__(*args, **kwargs)
def __new__(cls, *args, **kwargs):
# This is is that SageTarFile() is equivalent to TarFile.open() which
# is more flexible than the basic TarFile.__init__
inst = tarfile.TarFile.open(*args, **kwargs)
inst.__class__ = cls
return inst

def __init__(self, *args, **kwargs):
# Unfortunately the only way to get the current umask is to set it
# and then restore it
self.umask = os.umask(0o777)
Expand Down Expand Up @@ -115,19 +121,19 @@ class SageTarFile(tarfile.TarFile):
def chmod(self, tarinfo, target):
tarinfo = copy.copy(tarinfo)
tarinfo.mode &= ~self.umask
tarinfo.mode &= ~(stat.S_ISUID | stat.S_ISGID)
return super(SageTarFile, self).chmod(tarinfo, target)

def extractall(self, path='.', members=None):
"""
Same as tarfile.TarFile.extractall but allows filenames for
the members argument (like zipfile.ZipFile).
"""

if members:
name_to_member = dict([member.name, member] for member in self.getmembers())
members = [m if isinstance(m, tarfile.TarInfo)
else self.getmember(m)
for m in members]

else name_to_member[m]
for m in members]
return super(SageTarFile, self).extractall(path=path, members=members)

def extractbytes(self, member):
Expand Down Expand Up @@ -184,7 +190,7 @@ ARCHIVE_TYPES = [SageTarFile, SageZipFile]

def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('-d', dest='dir', nargs=1, metavar='DIR',
parser.add_argument('-d', dest='dir', metavar='DIR',
help='directory to extract archive contents into')
parser.add_argument('pkg', nargs=1, metavar='PKG',
help='the archive to extract')
Expand All @@ -195,7 +201,7 @@ def main(argv=None):
args = parser.parse_args(argv)

filename = args.pkg[0]
dirname = args.dir[0]
dirname = args.dir

for cls in ARCHIVE_TYPES:
if cls.can_read(filename):
Expand All @@ -207,7 +213,7 @@ def main(argv=None):

# For now ZipFile and TarFile both have default open modes that are
# acceptable
archive = cls.open(filename)
archive = cls(filename)

if args.file:
contents = archive.extractbytes(args.file)
Expand All @@ -233,11 +239,23 @@ def main(argv=None):

if len(top_levels) == 1:
top_level = top_levels.pop()

archive.extractall(members=archive.names)

if top_level:
os.rename(top_level, dirname)
else:
os.makedirs(dirname)

prev_cwd = os.getcwd()

if dirname and not top_level:
# We want to extract content into dirname, but there is not
# a single top-level directory for the tarball, so we cd into
# the extraction target first
os.chdir(dirname)

try:
archive.extractall(members=archive.names)
if dirname and top_level:
os.rename(top_level, dirname)
finally:
os.chdir(prev_cwd)

return 0

Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/atlas/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ if 'SAGE_ATLAS_LIB' in os.environ:

paths = [ ATLAS_LIB, os.path.join(ATLAS_LIB, 'lib64'), os.path.join(ATLAS_LIB, 'lib') ]
ATLAS_LIB = None
libraries = []
for libs in libraries_sets:
for path in paths:
if is_atlas_lib_path(path, libs):
Expand Down Expand Up @@ -209,7 +210,7 @@ if 'SAGE_ATLAS_LIB' in os.environ:
for lib in libraries + libraries_optional:
symlinkOSlibrary(prefix+lib)

if 'atlas' in libs:
if 'atlas' in libraries:
write_pc_file(['cblas', 'atlas'], 'cblas')
write_pc_file(['f77blas', 'atlas'], 'blas')
# The inclusion of cblas is not a mistake. ATLAS' lapack include
Expand Down
6 changes: 6 additions & 0 deletions build/pkgs/boost/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ if [[ $? -ne 0 ]]; then
fi

echo "Building boost"
# By default this is populated by a system value.
# If the boost build system (b2, bjam and associated files under /usr/share/boost-build)
# has been installed system wide it can cause interference.
# The build will fail purely and simply without much of an explanation.
# see http://trac.sagemath.org/ticket/20776 for details.
export BOOST_BUILD_PATH="${SAGE_LOCAL}"/share/boost-build
./b2
if [[ $? -ne 0 ]]; then
echo >&2 "Failed to build boost."
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/brial/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=brial-VERSION.tar.bz2
sha1=8b30a7b331323eae094752dd7f88b398e6ed742a
md5=66275eea0654cb1eb6438a6262140885
cksum=2952216147
sha1=12ef021fc1236e25ff0b46680720918489fb4931
md5=f332eaa0378e9b630f958e4dcd4ea6e8
cksum=2509320148
2 changes: 1 addition & 1 deletion build/pkgs/brial/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.4.3
0.8.5
10 changes: 0 additions & 10 deletions build/pkgs/brial/patches/build/cygwin-gnucpp.patch

This file was deleted.

31 changes: 0 additions & 31 deletions build/pkgs/brial/patches/build/no-undefined.patch

This file was deleted.

51 changes: 0 additions & 51 deletions build/pkgs/brial/patches/cygwin-gnucpp.patch

This file was deleted.

Loading

0 comments on commit 9847157

Please sign in to comment.