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

Commit

Permalink
Merge remote-tracking branch 'trac/u/ohanar/build_system' into sage-bin
Browse files Browse the repository at this point in the history
Conflicts:
	src/bin/sage -> sage.in
	src/bin/sage-env -> env.sh.in
	src/bin/sage-spkg -> sage-spkg.in
  • Loading branch information
felix-salfelder committed Sep 8, 2013
2 parents f9f8d16 + c29a755 commit 69fda9a
Show file tree
Hide file tree
Showing 139 changed files with 10,597 additions and 14,462 deletions.
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,14 @@ doc-pdf: build
$(PIPE) "./sage --docbuild all pdf $(SAGE_DOCBUILD_OPTS) 2>&1" "tee -a logs/docpdf.log"

doc-clean:
@echo "Deleting generated docs..."
rm -rf src/doc/en/reference/*/sage
rm -rf src/doc/en/reference/*/sagenb
rm -rf src/doc/en/reference/sage
rm -rf src/doc/en/reference/sagenb
rm -rf src/doc/output
cd src/doc && $(MAKE) clean

clean:
@echo "Deleting package build directories..."
rm -rf local/var/tmp/sage/build

lib-clean:
@echo "Deleting Sage library build artifacts..."
rm -f src/c_lib/.sconsign.dblite
find src/c_lib -name '*.os' | xargs rm -f
find src/c_lib -name '*.so' | xargs rm -f
rm -rf src/build
find src -name '*.pyc' | xargs rm -f
find src -name '*.pyx' | sed 's/pyx$$/c/' | xargs rm -f
find src -name '*.pyx' | sed 's/pyx$$/cpp/' | xargs rm -f
rm -rf src/sage/libs/pari/gen.h
rm -rf src/sage/modular/arithgroup/farey_symbol.h
rm -rf src/sage/rings/real_mpfi.h
rm -rf src/sage/symbolic/pynac.h
cd src && $(MAKE) clean

bdist-clean: clean
@echo "Deleting miscellaneous artifacts generated by build system ..."
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sage version 5.12.beta3, released 2013-08-21
Sage version 5.12.beta4, released 2013-08-30
15 changes: 5 additions & 10 deletions build/deps
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
###############################################################################
# This file ($SAGE_ROOT/spkg/standard/deps) will be copied into
# $SAGE_ROOT/spkg/Makefile by $SAGE_ROOT/spkg/install
# This file ($SAGE_ROOT/build/deps) will be copied into
# $SAGE_ROOT/build/Makefile by $SAGE_ROOT/build/install
###############################################################################

# Let e.g. SAGE_ROOT/spkg/install pass options to sage-spkg, i.e. currently
# Let e.g. SAGE_ROOT/build/install pass options to sage-spkg, i.e. currently
# "-f", to force rebuilding dependent packages during an upgrade (#9896).
#
# When upgrading from a 4.x version of Sage, the script "sage-spkg" will be
# found in SAGE_ROOT/local/bin until the new sage_root repo is installed.
# After that, it will be found in SAGE_ROOT/spkg/bin
# (SAGE_ROOT/spkg/bin is added to the PATH in spkg/install).
# Therefore, do not put an explicit path for sage-spkg here.

SAGE_SPKG = sage-spkg $${SAGE_SPKG_OPTS}
PIPE = $(SAGE_ROOT)/build/pipestatus

Expand Down Expand Up @@ -118,7 +113,7 @@ all-sage: \
csage \
extcode

# TOOLCHAIN consists of dependencies determined by spkg/install,
# TOOLCHAIN consists of dependencies determined by build/install,
# including for example the GCC package.
toolchain: $(TOOLCHAIN)

Expand Down
20 changes: 11 additions & 9 deletions build/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
SAGE_VERSION=`cat $SAGE_ROOT/VERSION.txt | sed 's+.*\ \(.*\),.*+\1+'`
PATH="$SAGE_ROOT/src/bin:$SAGE_LOCAL/bin:$PATH"
PYTHONPATH="$SAGE_LOCAL"
export SAGE_ROOT SAGE_SRC SAGE_LOCAL SAGE_LOGS SAGE_SPKG_INST SAGE_VERSION PATH PYTHONPATH
export SAGE_ROOT SAGE_SRC SAGE_LOCAL SAGE_EXTCODE SAGE_LOGS SAGE_SPKG_INST SAGE_VERSION PATH PYTHONPATH

