Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

Commit

Permalink
toxify
Browse files Browse the repository at this point in the history
  • Loading branch information
lvh committed Dec 23, 2013
1 parent 1dfbd9f commit 5b83f26
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
9 changes: 9 additions & 0 deletions requirements-testing.txt
@@ -0,0 +1,9 @@
# Test coverage
coverage

# Debugging niceties
pudb
ipython

# Packaging QA
pyroma
1 change: 1 addition & 0 deletions requirements.txt
@@ -0,0 +1 @@
twisted==13.2.0
52 changes: 52 additions & 0 deletions setup.py
@@ -0,0 +1,52 @@
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

packageName = "stanczyk"

import re
versionLine = open("{0}/_version.py".format(packageName), "rt").read()
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", versionLine, re.M)
versionString = match.group(1)

class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_suite = True

def run_tests(self):
#import here, cause outside the eggs aren't loaded
import tox
sys.exit(tox.cmdline([]))

setup(name=packageName,
version=versionString,
description='Client software for the exercises in Crypto 101, the '
'introductory book on cryptography.',
long_description=open("README.rst").read(),
url='https://github.com/crypto101/' + packageName,

author='Laurens Van Houtven',
author_email='_@lvh.io',

packages=find_packages(),
test_suite=packageName + ".test",
cmdclass={'test': Tox},
zip_safe=True,

license='ISC',
keywords="crypto urwid twisted",
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Framework :: Twisted",
"Intended Audience :: Education",
"License :: OSI Approved :: ISC License (ISCL)",
"Programming Language :: Python :: 2 :: Only",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Education",
"Topic :: Games/Entertainment",
"Topic :: Security :: Cryptography",
]
)
16 changes: 16 additions & 0 deletions tox.ini
@@ -0,0 +1,16 @@
[tox]
envlist = py27

[testenv]
deps =
-rrequirements.txt
-rrequirements-testing.txt
commands =
coverage run \
{envdir}/bin/trial --temp-directory={envdir}/_trial \
{posargs:stanczyk}

coverage report --show-missing
coverage html --directory {envdir}/coverage

pyroma .

0 comments on commit 5b83f26

Please sign in to comment.