Only define dependencies in setup.py (#306)

Fixes #299. Closes #300.

Changed: define dependencies in setup.py using install_requires and extra_requires. 
Added: section to CONTRIBUTE.md for initial dev setup.
pull/307/head
Hugo van Kemenade 2019-10-20 12:41:31 +03:00 committed by Pieter Marsman
parent 9fd7172f7b
commit 12bba5b5f7
4 changed files with 29 additions and 17 deletions

View File

@ -5,9 +5,6 @@ python:
- "3.5" - "3.5"
- "3.6" - "3.6"
install: install:
- pip install six - pip install tox-travis
- pip install pycryptodome
- pip install chardet
- pip install sortedcontainers
script: script:
nosetests --nologcapture - tox

View File

@ -30,3 +30,20 @@ Any contribution is appreciated! You might want to:
* Code changes should conform to PEP8 coding style (with a line-width of 120). Existing code may stay as it is. * 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. * New features should be well documented using docstrings.
* Check spelling and grammar. * 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
```

View File

@ -1,16 +1,19 @@
from setuptools import setup from setuptools import setup
import sys
import pdfminer as package import pdfminer as package
requires = ['six', 'pycryptodome', 'sortedcontainers', 'chardet ; python_version > "3.0"']
setup( setup(
name='pdfminer.six', name='pdfminer.six',
version=package.__version__, version=package.__version__,
packages=['pdfminer'], packages=['pdfminer'],
package_data={'pdfminer': ['cmap/*.pickle.gz']}, 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', description='PDF parser and analyzer',
long_description=package.__doc__, long_description=package.__doc__,
license='MIT/X', license='MIT/X',

View File

@ -1,11 +1,6 @@
[tox] [tox]
envlist = py26,py27,py34,py35,py36 envlist = py{26, 27, 34, 35, 36}
[testenv] [testenv]
extras = dev
commands = nosetests --nologcapture commands = nosetests --nologcapture
deps =
six
pycryptodome
chardet
nose
sortedcontainers