# Storing the start time of the build process. The time is stored in
# seconds since 1970-01-01 in a hidden file called
Expand Down Expand Up @@ -456,10 +456,10 @@ EOF

# $(TOOLCHAIN) variable containing prerequisites for the build
echo >&3 -n 'TOOLCHAIN ='
if [ "$SAGE_INSTALL_CCACHE" == yes ]; then
if [ "$SAGE_INSTALL_CCACHE" = yes ]; then
echo >&3 -n ' $(INST)/ccache'
fi
if [ "$need_to_install_gcc" == yes ]; then
if [ "$need_to_install_gcc" = yes ]; then
echo >&3 -n ' $(INST)/$(GCC)'
# Use this option for the prereq configure script, such that it
# will skip all compiler checks.
Expand All @@ -469,32 +469,34 @@ echo >&3

echo >&3 'SCRIPT_SOURCES = \'
for file in "$SAGE_SRC/bin/"*; do
echo >&3 " $file \\"
echo >&3 " \$(SAGE_SRC)${file#$SAGE_SRC} \\"
done
echo >&3
echo >&3 'SCRIPT_TARGETS = \'
for file in "$SAGE_SRC/bin/"*; do
echo >&3 " ${SAGE_LOCAL}${file#$SAGE_SRC} \\"
echo >&3 " \$(SAGE_LOCAL)${file#$SAGE_SRC} \\"
done
echo >&3
echo >&3 'EXTCODE_SOURCES = \'
for file in `find "$SAGE_SRC"/ext -type f`; do
echo >&3 " $file \\"
echo >&3 " \$(SAGE_SRC)${file#$SAGE_SRC} \\"
done
echo >&3
echo >&3 'EXTCODE_TARGETS = \'
for file in `find "$SAGE_SRC"/ext -type f`; do
echo >&3 " ${SAGE_EXTCODE}${file#$SAGE_SRC/ext} \\"
echo >&3 " \$(SAGE_EXTCODE)${file#$SAGE_SRC/ext} \\"
done
echo >&3

cat >&3 <<EOF
# don't just use \`install\` since we don't want to change permissions
$SAGE_LOCAL/bin/%: $SAGE_SRC/bin/%
\$(SAGE_LOCAL)/bin/%: \$(SAGE_SRC)/bin/%
cp \$< \$@
# don't just use \`install -D\` since we don't want to change permissions
$SAGE_EXTCODE/%: $SAGE_SRC/ext/%
# cp won't correctly setup the SAGE_EXTCODE directory structure (unlike install)
# so we need a mkdir here to cp can copy into an existing folder
\$(SAGE_EXTCODE)/%: \$(SAGE_SRC)/ext/%
@mkdir -p "\$(@D)"
cp \$< \$@
EOF
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/git/.hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src
53 changes: 53 additions & 0 deletions build/pkgs/git/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
= git - the stupid content tracker =

== Description ==

Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-operations and
full access to internals.

-- `man git`

== SPKG Maintainers ==

* Keshav Kini

== Upstream Contact ==

* Maintainer: Junio C. Hamano
* Website: http://git-scm.com/

== Dependencies ==

* zlib

Note: excluding libcurl and expat because they are large and only
required if you're communicating with repositories over HTTP. If you
need to do so, please use an external version of git.

== Changelog ==

=== git-1.7.12.2.p0 (Jeroen Demeyer, 2012-10-02) ===

* #12707: Upgrade to git-1.7.12.2
* Disable Tcl/Tk GUI (otherwise Tcl/Tk is a dependency)
* Various fixes to spkg-install
* Keep SANE_TOOL_PATH empty to ensure the PATH isn't changed
* Figure out *correct* path to "install"
* Add patch no-autoconf.patch to prevent running autoconf

