From 21670e1a4255859a9ae32027745a37f1aab47b86 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 2 Aug 2010 08:51:57 -0400 Subject: [PATCH] ready to rock --- HISTORY.rst | 11 +++++++++ LISCENSE | 20 +++++++++++++++++ MANIFEST.in | 1 + README.rst | 35 +++++++++++++++++++++++++++++ example.py | 11 +++++++++ example/__init__.py | 14 ++++++++++++ example/cli.py | 8 +++++++ example/core.py | 20 +++++++++++++++++ example/packages/__init__.py | 0 example/packages/extlib/__init__.py | 0 example/packages/extlib2.py | 0 fabfile.py | 21 +++++++++++++++++ setup.py | 35 +++++++++++++++++++++++++++++ 13 files changed, 176 insertions(+) create mode 100644 HISTORY.rst create mode 100644 LISCENSE create mode 100644 MANIFEST.in create mode 100644 README.rst create mode 100755 example.py create mode 100644 example/__init__.py create mode 100644 example/cli.py create mode 100644 example/core.py create mode 100644 example/packages/__init__.py create mode 100644 example/packages/extlib/__init__.py create mode 100644 example/packages/extlib2.py create mode 100644 fabfile.py create mode 100644 setup.py diff --git a/HISTORY.rst b/HISTORY.rst new file mode 100644 index 0000000..48eff71 --- /dev/null +++ b/HISTORY.rst @@ -0,0 +1,11 @@ +History +======= + +0.1.1 (2010-06-14) +------------------ +* Fixed some bug + +0.1.0 (2010-05-16) +------------------ + +* Initial Release \ No newline at end of file diff --git a/LISCENSE b/LISCENSE new file mode 100644 index 0000000..92cd5be --- /dev/null +++ b/LISCENSE @@ -0,0 +1,20 @@ +Copyright (c) 2010 Kenneth Reitz + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..e7a24ac --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include HISTORY.rst README.rst \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..64846a7 --- /dev/null +++ b/README.rst @@ -0,0 +1,35 @@ +Example +======= + +This is an example Python project. + +Example Usage +------------- + +:: + + from gistapi import Gist, Gists + + gist = Gist('d4507e882a07ac6f9f92') + gist.description # 'Example Gist for gist.py' + gist.files # {'exampleFile': 'Example file content.', 'exampleEmptyFile': ''} + + +Installation +------------ + + pip install example + +Or, if you must: + + easy_install example + + +Roadmap +------- + +* List of various project goals + - Token based Authentication +* Possibly use other hacks in the meantime +* Possibly add nicer command line interface + diff --git a/example.py b/example.py new file mode 100755 index 0000000..a74829c --- /dev/null +++ b/example.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +"""Example Runner/Dipatch""" + +import example +import example.cli + + +if __name__ == '__main__': + example.cli.start() diff --git a/example/__init__.py b/example/__init__.py new file mode 100644 index 0000000..a148dac --- /dev/null +++ b/example/__init__.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +""" +""" + +import cli +import packages + +from core import * + + + +__all__ = ['core', 'cli', 'packages'] + diff --git a/example/cli.py b/example/cli.py new file mode 100644 index 0000000..6652730 --- /dev/null +++ b/example/cli.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +from core import * + +def start(): + """Example Dipatch""" + + print('Example executed') diff --git a/example/core.py b/example/core.py new file mode 100644 index 0000000..6e8eefb --- /dev/null +++ b/example/core.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +""" Example -- Core Package +""" + + +import packages.extlib +import packages.extlib2 + + +__version__ = '0.1.1' +__lisence__ = 'MIT' +__author__ = 'Kenneth Reitz' + + +class model(object): + """Generic class used throught application""" + def __init__(self): + pass + \ No newline at end of file diff --git a/example/packages/__init__.py b/example/packages/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/example/packages/extlib/__init__.py b/example/packages/extlib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/example/packages/extlib2.py b/example/packages/extlib2.py new file mode 100644 index 0000000..e69de29 diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..ab6892a --- /dev/null +++ b/fabfile.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +""" Example Fabfile, for project-related tasks. +""" + + +from fabric.api import * + + + +def task(): + """Some random project-related task""" + + print('Example task executed.') + + +def scrub(): + """Death to the bytecode!""" + + local("rm -fr dist build") + local("find . -name \"*.pyc\" -exec rm '{}' ';'") diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1248164 --- /dev/null +++ b/setup.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +# encoding: utf-8 + +import os +import sys +import example + +from distutils.core import setup + +def publish(): + """Publish to PyPi""" + os.system("python setup.py sdist upload") + +if sys.argv[-1] == "publish": + publish() + sys.exit() + +setup(name='gistapi', + version=example.__version__, + description='Python Example Project', + long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), + author='Kenneth Reitz', + author_email='me@kennethreitz.com', + url='http://github.com/kennethreitz/python_project', + packages=['example'], + license='MIT', + classifiers = ( + "Development Status :: 4 - Beta", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + ) + )