Commits

Dan Buch committed 0fe36c9

Starting work on making python3 compatible, which should hopefully be as simple as grabbing the version out of the python3 tree

Comments (0)

Files changed (2)

 def main():
     setup(
         name='Reindent',
-        version='0.1.1',
+        version='0.2.0',
         author="Tim Peters",
         author_email='nottimsemail@notadomain.foo',
         scripts=['reindent'],

test-python-versions

+#!/bin/bash
+# This is a very crude version compatibility script that cycles through a bunch
+# of python versions likely to still be in use (a wild guess, really.) The
+# script itself has only been tested on linux, so any feedback from Mac OSX and
+# cygwin users is much appreciated.
+
+HERE=$(dirname $0)
+HAD_FAILURE=0
+
+for version in 2.3 2.4 2.5 2.6 2.7 3.0 3.1 3.2
+do
+    "python${version}" -c "import sys" > /dev/null 2>&1
+    if [[ $? -eq 0 ]]
+    then
+        echo -n "Testing python${version}"
+        "python${version}" "${HERE}/reindent.py" -h > /dev/null 2>&1
+        if [[ $? -eq 0 ]]
+        then
+            # yes, it is *hilarious* that I'm using tabs in a script to
+            # test `reindent`
+            printf "\t...\tPASS\n"
+        else
+            HAD_FAILURE=1
+            printf "\t...\tFAIL\n"
+        fi
+    else
+        printf "python${version} not detected\t...\tSKIP\n"
+    fi
+done
+
+echo "------------------------------------"
+echo -n "Summary: "
+
+if [[ $HAD_FAILURE -eq 1 ]]
+then
+    echo "FAIL"
+else
+    echo "PASS"
+fi
+
+exit $HAD_FAILURE