=== git-1.7.10 (Keshav Kini, 2012-04-20) ===

* #12707: Upgrade to latest stable
* Fix building on OS X by making the installer ignore Fink and Darwin
Ports
* Make sure not to use the system Python for anything

=== git-1.7.9.4 (Keshav Kini, 2012-03-19) ===

* Upgrade to latest stable
* Track dependencies

=== git-1.7.2.4 (William Stein, 2012-03-19) ===

* Initial version
3 changes: 3 additions & 0 deletions build/pkgs/git/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sha1=8cce24a390595d6e62c3aa66bef332ab95900173
md5=9b178a549f64e6f896b634e76ce4c1a6
cksum=3835145085
1 change: 1 addition & 0 deletions build/pkgs/git/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.7.12.2.p0
3 changes: 3 additions & 0 deletions build/pkgs/git/spkg-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo "spkg-check: Tests for git have already been performed by spkg-install. Good day!"
64 changes: 64 additions & 0 deletions build/pkgs/git/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env bash

die () {
echo "$@" >&2
exit 1
}

[ -n "$SAGE_LOCAL" ] || die 'Error: $SAGE_LOCAL not set. Source sage-env or run this script from `sage -sh`.'

if [ "$SAGE64" = yes ]; then
echo "Building with extra 64-bit flags"
if [ -z "$CFLAG64" ]; then
CFLAG64=-m64
fi
export CFLAGS="$CFLAGS $CFLAG64"
export CPPFLAGS="$CPPFLAGS $CFLAG64"
export LDFLAGS="$LDFLAGS $CFLAG64"
fi

# Path to "install" command
for cmd in /usr/ucb/install ginstall install; do
[ -z "$INSTALL" ] || break
INSTALL=`command -v $cmd 2>/dev/null`
done
[ -n "$INSTALL" ] || die 'No install program found'
echo "Using install program $INSTALL"


