From fbe5cf8fed218c89e4e5c26ccec42b318bae8dea Mon Sep 17 00:00:00 2001 From: winhamwr Date: Sat, 19 Dec 2009 08:21:03 +0800 Subject: [PATCH] Re-arranged project in to a package for easy installation with pip and to remove the need to duplicate sphinxtogithub.py for testing --- bin/sphinxtogithub | 6 +++++ .../test => sphinxtogithub}/__init__.py | 0 .../sphinxtogithub.py | 0 sphinxtogithub/test/__init__.py | 0 .../test/directoryhandler.py | 0 .../test/filehandler.py | 0 .../test/renamer.py | 0 .../test/replacer.py | 0 testsuite/run.py | 25 ------------------- testsuite/sphinxtogithub/__init__.py | 1 - 10 files changed, 6 insertions(+), 26 deletions(-) create mode 100755 bin/sphinxtogithub rename {testsuite/sphinxtogithub/test => sphinxtogithub}/__init__.py (100%) rename sphinxtogithub.py => sphinxtogithub/sphinxtogithub.py (100%) create mode 100644 sphinxtogithub/test/__init__.py rename {testsuite/sphinxtogithub => sphinxtogithub}/test/directoryhandler.py (100%) rename {testsuite/sphinxtogithub => sphinxtogithub}/test/filehandler.py (100%) rename {testsuite/sphinxtogithub => sphinxtogithub}/test/renamer.py (100%) rename {testsuite/sphinxtogithub => sphinxtogithub}/test/replacer.py (100%) delete mode 100755 testsuite/run.py delete mode 120000 testsuite/sphinxtogithub/__init__.py diff --git a/bin/sphinxtogithub b/bin/sphinxtogithub new file mode 100755 index 0000000..a5a3b01 --- /dev/null +++ b/bin/sphinxtogithub @@ -0,0 +1,6 @@ +#!/usr/bin/env python +import sys +from sphinxtogithub.sphinxtogithub import main + +if __name__ == "__main__": + mains(sys.argv[1:]) \ No newline at end of file diff --git a/testsuite/sphinxtogithub/test/__init__.py b/sphinxtogithub/__init__.py similarity index 100% rename from testsuite/sphinxtogithub/test/__init__.py rename to sphinxtogithub/__init__.py diff --git a/sphinxtogithub.py b/sphinxtogithub/sphinxtogithub.py similarity index 100% rename from sphinxtogithub.py rename to sphinxtogithub/sphinxtogithub.py diff --git a/sphinxtogithub/test/__init__.py b/sphinxtogithub/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/testsuite/sphinxtogithub/test/directoryhandler.py b/sphinxtogithub/test/directoryhandler.py similarity index 100% rename from testsuite/sphinxtogithub/test/directoryhandler.py rename to sphinxtogithub/test/directoryhandler.py diff --git a/testsuite/sphinxtogithub/test/filehandler.py b/sphinxtogithub/test/filehandler.py similarity index 100% rename from testsuite/sphinxtogithub/test/filehandler.py rename to sphinxtogithub/test/filehandler.py diff --git a/testsuite/sphinxtogithub/test/renamer.py b/sphinxtogithub/test/renamer.py similarity index 100% rename from testsuite/sphinxtogithub/test/renamer.py rename to sphinxtogithub/test/renamer.py diff --git a/testsuite/sphinxtogithub/test/replacer.py b/sphinxtogithub/test/replacer.py similarity index 100% rename from testsuite/sphinxtogithub/test/replacer.py rename to sphinxtogithub/test/replacer.py diff --git a/testsuite/run.py b/testsuite/run.py deleted file mode 100755 index 400b1c1..0000000 --- a/testsuite/run.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -import unittest -import sys - -sys.path.append(".") - -from sphinxtogithub.test import directoryhandler, filehandler, replacer, renamer - - -if __name__ == "__main__": - - suites = [ - filehandler.testSuite(), - directoryhandler.testSuite(), - replacer.testSuite(), - renamer.testSuite(), - ] - - suite = unittest.TestSuite(suites) - - runner = unittest.TextTestRunner() - - runner.run(suite) - diff --git a/testsuite/sphinxtogithub/__init__.py b/testsuite/sphinxtogithub/__init__.py deleted file mode 120000 index a0cd27e..0000000 --- a/testsuite/sphinxtogithub/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../sphinxtogithub.py \ No newline at end of file