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

Commit

Permalink
Merge branch 'u/cheuberg/asy/prototype' of trac.sagemath.org:sage int…
Browse files Browse the repository at this point in the history
…o t/19305/asy/subs

* 'u/cheuberg/asy/prototype' of trac.sagemath.org:sage: (754 commits)
  Trac #19083: expand description of parameter "convert"
  Trac #19083: fix one ReSt error
  Trac #19094/#19083 comment 66, 42: create_summands: add doctests for interesting `data`
  Trac #19094/#19083 comment 66, 42: make  creating of exact summand with growth but without coefficient impossible
  Trac #19094/#19083 comment 66, 41: delete _create_exact_summands_ since not needed
  Trac #19094/#19083 comment 66, 36: delete ALGORITHM block
  Trac #19094/#19083 comment 66, 40: simplify test for empty data
  Trac #19094/#19083 comment 66, 40: test conversion from multivariate polynomial ring
  Trac #19094/#19083 comment 66, 40: refer to trac tickets at O-Term from SR todo
  Trac #19094/#19083 comment 66, 40: complete doctests of AsymptoticRing._element_constructor_
  Trac #19094/#19083 comment 66, 40: remove outdated NOTE block
  Trac #19094/#19083 comment 66, 39: _create_element_in_extension_ rewrite doctests and rename parameter to old_term_parent
  Trac #19094/#19083 comment 66, 39: extend description of old_parent (in AsymptoticRing._create_element_via_parent_)
  Trac #19094/#19083 comment 66, 37: refer to #19424 in not tested doctest
  Trac #19094/#19083 comment 66, 36: add error test
  Trac #19094/#19083 comment 66, 36: rpow: decrease indention of ALGORITHM block
  Trac #19094/#19083 comment 66, 35: improve speed of log
  Trac #19083: added doctest (comment 64.23)
  Trac #19083: Mention "GrowthGroup" in docstring of "GrowthGroupFactory"
  Trac #19094/#19083 comment 66, 35: doctest errors of log
  ...
  • Loading branch information
dkrenn committed Oct 17, 2015
2 parents 348b248 + f9fbccb commit 46af62d
Show file tree
Hide file tree
Showing 537 changed files with 19,115 additions and 5,969 deletions.
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,29 @@ build: all-build

# Defer unknown targets to build/make/Makefile
%::
$(MAKE) configure
$(MAKE) build/make/Makefile
+build/bin/sage-logger \
"cd build/make && ./install '$@'" logs/install.log

# If configure was run before, rerun it with the old arguments.
# Otherwise, run configure with argument $PREREQ_OPTIONS.
build/make/Makefile: configure
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
@if [ -x config.status ]; then \
./config.status --recheck && ./config.status; \
else \
./configure $$PREREQ_OPTIONS; \
fi || ( \
if [ "x$$SAGE_PORT" = x ]; then \
echo "If you would like to try to build Sage anyway (to help porting),"; \
echo "export the variable 'SAGE_PORT' to something non-empty."; \
exit 1; \
else \
echo "Since 'SAGE_PORT' is set, we will try to build anyway."; \
fi; )

# Preemptively download all standard upstream source tarballs.
download:
export SAGE_ROOT=$$(pwd) && \
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sage version 6.9.beta6, released 2015-09-10
Sage version 6.9.rc0, released 2015-09-25
116 changes: 82 additions & 34 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# sage -i <options> <package name>...
#
# Options can be:
# -f: install a package even if the same version is already installed
# -s: do not delete temporary build directory
# -c: after installing, run the test suite for the spkg. This should
# override the settings of SAGE_CHECK and SAGE_CHECK_PACKAGES.
Expand Down Expand Up @@ -68,7 +67,6 @@ name, install it. Otherwise, search Sage's list of packages (see
found, install it.
Options:
-f: force installation even if the package is already installed
-s: do not delete the temporary build directory
-c: after installing, run the test suite for the package
-d: only download the package
Expand Down Expand Up @@ -177,13 +175,10 @@ fi

