From 8669f9b3d60fc4ee766e6eacf034b0ea676595ae Mon Sep 17 00:00:00 2001 From: winhamwr Date: Sat, 19 Dec 2009 08:41:04 +0800 Subject: [PATCH] First crack at setup.py file. Took my best guess on a version number and a couple of other things --- setup.py | 67 ++++++++++++++++++++++++++++++++++++++ sphinxtogithub/__init__.py | 11 +++++++ 2 files changed, 78 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..351b37b --- /dev/null +++ b/setup.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import codecs +import unittest + +try: + from setuptools import setup, find_packages, Command +except ImportError: + from ez_setup import use_setuptools + use_setuptools() + from setuptools import setup, find_packages, Command + +import sphinxtogithub + +class RunTests(Command): + description = "Run the sphinxtogithub test suite." + + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + suites = [ + sphinxtogithub.test.filehandler.testSuite(), + sphinxtogithub.test.directoryhandler.testSuite(), + sphinxtogithub.test.replacer.testSuite(), + sphinxtogithub.test.renamer.testSuite(), + ] + + suite = unittest.TestSuite(suites) + + runner = unittest.TextTestRunner() + + runner.run(suite) + +long_description = codecs.open("README.rst", "r", "utf-8").read() + +setup( + name='sphinxtogithub', + version=sphinxtogithub.__version__, + description=sphinxtogithub.__doc__, + author=sphinxtogithub.__author__, + author_email=sphinxtogithub.__contact__, + url=sphinxtogithub.__homepage__, + platforms=["any"], + license="BSD", + packages=find_packages('sphinxtogithub'), + scripts=["bin/sphinxtogithub"], + zip_safe=False, + install_requires=[], + cmdclass = {"test": RunTests}, + classifiers=[ + "Development Status :: 4 - Beta", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Environment :: Plugins", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: POSIX", + "Topic :: Documentation", + ], + long_description=long_description, +) diff --git a/sphinxtogithub/__init__.py b/sphinxtogithub/__init__.py index e69de29..14fd907 100644 --- a/sphinxtogithub/__init__.py +++ b/sphinxtogithub/__init__.py @@ -0,0 +1,11 @@ +"""Script for preparing the html output of the Sphinx documentation system for +github pages. """ + +VERSION = (0, 9, 0, 'dev') + +__version__ = ".".join(map(str, VERSION[:1])) +__release__ = ".".join(map(str, VERSION)) +__author__ = "Michael Jones" +__contact__ = "http://github.com/michaeljones" +__homepage__ = "http://github.com/michaeljones/sphinx-to-github" +__docformat__ = "restructuredtext" \ No newline at end of file