Skip to content

Commit

Permalink
Added Travis CI config file. Allow tests to be run via setup. Added tox
Browse files Browse the repository at this point in the history
config file.
  • Loading branch information
strichter committed Mar 6, 2013
1 parent ee40fde commit a1227a0
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__

.installed.cfg
.tox
bin
develop-eggs
dist
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: python
python:
- 2.6
- 2.7
install:
- pip install . --use-mirrors
script:
- python setup.py test -q
notifications:
email: false
File renamed without changes.
5 changes: 5 additions & 0 deletions README.txt → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ format. Like the original implementation, it is based on ReportLab's

You can read all about ``z3c.rml`` and see many examples on how to use it,
see the "RML Reference":http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/rml-reference.pdf?view=auto

Travis: |buildstatus|_

.. |buildstatus| image:: https://api.travis-ci.org/zopefoundation/z3c.rml.png?branch=master
.. _buildstatus: https://travis-ci.org/zopefoundation/z3c.rml
65 changes: 43 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,42 @@
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

def alltests():
import os
import sys
import unittest
# use the zope.testrunner machinery to find all the
# test suites we've put under ourselves
import zope.testrunner.find
import zope.testrunner.options
here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
args = sys.argv[:]
defaults = ["--test-path", here]
options = zope.testrunner.options.get_options(args, defaults)
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)

TESTS_REQUIRE = [
'Pillow',
'coverage',
'zope.pagetemplate',
'zope.testrunner',
]

setup (
name='z3c.rml',
version='2.1.0dev',
author = "Stephan Richter and the Zope Community",
author_email = "zope-dev@zope.org",
description = "An alternative implementation of RML",
author="Stephan Richter and the Zope Community",
author_email="zope-dev@zope.org",
description="An alternative implementation of RML",
long_description=(
read('README.txt')
read('README.rst')
+ '\n\n' +
read('CHANGES.txt')
read('CHANGES.rst')
),
license = "ZPL 2.1",
keywords = "zope3 rml reportlab pdf pagetemplate",
classifiers = [
license="ZPL 2.1",
keywords="zope3 rml reportlab pdf pagetemplate",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
Expand All @@ -43,19 +65,16 @@ def read(*rnames):
'Programming Language :: Python :: Implementation :: CPython',
'Natural Language :: English',
'Operating System :: OS Independent'],
url = 'http://pypi.python.org/pypi/z3c.rml',
packages = find_packages('src'),
package_dir = {'':'src'},
namespace_packages = ['z3c'],
extras_require = dict(
test = [
'coverage',
'zope.pagetemplate',
'Pillow'],
pagetemplate = [
url='http://pypi.python.org/pypi/z3c.rml',
packages=find_packages('src'),
package_dir={'':'src'},
namespace_packages=['z3c'],
extras_require=dict(
test=TESTS_REQUIRE,
pagetemplate=[
'zope.pagetemplate']
),
install_requires = [
install_requires=[
'Pygments',
'lxml',
'pyPdf',
Expand All @@ -65,12 +84,14 @@ def read(*rnames):
'zope.interface',
'zope.schema',
],
entry_points = {
entry_points={
'console_scripts': [
'dtd = z3c.rml.dtd:main',
'reference = z3c.rml.reference:main'],
},
include_package_data = True,
zip_safe = False,
tests_require=TESTS_REQUIRE,
test_suite='__main__.alltests',
include_package_data=True,
zip_safe=False,
)

19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tox]
envlist = py26,py27

[testenv]
commands =
python setup.py test -q
deps =
Pillow
Pygments
coverage
lxml
pyPdf
reportlab
setuptools
svg2rlg
zope.interface
zope.pagetemplate
zope.schema
zope.testrunner

0 comments on commit a1227a0

Please sign in to comment.