Skip to content

Commit

Permalink
Added files needed for packaging, installation, and automated testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sureiya committed Nov 12, 2013
1 parent 2b7188c commit 490f061
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_clickbank/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version__ = '0.1.0'
__url__ = ''
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Django >= 1.5.5
37 changes: 37 additions & 0 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python

from os.path import dirname, abspath
import sys

from django.conf import settings
from django.core.management import call_command
from django_clickbank import settings as django_clickbank_defaults

if not settings.configured:
settings.configure(
CLICKBANK_DEBUG=False,
CLICKBANK_STORE_POSTS=True,
CLICKBANK_KEEP_INVALID=True,
CLICKBANK_SIGNAL_INVALID=False,
CLICKBANK_IGNORE_DUPLICATES=False,
CLICKBANK_SECRET_KEY='76AFC0778E648BDA05705047BAFA96ED',
ROOT_URLCONF='django_clickbank.urls',
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3','NAME': ':memory:',}},
INSTALLED_APPS=[
'django_clickbank',
'django_nose',
],
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner',
)


def runtests(*test_args):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)

output = call_command('test', verbosity=1, interactive=True)
sys.exit(output)


if __name__ == '__main__':
runtests()
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from setuptools import setup, find_packages
import django_clickbank

setup(
name = "django_clickbank",
version = django_clickbank.__version__,
packages = find_packages(),

author = "Chris Modjeska",
author_email = "[email protected]",
description = "A pluggable application for receiving data from ClickBank's Instant Payment Notifications",
license = "MIT",
keywords = "django clickbank ipn",
url = "https://github.com/sureiya/django_clickbank/",
include_package_data=True,

classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Topic :: Software Development"
],
)
4 changes: 4 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements.txt
nose >= 1.3.0
django-nose >= 1.2
names >= 0.3.0
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py27

[testenv]
commands = python runtests.py
deps = -r{toxinidir}/test-requirements.txt

0 comments on commit 490f061

Please sign in to comment.