# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1339717024 25200
# Node ID c4f15012bb11409fd41e71dda3f24dcd63f1be85
# Parent 0000000000000000000000000000000000000000
trac 9921: initial version of nose spkg
diff --git a/.hgignore b/.hgignore
new file mode 100644
diff --git a/SPKG.txt b/SPKG.txt
new file mode 100644
-
|
+
|
|
| 1 | = nose = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | nose extends the test loading and running features of unittest, making |
| 6 | it easier to write, find and run tests. |
| 7 | |
| 8 | == License == |
| 9 | |
| 10 | GNU LGPL |
| 11 | |
| 12 | == SPKG Maintainers == |
| 13 | |
| 14 | John H. Palmieri <palmieri@math.washington.edu> |
| 15 | |
| 16 | == Upstream Contact == |
| 17 | |
| 18 | Author: Jason Pellerin |
| 19 | Home Page: http://readthedocs.org/docs/nose/ |
| 20 | see also https://github.com/nose-devs/nose |
| 21 | |
| 22 | == Dependencies == |
| 23 | * setuptools / distribute |
| 24 | * Python |
| 25 | * GNU patch (shipped with Sage) |
| 26 | |
| 27 | == Special Update/Build Instructions == |
| 28 | |
| 29 | Remove any .pyc files by running the spkg-make script. |
| 30 | |
| 31 | == Changelog == |
| 32 | |
| 33 | === nose-1.1.3.git20120614 (John H. Palmieri, June 14, 2012) === |
| 34 | * #9921: initial version. |
diff --git a/spkg-check b/spkg-check
new file mode 100755
-
|
+
|
|
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | if [ -z "$SAGE_LOCAL" ]; then |
| 4 | echo "SAGE_LOCAL undefined - exiting..." |
| 5 | echo "Maybe run 'sage -sh'?" |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | cd src |
| 10 | |
| 11 | nosetests functional_tests |
| 12 | if [ $? -ne 0 ]; then |
| 13 | echo "Error running functional_tests." |
| 14 | exit 1 |
| 15 | fi |
| 16 | nosetests unit_tests |
| 17 | if [ $? -ne 0 ]; then |
| 18 | echo "Error running unit_tests." |
| 19 | exit 1 |
| 20 | fi |
diff --git a/spkg-install b/spkg-install
new file mode 100755
-
|
+
|
|
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | if [ -z "$SAGE_LOCAL" ]; then |
| 4 | echo "SAGE_LOCAL undefined - exiting..." |
| 5 | echo "Maybe run 'sage -sh'?" |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | # Helper functions |
| 10 | success() { |
| 11 | if [ $? -ne 0 ]; then |
| 12 | echo "Error: '$1'" |
| 13 | exit 1 |
| 14 | fi |
| 15 | } |
| 16 | |
| 17 | CUR=`pwd` |
| 18 | |
| 19 | cd src |
| 20 | |
| 21 | # Build new version |
| 22 | echo "Building nose..." |
| 23 | python setup.py build |
| 24 | success 'Error building nose' |
| 25 | echo |
| 26 | |
| 27 | echo "Removing old version of nose..." |
| 28 | rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Nose-* |
| 29 | success 'Error deleting previous version' |
| 30 | echo |
| 31 | |
| 32 | # Install new version |
| 33 | echo "Installing nose..." |
| 34 | python setup.py install |
| 35 | success 'Error installing nose' |
| 36 | echo |
diff --git a/spkg-make b/spkg-make
new file mode 100755
-
|
+
|
|
| 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Script to prepare a nose spkg for Sage. This script is only for the |
| 4 | # package maintainer, not for building nose during a Sage install. |
| 5 | # WARNING: This script will delete files in the src directory and its |
| 6 | # subdirectories! |
| 7 | # |
| 8 | # HOW TO MAKE THE SPKG: |
| 9 | # |
| 10 | # 1) Remove the 'src' directory. |
| 11 | # 2) Download gzipped tar file and move it to 'src'. |
| 12 | # 3) ./spkg-make -- this deletes any pyc files in the subdirectories of src. |
| 13 | |
| 14 | # If we decide to download from the git repository, we could automate |
| 15 | # steps 1 and 2, also. |
| 16 | |
| 17 | # AUTHOR: |
| 18 | # |
| 19 | # - John Palmieri (June 2012): initial version. |
| 20 | |
| 21 | # Automatically exit on errors |
| 22 | set -e |
| 23 | |
| 24 | # Sanity check: must be run from current directory |
| 25 | if ! [ -f spkg-make ]; then |
| 26 | echo >&2 "This script must be run from its own source directory!" |
| 27 | exit 1 |
| 28 | fi |
| 29 | |
| 30 | cd src |
| 31 | find . -name *.pyc -exec rm {} \; |