Navigation Menu

Skip to content

Commit

Permalink
Refactor for nicer test setup.
Browse files Browse the repository at this point in the history
``python setup.py test`` works out of the box.
Added tox.ini.
  • Loading branch information
fschulze committed Aug 19, 2014
1 parent e72a86e commit 7403bfe
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,3 @@
include CHANGES.txt
include README.rst
include README.txt
36 changes: 20 additions & 16 deletions setup.py
Expand Up @@ -24,30 +24,33 @@
long_description = "\n\n".join((README, CHANGES))
long_description = long_description.decode('utf-8')

install_requires =[
requires = [
'setuptools',
'Chameleon >= 2.7',
'zope.interface',
'zope.component',
'zope.configuration',
'zope.testing',
'pyramid >= 1.4',
'pyramid_zcml >= 0.9.2',
]

tests_require = []
docs_extras = [
'Sphinx',
'docutils',
'repoze.sphinx.autointerface']

testing_extras = [
'manuel',
'coverage',
'nose',
'zope.testing>3.8.7',
'zope.component>3.9.2']

if sys.platform == "darwin":
tests_require.append("MacFSEvents")
testing_extras.append("MacFSEvents")

if sys.platform.startswith("linux"):
tests_require.append("pyinotify")

tests_require = install_requires + [
'manuel',
'zope.testing>3.8.7',
'zope.component>3.9.2',
] + tests_require
testing_extras.append("pyinotify")

setup(name='pyramid_skins',
version = '1.1',
Expand Down Expand Up @@ -75,10 +78,11 @@
namespace_packages=[],
include_package_data = True,
zip_safe = False,
install_requires=install_requires,
tests_require = tests_require,
extras_require = {
'tests': [dep.split('==')[0] for dep in tests_require],
},
install_requires=requires,
tests_require=testing_extras,
extras_require={
'testing': testing_extras,
'docs': docs_extras,
'development': testing_extras + docs_extras},
test_suite="pyramid_skins.tests",
)
13 changes: 13 additions & 0 deletions tox.ini
@@ -0,0 +1,13 @@
[tox]
envlist =
py27,pyramid14

[testenv]
commands =
pip install pyramid_skins[testing]
nosetests

[testenv:pyramid14]
basepython = python2.7
deps =
pyramid>=1.4,<1.5

0 comments on commit 7403bfe

Please sign in to comment.