From 129be43b16b6456ed4663c13b6d74cac4356f0fe Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Fri, 29 Nov 2013 19:55:30 +0100 Subject: [PATCH] Bumped up to version 2.0. Updated docs. --- README.md => README.rst | 29 +++++++++++++++++------------ requirements.txt | 4 +--- setup.py | 20 +++++++++++++++++++- 3 files changed, 37 insertions(+), 16 deletions(-) rename README.md => README.rst (64%) diff --git a/README.md b/README.rst similarity index 64% rename from README.md rename to README.rst index fe53078..8f9e25e 100644 --- a/README.md +++ b/README.rst @@ -1,35 +1,40 @@ +====== dpaste ====== -[![Build Status](https://travis-ci.org/bartTC/dpaste.png?branch=master)](https://travis-ci.org/bartTC/dpaste) -[![Coverage Status](https://coveralls.io/repos/bartTC/dpaste/badge.png?branch=master)](https://coveralls.io/r/bartTC/dpaste?branch=master) +.. image:: https://travis-ci.org/bartTC/dpaste.png?branch=master + :target: https://travis-ci.org/bartTC/dpaste +.. image:: https://coveralls.io/repos/bartTC/dpaste/badge.png?branch=master + :target: https://coveralls.io/r/bartTC/dpaste?branch=master dpaste is a Django based pastebin. It's intended to run separately but its also possible to be installed into an existing Django project like a regular app. You can find a live example on http://dpaste.de/ +----------------------------- Testing and local development ----------------------------- -dpaste is continuously tested on [Travis][travis]. You can also run the test -suite locally with [tox][tox]: +dpaste is continuously tested on _Travis. You can also run the test +suite locally with _tox:: $ cd dpaste/ $ pip install tox $ tox A more manual approach is installing it all by hand in a virtual environment. -This is also the preferred way to setup an environment for local development: +This is also the preferred way to setup an environment for local development:: $ cd dpaste/ $ pip install -e . $ pip install -r requirements.txt $ python runtests.py -[travis]: https://travis-ci.org/bartTC/dpaste -[tox]: http://tox.readthedocs.org/en/latest/ +_Travis: https://travis-ci.org/bartTC/dpaste +_tox: http://tox.readthedocs.org/en/latest/ +----------------------------------------- Integrate dpaste into an existing project ----------------------------------------- @@ -41,7 +46,7 @@ necessary dependencies of dpaste as well. pip install https://github.com/bartTC/dpaste -Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`: +Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`:: INSTALLED_APPS = ( 'django.contrib.sessions', @@ -53,7 +58,7 @@ Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`: # 'south', (supported) ) -Add `dpaste` and if you want the `dpaste_api` to your urlpatterns: +Add ``dpaste`` and if you want the ``dpaste_api`` to your urlpatterns:: urlpatterns = patterns('', # ... @@ -62,14 +67,14 @@ Add `dpaste` and if you want the `dpaste_api` to your urlpatterns: url(r'pastebin/api/', include('dpaste.urls.dpaste_api')), ) -Finally just `syncdb` or if you use South, migrate: +Finally just ``syncdb`` or if you use South, migrate:: manage.py migrate dpaste Do not forget to setup a cron job to purge expired snippets. You need to -run the management command `cleanup_snippets`. A cron job I use looks like: +run the management command ``cleanup_snippets``. A cron job I use looks like:: 30 * * * * /srv/dpaste.de/bin/python /srv/dpaste.de/bin/manage.py cleanup_snippets > /dev/null Note also that dpaste does *not* come with Django admin integration. You need -to setup an register the models in an `admin.py` yourself. +to setup an register the models in an ``admin.py`` yourself. diff --git a/requirements.txt b/requirements.txt index a075d7f..820ba76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,9 +8,7 @@ requests==2.0.0 python-coveralls==2.4.0 coverage==3.7 tox==1.6.1 -sphinx==1.1.3 -sphinx_rtd_theme -markdown2==2.1.0 +docutils # Deployment specific django-redis==3.3 diff --git a/setup.py b/setup.py index aefb697..c497da3 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,25 @@ from setuptools import setup, find_packages setup( name='dpaste', - version='1.9', + version='2.0', + description='dpaste is a Django based pastebin. It\'s intended to run ' + 'separately but its also possible to be installed into an ' + 'existing Django project like a regular app.', + long_description=open('README.rst').read(), + author='Martin Mahner', + author_email='martin@mahner.org', + url='https://github.com/bartTC/dpaste/', + + classifiers=( + 'Development Status :: 5 - Production/Stable', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Framework :: Django', + ), + packages=find_packages(), package_data={'dpaste': ['static/*.*', 'templates/*.*']}, scripts=('manage.py',),