This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into t/21071/substitution_in_denominator_is_sk…
…ipped
- Loading branch information
Showing
2,160 changed files
with
85,624 additions
and
35,285 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
;;; Directory Local Variables | ||
;;; For more information see (info "(emacs) Directory Variables") | ||
|
||
((nil | ||
;; Use space instead of tabs for indentation | ||
(indent-tabs-mode . nil)) | ||
(makefile-mode | ||
;; But use tabs in Makefiles | ||
(indent-tabs-mode . t))) |
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.4.beta0, Release Date: 2016-08-10 | ||
SageMath version 7.5.rc0, Release Date: 2016-12-18 |
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,15 @@ | ||
This directory contains the build system of Sage, the distribution. | ||
|
||
Subdirectories: | ||
|
||
- bin: Various scripts needed at build time. Not installed. | ||
|
||
- make: Makefiles and related scripts. | ||
|
||
- pkgs: New-style sage packages. | ||
|
||
- sage_bootstrap: Python utility library for dealing with | ||
third-party tarballs and building Sage. See its README for | ||
more information. Not installed. | ||
|
||
- test: Test suite for sage_bootstrap. |
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,78 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# sage-apply-patches [-p<num>] [-d patch-subdir] [patch-dir] -- [...] | ||
# | ||
# Apply any patches to original spkg sources. Patch files must have | ||
# the .patch extension. | ||
# | ||
# By default the patches are applied from ../patches/ using the -p1 | ||
# option, and it is assumed that the patches are being applied from | ||
# the root of the package source. | ||
# | ||
# An optional patch subdirectory may be specified with the -d flag. | ||
# For example `sage-apply-patches -d cygwin` applies only those | ||
# patches under <patch-dir>/cygwin. | ||
# | ||
# The -p<num> arg is the argument accepted by the `patch` command, | ||
# and overrides the default -p1 | ||
# | ||
# Any additional arguments following " -- " are passed directly | ||
# to the `patch` command. | ||
# | ||
#*************************************************************************** | ||
# | ||
# Distributed under the terms of the GNU General Public License (GPL) | ||
# as published by the Free Software Foundation; either version 2 of | ||
# the License, or (at your option) any later version. | ||
# http://www.gnu.org/licenses/ | ||
#*************************************************************************** | ||
|
||
patchdir="../patches" | ||
patch_subdir="" | ||
patch_strip="-p1" | ||
patch_args_sep="" | ||
patch_args="--no-backup-if-mismatch" | ||
|
||
while [[ $# > 0 ]]; do | ||
if [[ -z "$patch_args_sep" ]]; then | ||
case $1 in | ||
-d) | ||
patch_subdir="${2%/}" | ||
shift | ||
;; | ||
-p[0-9]) | ||
patch_strip="$1" | ||
;; | ||
--) | ||
patch_args_sep="$1" | ||
;; | ||
*) | ||
patchdir="${1%/}" | ||
;; | ||
esac | ||
else | ||
patch_args="$patch_args $1" | ||
fi | ||
|
||
shift | ||
done | ||
|
||
patchdir="${patchdir}/${patch_subdir}" | ||
patchdir="${patchdir%/}" | ||
patches=( "${patchdir}"/*.patch ) | ||
|
||
if [[ -r "${patches[0]}" ]]; then | ||
echo "Applying patches from ${patchdir}..." | ||
for patch in ${patches[@]}; do | ||
# Skip non-existing or non-readable patches | ||
[ -r "$patch" ] || continue | ||
echo "Applying $patch" | ||
patch $patch_strip $patch_args < "$patch" | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error applying '$patch'" | ||
exit 1 | ||
fi | ||
done | ||
else | ||
>&2 echo "No patch files found in $patchdir" | ||
fi |
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,72 @@ | ||
#!/usr/bin/env bash | ||
# This command is specifically for pip-installing from a local | ||
# source directory, as opposed to from a package index via package | ||
# name. That is, it is for pip-installing Sage spkgs from their | ||
# extracted upstream sources. | ||
# | ||
# This ensures that any previous installations of the same package | ||
# are uninstalled first. | ||
|
||
# Default arguments for all packages installed with `pip install` | ||
# --ignore-installed : Force pip to re-install package even if it thinks it's | ||
# already installed (for which it sometimes gets false | ||
# positives for partially-installed packages). | ||
# --verbose : Display the output when running setup.py. | ||
# --no-deps : Don't install runtime dependencies from PyPI. | ||
# --no-index : Don't look at the package index. | ||
# This also disables pip's version self-check. | ||
pip_install_flags="--ignore-installed --verbose --no-deps --no-index" | ||
|
||
# Consume any additional pip install arguments except the last one | ||
while [ $# -gt 1 ]; do | ||
pip_install_flags="$pip_install_flags $1" | ||
shift | ||
done | ||
|
||
# Last argument must be "." and will be ignored | ||
if [ "$1" != "." ]; then | ||
echo >&2 "$0 requires . as final argument" | ||
exit 1 | ||
fi | ||
|
||
# Find out the name of the package that we are installing | ||
name="$(python setup.py --name)" | ||
|
||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error: could not determine package name" | ||
exit 1 | ||
fi | ||
|
||
if [ $(echo "$name" | wc -l) -gt 1 ]; then | ||
name="$(echo "$name" | tail -1)" | ||
echo >&2 "Warning: This package has a badly-behaved setup.py which outputs" | ||
echo >&2 "more than the package name for 'setup.py --name'; using the last" | ||
echo >&2 "line as the package name: $name" | ||
fi | ||
|
||
# We should avoid running pip while uninstalling a package because that | ||
# is prone to race conditions. Therefore, we use a lockfile while | ||
# running pip. This is implemented in the Python script pip-lock. | ||
|
||
# Keep uninstalling as long as it succeeds | ||
while true; do | ||
out=$(pip-lock uninstall --disable-pip-version-check -y "$name" 2>&1) | ||
if [ $? -ne 0 ]; then | ||
break | ||
fi | ||
echo "$out" | ||
done | ||
|
||
# Not ideal, but this is the easiest way to check if the package | ||
# was not installed to begin with (which pip treats as an error). | ||
# If it wasn't, then we proceed quietly; if it was installed show the | ||
# uninstallation output and error out. | ||
if [[ "$out" != *"not installed" ]]; then | ||
echo >&2 "$out" | ||
exit 1 | ||
fi | ||
|
||
# Finally actually do the installation (the "SHARED" tells pip-lock | ||
# to apply a shared lock) | ||
echo "Installing package $name using pip" | ||
exec pip-lock SHARED install $pip_install_flags . |
Oops, something went wrong.