# Parse options
INFO=0
FORCE=0
while true; do
case "$1" in
--info)
INFO=1;;
-f)
FORCE=1;;
-d)
SAGE_INSTALL_FETCH_ONLY=1;;
-s)
Expand Down Expand Up @@ -213,14 +208,13 @@ done
# path.
# 2a. <package>-x.y.z, i.e. the name of the package plus the package's
# version numbers.
# 2b. DELETED
# 2b. <package>-x.y.z.spkg, i.e. the name of the package in addition to
# the version numbers and the ".spkg" extension.
# 3. <package>, i.e. the name of the package without a version number.
# 4. <URL>/<package>-x.y.z.spkg, i.e. the full URL where the package
# is hosted. Any local packages matching <package> are ignored.
# The package is only downloaded if it has not yet been installed
# (unless -f is given, then it's always downloaded and installed).
#
# In cases 2a and 3 we first look locally inside spkg/* for a
# In cases 2a, 2b and 3 we first look locally inside spkg/* for a
# matching package. Otherwise, we try to download it. In all cases,
# we reduce to case 1a.
#
Expand All @@ -235,7 +229,7 @@ fi
# PKG_NAME is the last path component without .spkg
# This already reduces case 2b to case 2a.
PKG_NAME=`basename "$PKG_SRC" | sed 's/\.spkg$//'`
PKG_BASE=`echo "$PKG_NAME" | sed 's/-[0-9].*//'`
PKG_BASE=`echo "$PKG_NAME" | sed 's/-.*//'`

# USE_LOCAL_SCRIPTS is a flag that if non-empty will cause
# this script to try to install the package using local metadata
Expand Down Expand Up @@ -272,7 +266,6 @@ elif [ -z "$PKG_HAS_PATH" ]; then

# Warning for experimental packages
if [ x`cat "$PKG_SCRIPTS/type"` = x"experimental" ]; then
echo # The following message appears twice in this file
echo "=========================== WARNING ==========================="
echo "You are about to download and install an experimental package."
echo "This probably won't work at all for you! There is no guarantee"
Expand Down Expand Up @@ -304,18 +297,6 @@ if [ $INFO -ne 0 -a "$USE_LOCAL_SCRIPTS" = yes ]; then
exit 0
fi

# Check whether the package is already installed. We do this before
# we download the package. We do a second check later, in case the
# user didn't supply a version number and we don't find a local
# matching package (case 3 above).
if [ $INFO -eq 0 -a $FORCE -eq 0 -a -f "$SAGE_SPKG_INST/$PKG_NAME" ]; then
echo "Package $PKG_NAME is already installed."
echo "Use 'sage -f $PKG_BASE' to force a reinstallation."
# Touch installed file such that "make" considers it up-to-date.
touch "$SAGE_SPKG_INST/$PKG_NAME"
exit 0
fi

# If we haven't found the package yet, we must download it
if [ ! -f "$PKG_SRC" ]; then
if [ -n "$PKG_NAME_UPSTREAM" ]; then
Expand All @@ -335,21 +316,88 @@ if [ ! -f "$PKG_SRC" ]; then
if [ -n "$PKG_HAS_PATH" ]; then
PKG_URL="$PKG_SRC"
else
# Handle cases 2a and 3, where the package name is something
# like "foo" or "foo-1.2.3".
MIRROR=$(sage-download-file --print-fastest-mirror)/spkg
if [ $? -ne 0 ]; then
exit 1
fi
for repo in optional experimental huge; do
# Download the list of packages.
echo ">>> Checking online list of $repo packages."
# File inside DOT_SAGE should be writable
repolist="${DOT_SAGE}/${repo}.list"
sage-download-file --quiet "$MIRROR/$repo/list" $repolist
if [ $? -ne 0 ]; then
rm -f $repolist
exit 1
fi

# The contrived sed commands print out either ${PKG_NAME} if
# it appears as a complete line or some string starting with
# ${PKG_NAME}- whichever occurs first.
# Tested with GNU sed, BSD sed (on OS X) and Solaris sed.
pkg=`sed -n -f <( echo "/^${PKG_NAME}\$/{p;q;}" && echo "/^${PKG_NAME}-/{p;q;}" ) $repolist`
rm -f $repolist
if [ -n "$pkg" ]; then
echo ">>> Found $pkg"
PKG_NAME=$pkg

# If INFO is set, try downloading only the .txt file
if [ $INFO -eq 1 ]; then
PKG_URL="$MIRROR/$repo/$pkg.txt"
sage-download-file --quiet "$PKG_URL" && exit 0
# If the download failed (for whatever reason),
# fall through and use the .spkg file.
else
# Warn and ask the user if downloading an
# experimental package.
# Add a deprecation note for other packages,
# since old-style packages are deprecated.
if [ $repo = experimental ]; then
echo "================================ WARNING ================================="
echo "You are about to download and install an unmaintained experimental"
echo "package. This probably won't work at all for you! There is no guarantee"
echo "that it will build correctly, or behave as expected. Use at your own risk!"
echo
echo "This package will be removed in future versions of SageMath. If you care"
echo "about this package, you should make a proper new-style package instead."
echo "For more information about making Sage packages, see"
echo "http://doc.sagemath.org/html/en/developer/packaging.html"
echo "=========================================================================="
read -p "Are you sure you want to continue [Y/n]? " answer
case "$answer" in
n*|N*) exit 0;;
esac
else
# Deprecated since Sage 6.9, Trac #19158
echo "================================== NOTE =================================="
echo "You are about to download and install an old-style package. While this"
echo "might still work fine, old-style packages are unmaintained and deprecated."
echo
echo "This package will be removed in future versions of SageMath. If you care"
echo "about this package, you should make a proper new-style package instead."
echo "For more information about making Sage packages, see"
echo "http://doc.sagemath.org/html/en/developer/packaging.html"
echo "=========================================================================="
echo
read -t 30 -p "Are you sure (automatically continuing in 30 seconds) [Y/n]? " answer
case "$answer" in
n*|N*) exit 0;;
esac
fi
fi
PKG_URL="$MIRROR/$repo/$pkg.spkg"
break
fi
done