cd src
# Apply patches.
for patch in ../patches/*.patch; do
[ -r "$patch" ] || continue # Skip non-existing or non-readable patches
patch -p1 <"$patch"
if [ $? -ne 0 ]; then
echo >&2 "Error applying '$patch'"
exit 1
fi
done


export NO_FINK=1
export NO_DARWIN_PORTS=1

# First make GIT-VERSION-FILE (we patched Makefile such that configure
# no longer depends on this, so it's safer to explicitly build this).
$MAKE GIT-VERSION-FILE

# Configure without Tcl/Tk (otherwise git *requires* Tcl/Tk).
# We keep SANE_TOOL_PATH empty, otherwise git messes with the PATH on
# some systems, leading for example to a different "make" being used.
./configure --prefix="$SAGE_LOCAL" \
--with-python="$SAGE_LOCAL"/bin/python \
--without-tcltk \
--with-sane-tool-path= \
|| die 'Error configuring git.'

if [ "$SAGE_CHECK" = yes ]; then
$MAKE test || die "Error running git's combined build/test suite."
else
$MAKE || die 'Error building git.'
fi

# Force path to "install" program
$MAKE INSTALL="$INSTALL" install || die 'Error installing git.'
3 changes: 3 additions & 0 deletions build/pkgs/ipython/SPKG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ ipython-user@scipy.org

== Changelog ==

=== ipython-0.13.2 (Volker Braun, June 24, 2013) ===
* Upgrade to 0.13.2 (trac #14810)

=== ipython-0.13.1 (Jason Grout, Volker Braun, Jan 22, 2013) ===
* Upgrade to 0.13.1
* Add backport of history fixes (to catch invalid databases)
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/ipython/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sha1=1076f8ddcaa3f51e5febac9d8fdb39e789c22a1d
md5=3108fd91d47e2a87e17b92834f5e79d8
cksum=2751286105
sha1=b533236e5c5d4f85bbc654c2bfe890dbb9e68b8e
md5=29585ef7a2e4396527fa64de11c36e59
cksum=4222531866
2 changes: 1 addition & 1 deletion build/pkgs/ipython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.1
0.13.2
6 changes: 1 addition & 5 deletions src/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
global-include *.c *.cc *.cpp *.h *.hh *.hpp *.inc *.py *.pyx *.pxd *.pxi *.rst *.txt *.tex

graft .hg
include .hgignore .hgtags
include MANIFEST.in
include bundle export install pull sage-push
include spkg-delauto spkg-dist spkg-install

include c_lib/SConstruct
graft sage/server/notebook/templates
graft sage/libs/gap/test
recursive-include sage README
recursive-include sage
recursive-exclude sage/ext/interpreters *.c *.h *.pyx *.pxd
exclude sage/libs/pari/gen.h
exclude sage/modular/arithgroup/farey_symbol.h
Expand Down
12 changes: 12 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
clean:
@echo "Deleting Sage library build artifacts..."
rm -f c_lib/.sconsign.dblite
find c_lib -name '*.os' | xargs rm -f
find c_lib -name '*.so' | xargs rm -f
rm -rf build
find -name '*.pyc' | xargs rm -f
find -name '*.pyx' | sed 's/pyx$$/c/' | xargs rm -f
find -name '*.pyx' | sed 's/pyx$$/cpp/' | xargs rm -f
rm -rf sage/modular/arithgroup/farey_symbol.h
rm -rf sage/rings/real_mpfi.h
rm -rf sage/symbolic/pynac.h
15 changes: 12 additions & 3 deletions src/bin/env.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,13 @@ if [ "$SAGE_UPSTREAM" = "" ]; then
SAGE_UPSTREAM="http://www.sagemath.org/packages/upstream/"
export SAGE_UPSTREAM
fi
if [ -z "$SAGE_REPO" ]; then
SAGE_REPO="git://github.com/sagemath/sage.git"
export SAGE_REPO
if [ -z "$SAGE_REPO_ANONYMOUS" ]; then
SAGE_REPO_ANONYMOUS="git://github.com/sagemath/sage.git"
export SAGE_REPO_ANONYMOUS
fi
if [ -z "$SAGE_REPO_AUTHENTICATED" ]; then
SAGE_REPO_AUTHENTICATED="ssh://git@trac.sagemath.org:2222/sage.git"
export SAGE_REPO_AUTHENTICATED
fi
if [ -z "$SAGE_DISTFILES" ]; then
SAGE_DISTFILES="$SAGE_ROOT/upstream"
Expand Down Expand Up @@ -632,3 +636,8 @@ if [ -r "$SAGE_RC_FILE" ]; then
exit 1
fi
fi

# If we move the Sage tree then ncurses cannot find terminfo, hence, we
# tell it where to find it. See Trac Ticket #15091

export TERMINFO="$SAGE_LOCAL/share/terminfo"
2 changes: 1 addition & 1 deletion src/bin/sage-banner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 5.12.beta3, Release Date: 2013-08-21
│ Sage Version 5.12.beta4, Release Date: 2013-08-30
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Expand Down
5 changes: 1 addition & 4 deletions src/bin/sage-bdist
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ mkdir -p "$TMP_DIR/$TARGET"
# Clone Sage repository
echo "Cloning Sage repository..."
git clone "$SAGE_ROOT" "$TMP_DIR/$TARGET"
( cd "$TMP_DIR/$TARGET" && git remote set-url origin git://github.com/sagemath/sage.git )

# Copy VERSION.txt (which is untracked)
cp -p VERSION.txt "$TMP_DIR/$TARGET"
( cd "$TMP_DIR/$TARGET" && git remote set-url origin "$SAGE_REPO_ANONYMOUS" )

echo "Done cloning Sage repository."

Expand Down
5 changes: 5 additions & 0 deletions src/bin/sage-real-upgrade
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

# People often move the Sage install right before doing the upgrade, so it's
# important to fix any path hardcoding issues first, or certain library
# links will fail.
Expand All @@ -8,3 +10,6 @@ sage-location
# Run make with SAGE_UPGRADING set
export SAGE_UPGRADING=yes
make

# check to make sure sage still starts
sage-starts
Loading

0 comments on commit 69fda9a

Please sign in to comment.