Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
py35, appveyor artifacts, more
Browse files Browse the repository at this point in the history
  • Loading branch information
Robpol86 committed Nov 3, 2015
1 parent 9148bc4 commit e6b3e1c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 48 deletions.
15 changes: 10 additions & 5 deletions .travis.yml
Expand Up @@ -2,16 +2,21 @@ language: python

sudo: false

addons:
apt:
sources:
- deadsnakes
packages:
- python3.5

install:
- pip install coveralls tox
- pip install appveyor-artifacts coveralls tox

script:
- tox -e lint,py34,py33,pypy3,pypy,py27,py26
- tox -e lint,py35,py34,py33,pypy3,pypy,py27,py26

after_success:
- pip install git+git://github.com/Robpol86/appveyor-artifacts.git
- mv .coverage .coverage.travis
- appveyor-artifacts -m download
- ls .coverage .coverage.travis
- appveyor-artifacts -mi download
- coverage combine
- coveralls
10 changes: 5 additions & 5 deletions README.rst
Expand Up @@ -4,7 +4,7 @@ terminaltables

Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.

* Python 2.6, 2.7, PyPy, PyPy3, 3.3, and 3.4 supported on Linux and OS X.
* Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.
* Python 2.7, 3.3, and 3.4 supported on Windows (both 32 and 64 bit versions of Python).

.. image:: https://img.shields.io/appveyor/ci/Robpol86/terminaltables/master.svg?style=flat-square&label=AppVeyor%20CI
Expand All @@ -15,16 +15,16 @@ Easily draw tables in terminal/console applications from a list of lists of stri
:target: https://travis-ci.org/Robpol86/terminaltables
:alt: Build Status

.. image:: https://img.shields.io/codecov/c/github/Robpol86/terminaltables/master.svg?style=flat-square&label=Codecov
:target: https://codecov.io/github/Robpol86/terminaltables
.. image:: https://img.shields.io/coveralls/Robpol86/terminaltables/master.svg?style=flat-square&label=Coveralls
:target: https://coveralls.io/github/Robpol86/terminaltables
:alt: Coverage Status

.. image:: https://img.shields.io/pypi/v/terminaltables.svg?style=flat-square&label=Latest
:target: https://pypi.python.org/pypi/terminaltables/
:target: https://pypi.python.org/pypi/terminaltables
:alt: Latest Version

.. image:: https://img.shields.io/pypi/dm/terminaltables.svg?style=flat-square&label=PyPI%20Downloads
:target: https://pypi.python.org/pypi/terminaltables/
:target: https://pypi.python.org/pypi/terminaltables
:alt: Downloads

Quickstart
Expand Down
35 changes: 1 addition & 34 deletions setup.py
Expand Up @@ -5,42 +5,10 @@

import codecs
import os
import sys
from distutils import core

from setuptools import setup


class DumpRequirements(core.Command):
"""Write requirements.txt file for tox."""

description = 'Write requirements.txt file for tox.'
user_options = [('outfile=', 'o', 'File path to write to or stderr if "-".')]

def initialize_options(self):
"""Required by distutils. Using setattr() instead of self. due to PyCharm inspections."""
setattr(self, 'outfile', None)

def finalize_options(self):
"""Required by distutils."""
outfile = os.path.realpath(getattr(self, 'outfile') or 'requirements.txt')
setattr(self, 'outfile', outfile)

def run(self):
"""Write to file or standard err (distutils pollutes stdout)."""
dist = getattr(core, '_setup_distribution')
requirements = '\n'.join(sorted(set(dist.install_requires + dist.tests_require)))
outfile = getattr(self, 'outfile')
if outfile.endswith('-'):
return print(requirements, file=sys.stderr)
try:
with open(outfile, 'w') as handle:
handle.write(requirements)
except IOError:
raise SystemExit('Unable to write to {0}'.format(outfile))
print('Wrote to {0}'.format(outfile))


def safe_read(path):
"""Try to read file or return empty string if failed.
Expand Down Expand Up @@ -77,20 +45,19 @@ def safe_read(path):
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries',
'Topic :: Terminals',
'Topic :: Text Processing :: Markup',
],
cmdclass=dict(requirements=DumpRequirements),
description='Generate simple tables in terminals from a nested list of strings.',
install_requires=[],
keywords='Shell Bash ANSI ASCII terminal tables',
license='MIT',
long_description=safe_read('README.rst'),
name='terminaltables',
packages=['terminaltables'],
tests_require=['colorclass', 'pytest-cov'],
url='https://github.com/Robpol86/terminaltables',
version='2.0.0',
zip_safe=True,
Expand Down
11 changes: 7 additions & 4 deletions tox.ini
Expand Up @@ -3,9 +3,11 @@ envlist = lint,py{34,27,26}

[testenv]
commands =
py.test --cov-append --cov-report term-missing --cov terminaltables --cov-config tox.ini {posargs:tests}
py.test --cov-append --cov-report term-missing --cov-report xml --cov terminaltables --cov-config tox.ini \
{posargs:tests}
deps =
-r{toxworkdir}/requirements.txt
colorclass
pytest-cov
py26: subprocess32
usedevelop = True

Expand All @@ -27,7 +29,6 @@ commands =
python setup.py check --strict
python setup.py check --strict -m
python setup.py check --strict -s
python setup.py requirements -o {toxworkdir}/requirements.txt
flake8
pylint --rcfile=tox.ini setup.py terminaltables
deps =
Expand Down Expand Up @@ -56,6 +57,8 @@ ignore = .tox/*,build/*,docs/*,env/*,get-pip.py
disable =
locally-disabled,
no-init,
no-name-in-module,
too-few-public-methods,
too-many-instance-attributes,

[run]
branch = True

0 comments on commit e6b3e1c

Please sign in to comment.