if [ -z "$PKG_URL" ]; then
echo >&2 "Error: could not find a package matching $PKG_NAME"
echo >&2 " Try 'sage --package list' to see the available packages"
echo >&2 " $(sage-package apropos $PKG_NAME)"
echo >&2 " $(sage-package apropos $PKG_NAME)"
exit 1
fi

# Check a second time whether the package is already installed.
if [ $INFO -eq 0 -a $FORCE -eq 0 -a -f "$SAGE_SPKG_INST/$PKG_NAME" ]; then
echo "Package $PKG_NAME is already installed."
echo "Use 'sage -f $PKG_BASE' to force a reinstallation."
# Touch installed file such that "make" considers it up-to-date.
touch "$SAGE_SPKG_INST/$PKG_NAME"
exit 0
fi
fi

# Trac #5852: check write permissions
Expand Down Expand Up @@ -438,7 +486,7 @@ if [ ! -w "$SAGE_BUILD_DIR" ]; then
exit 1
fi
if [ ! -d "$SAGE_LOCAL" ]; then
# If you just unpack Sage and run "sage -f <pkg>" then local does not yet exist
# If you just unpack Sage and run "sage -p <pkg>" then local does not yet exist
mkdir "$SAGE_LOCAL"
fi
if [ ! -w "$SAGE_LOCAL" ]; then
Expand Down
21 changes: 4 additions & 17 deletions build/make/deps
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
###############################################################################

# Do not put an explicit path for sage-spkg here, it will be found in $PATH.
SAGE_SPKG = sage-spkg -f
SAGE_SPKG = sage-spkg
STARTED = $(SAGE_LOCAL)/etc/sage-started.txt

# Tell make not to look for files with these names:
Expand All @@ -26,13 +26,12 @@ all-build: all-toolchain
$(MAKE) all-sage


# Make the 4 preliminary build phases:
# prereq, base, toolchain, toolchain-deps.
# Make the 3 preliminary build phases:
# base, toolchain, toolchain-deps.
# During the toolchain build, we export SAGE_BUILD_TOOLCHAIN=yes
# such that packages can do different things when they are built
# as prerequisite of GCC.
all-toolchain:
$(MAKE) $(INST)/prereq
$(MAKE) base
env SAGE_BUILD_TOOLCHAIN=yes $(MAKE) toolchain
$(MAKE) toolchain-deps
Expand Down Expand Up @@ -86,18 +85,6 @@ $(STARTED): $(STANDARD_PACKAGES)
###############################################################################
base: $(INST)/$(BZIP2) $(INST)/$(PATCH) $(INST)/$(PKGCONF)

$(INST)/prereq: ../../configure
@cd ../..; rm -f config.log; ln -s logs/pkgs/config.log config.log; \
./configure $$PREREQ_OPTIONS || ( \
if [ "x$$SAGE_PORT" = x ]; then \
echo "If you would like to try to build Sage anyway (to help porting),"; \
echo "export the variable 'SAGE_PORT' to something non-empty."; \
exit 1; \
else \
echo "Since 'SAGE_PORT' is set, we will try to build anyway."; \
fi; )
touch $@

###############################################################################
# Building normal packages
###############################################################################
Expand Down Expand Up @@ -192,7 +179,7 @@ $(SAGE_EXTCODE)/%: $(SAGE_SRC)/ext/%
DOC_DEPENDENCIES = sagelib $(INST)/$(SPHINX) $(INST)/$(SAGENB) \
| $(SAGERUNTIME) $(INST)/$(MAXIMA) $(INST)/$(NETWORKX) \
$(INST)/$(SCIPY) $(INST)/$(MATPLOTLIB) $(INST)/$(PILLOW) \
$(INST)/$(MATHJAX)
$(INST)/$(MATHJAX) $(INST)/$(IPYKERNEL) $(INST)/$(JUPYTER_CLIENT)

doc: doc-html

Expand Down
Loading

0 comments on commit 46af62d

Please sign in to comment.