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 gt_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ptigwe committed Dec 1, 2015
2 parents 51912a5 + 0d3caa0 commit 90f7051
Show file tree
Hide file tree
Showing 1,780 changed files with 133,690 additions and 30,156 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
/config.log
/config.status
/configure
/build/Makefile-auto
/build/Makefile-auto.in

###################
# Temporary Files #
Expand Down
1 change: 1 addition & 0 deletions COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ the licenses of the components of Sage are included below as well.

SOFTWARE LICENSE
-----------------------------------------------------------------------
arb GPLv2+
atlas Modified BSD
boehm_gc MIT-like license (see below)
backports_ssl_match_hostname Python License
Expand Down
40 changes: 27 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,30 @@ default: all

build: all-build

# Defer unknown targets to build/Makefile
# Defer unknown targets to build/make/Makefile
%::
$(MAKE) configure logs
+cd build && ./pipestatus \
"./install '$@' 2>&1" \
"tee -a ../logs/install.log"

logs:
mkdir -p $@
$(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 build/pkgs/*/*
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:
Expand All @@ -42,7 +57,7 @@ misc-clean:
rm -rf tmp
rm -f aclocal.m4 config.log config.status confcache
rm -rf autom4te.cache
rm -f build/Makefile build/Makefile-auto
rm -f build/make/Makefile build/make/Makefile-auto
rm -f .BUILDSTART

bdist-clean: clean
Expand All @@ -56,13 +71,13 @@ distclean: build-clean
# Delete all auto-generated files which are distributed as part of the
# source tarball
bootstrap-clean:
rm -rf config configure build/Makefile-auto.in
rm -rf config configure build/make/Makefile-auto.in

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
rm -rf upstream

micro_release: bdist-clean lib-clean
micro_release: bdist-clean sagelib-clean
@echo "Stripping binaries ..."
LC_ALL=C find local/lib local/bin -type f -exec strip '{}' ';' 2>&1 | grep -v "File format not recognized" | grep -v "File truncated" || true

Expand Down Expand Up @@ -104,8 +119,7 @@ ptestoptional: ptestall # just an alias

ptestoptionallong: ptestalllong # just an alias

configure: configure.ac src/bin/sage-version.sh \
m4/ax_c_check_flag.m4 m4/ax_gcc_option.m4 m4/ax_gcc_version.m4 m4/ax_gxx_option.m4 m4/ax_gxx_version.m4 m4/ax_prog_perl_version.m4
configure: configure.ac src/bin/sage-version.sh m4/*.m4
./bootstrap -d

install:
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.8.beta7, released 2015-07-02
Sage version 6.10.beta4, released 2015-11-12
4 changes: 2 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CONFVERSION=`cat $PKG/package-version.txt`

bootstrap () {
aclocal -I m4 && \
automake --add-missing --copy build/Makefile-auto && \
automake --add-missing --copy build/make/Makefile-auto && \
autoconf

st=$?
Expand Down Expand Up @@ -75,7 +75,7 @@ save () {
# Create configure tarball
echo "Creating $CONFBALL..."
mkdir -p upstream
tar zcf "$CONFBALL" configure config/* build/Makefile-auto.in
tar zcf "$CONFBALL" configure config/* build/make/Makefile-auto.in

# Update version number
echo "$CONFVERSION" >$PKG/package-version.txt
Expand Down
3 changes: 2 additions & 1 deletion build/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/Makefile
/.tox
/MANIFEST
28 changes: 28 additions & 0 deletions build/bin/sage-download-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python

# USAGE:
#
# sage-download-file --print-fastest-mirror
#
# Print out the fastest mirror. All further arguments are ignored in
# that case.
#
# sage-download-file [--quiet] url-or-tarball [destination]
#
# The single mandatory argument can be a http:// url or a tarball
# filename. In the latter case, the tarball is downloaded from the
# mirror network and its checksum is verified.
#
# If the destination is not specified:
# * a url will be downloaded and the content written to stdout
# * a tarball will be saved under {SAGE_DISTFILES}

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.cmdline import SageDownloadFileApplication
SageDownloadFileApplication().run()
40 changes: 40 additions & 0 deletions build/bin/sage-logger
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
#
# sage-logger COMMAND LOGFILE
#
# Evaluate shell command COMMAND while logging stdout and stderr to
# LOGFILE. If either the command or the logging failed, return a
# non-zero exit status.
#
# AUTHOR:
#
# - Jeroen Demeyer (2015-07-26): initial version based on old pipestatus
# script (#18953)
#
#*****************************************************************************
# Copyright (C) 2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
#
# 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/
#*****************************************************************************

cmd="$1"
logfile="$2"
logdir=`dirname "$logfile"`

mkdir -p "$logdir"

# Redirect stdout and stderr to a subprocess running tee.
# We trap SIGINT such that SIGINT interrupts the main process being
# run, not the logging.
( exec 2>&1; eval "$cmd" ) | ( trap '' SIGINT; tee -a "$logfile" )

pipestatus=(${PIPESTATUS[*]})

if [ ${pipestatus[1]} -ne 0 ]; then
exit ${pipestatus[1]}
else
exit ${pipestatus[0]}
fi
42 changes: 42 additions & 0 deletions build/bin/sage-package
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python

# Script to manage third-party tarballs.
#
# Usage:
#
# * Print the configuration
#
# $ sage-package config
# Configuration:
# * log = info
# * interactive = True
#
# * Print a list of all available packages
#
# $ sage-package list | sort
# 4ti2
# arb
# atlas
# autotools
# [...]
# zn_poly
#
# * Find the package name given a tarball filename
#
# $ sage-package name pari-2.8-1564-gdeac36e.tar.gz
# pari
#
# * Find the tarball filename given a package name
#
# $ sage-package tarball pari
# pari-2.8-1564-gdeac36e.tar.gz

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.cmdline import SagePkgApplication
SagePkgApplication().run()
Loading

0 comments on commit 90f7051

Please sign in to comment.