Ticket #9921: trac_9921-nose-spkg.git.patch

File trac_9921-nose-spkg.git.patch, 3.3 KB (added by jhpalmieri, 9 years ago)

patch for spkg, for review only (version 1.1.3)

  • new file .hgignore

    # 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
    - +  
     1src
  • new file SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    new file mode 100644
    - +  
     1= nose =
     2
     3== Description ==
     4
     5nose extends the test loading and running features of unittest, making
     6it easier to write, find and run tests.
     7
     8== License ==
     9
     10GNU LGPL
     11
     12== SPKG Maintainers ==
     13
     14John H. Palmieri <palmieri@math.washington.edu>
     15
     16== Upstream Contact ==
     17
     18Author: Jason Pellerin
     19Home 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
     29Remove 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.
  • new file spkg-check

    diff --git a/spkg-check b/spkg-check
    new file mode 100755
    - +  
     1#!/usr/bin/env bash
     2
     3if [ -z "$SAGE_LOCAL" ]; then
     4    echo "SAGE_LOCAL undefined - exiting..."
     5    echo "Maybe run 'sage -sh'?"
     6    exit 1
     7fi
     8
     9cd src
     10
     11nosetests functional_tests
     12if [ $? -ne 0 ]; then
     13    echo "Error running functional_tests."
     14    exit 1
     15fi
     16nosetests unit_tests
     17if [ $? -ne 0 ]; then
     18    echo "Error running unit_tests."
     19    exit 1
     20fi
  • new file spkg-install

    diff --git a/spkg-install b/spkg-install
    new file mode 100755
    - +  
     1#!/usr/bin/env bash
     2
     3if [ -z "$SAGE_LOCAL" ]; then
     4    echo "SAGE_LOCAL undefined - exiting..."
     5    echo "Maybe run 'sage -sh'?"
     6    exit 1
     7fi
     8
     9# Helper functions
     10success() {
     11    if [ $? -ne 0 ]; then
     12        echo "Error: '$1'"
     13        exit 1
     14    fi
     15}
     16
     17CUR=`pwd`
     18
     19cd src
     20
     21# Build new version
     22echo "Building nose..."
     23python setup.py build
     24success 'Error building nose'
     25echo
     26
     27echo "Removing old version of nose..."
     28rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Nose-*
     29success 'Error deleting previous version'
     30echo
     31
     32# Install new version
     33echo "Installing nose..."
     34python setup.py install
     35success 'Error installing nose'
     36echo
  • new file spkg-make

    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
     22set -e
     23
     24# Sanity check: must be run from current directory
     25if ! [ -f spkg-make ]; then
     26    echo >&2 "This script must be run from its own source directory!"
     27    exit 1
     28fi
     29
     30cd src
     31find . -name *.pyc -exec rm {} \;