diff --git a/.travis.yml b/.travis.yml index 0ec2b91..7a04577 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,6 @@ python: - "3.5" - "3.6" install: - - pip install six - - pip install pycryptodome - - pip install chardet - - pip install sortedcontainers + - pip install tox-travis script: - nosetests --nologcapture + - tox diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2680c2..5b6676c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,4 +29,21 @@ Any contribution is appreciated! You might want to: * Code should work for Python 2.7 and Python 3.x (for now). * Code changes should conform to PEP8 coding style (with a line-width of 120). Existing code may stay as it is. * New features should be well documented using docstrings. -* Check spelling and grammar. \ No newline at end of file +* Check spelling and grammar. + +## Dev setup + +```sh +# Clone the repo +git clone https://github.com/pdfminer/pdfminer.six +cd pdfminer.six + +# Install dev dependencies +pip install -e .[dev] + +# Run tests on all Python versions +tox + +# Run tests on a single version +tox -e py36 +``` diff --git a/setup.py b/setup.py index 404c308..a13e4da 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,19 @@ from setuptools import setup -import sys import pdfminer as package -requires = ['six', 'pycryptodome', 'sortedcontainers', 'chardet ; python_version > "3.0"'] - setup( name='pdfminer.six', version=package.__version__, packages=['pdfminer'], package_data={'pdfminer': ['cmap/*.pickle.gz']}, - install_requires=requires, + install_requires=[ + 'chardet ; python_version > "3.0"', + 'pycryptodome', + 'six', + 'sortedcontainers', + ], + extras_require={"dev": ["nose", "tox"]}, description='PDF parser and analyzer', long_description=package.__doc__, license='MIT/X', diff --git a/tox.ini b/tox.ini index d0e167b..09c7f80 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,6 @@ [tox] -envlist = py26,py27,py34,py35,py36 +envlist = py{26, 27, 34, 35, 36} [testenv] +extras = dev commands = nosetests --nologcapture -deps = - six - pycryptodome - chardet - nose - sortedcontainers