use conditional requirements to ensure "chardet" listed as requirement on Python 3 (fixes #213)
Previously "chardet" was added only added when setup.py was run with Python 3. However wheels contain a static list of requirements and a wheel-based install will never execute setup.py at installation time. pdfminer.six uses universal wheels for Python 2 and Python 3 so the requirements will always be wrong on one version (see #213). The solution is to use conditional requirements as specified in PEP 496 which are evaluated at installation time.pull/219/head
parent
b6a5848208
commit
5ff84b83fb
4
setup.py
4
setup.py
|
@ -3,9 +3,7 @@ import sys
|
||||||
|
|
||||||
import pdfminer as package
|
import pdfminer as package
|
||||||
|
|
||||||
requires = ['six', 'pycryptodome', 'sortedcontainers']
|
requires = ['six', 'pycryptodome', 'sortedcontainers', 'chardet ; python_version > "3.0"']
|
||||||
if sys.version_info >= (3, 0):
|
|
||||||
requires.append('chardet')
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pdfminer.six',
|
name='pdfminer.six',
|
||||||
|
|
Loading…
Reference in New Issue