diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 44 |
1 files changed, 16 insertions, 28 deletions
@@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import sys from distutils import log @@ -11,23 +10,21 @@ import sphinx with open('README.rst') as f: long_desc = f.read() -if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 4): - print('ERROR: Sphinx requires at least Python 2.7 or 3.4 to run.') +if sys.version_info < (3, 5): + print('ERROR: Sphinx requires at least Python 3.5 to run.') sys.exit(1) install_requires = [ - 'six>=1.5', 'Jinja2>=2.3', 'Pygments>=2.0', - 'docutils>=0.11', + 'docutils>=0.12', 'snowballstemmer>=1.1', 'babel>=1.3,!=2.0', 'alabaster>=0.7,<0.8', 'imagesize', - 'requests>=2.0.0', + 'requests>=2.5.0', 'setuptools', 'packaging', - 'sphinxcontrib-websupport', ] extras_require = { @@ -35,9 +32,6 @@ extras_require = { ':sys_platform=="win32"': [ 'colorama>=0.3.5', ], - ':python_version<"3.5"': [ - 'typing' - ], 'websupport': [ 'sqlalchemy>=0.9', 'whoosh>=2.0', @@ -49,13 +43,8 @@ extras_require = { 'html5lib', 'flake8>=3.5.0', 'flake8-import-order', - ], - 'test:python_version<"3"': [ - 'enum34', - ], - 'test:python_version>="3"': [ - 'mypy', - 'typed_ast', + 'mypy>=0.470', + 'docutils-stubs', ], } @@ -65,7 +54,7 @@ extras_require = { cmdclass = {} -class Tee(object): +class Tee: def __init__(self, stream): self.stream = stream self.buffer = StringIO() @@ -142,7 +131,7 @@ else: domain + '.js')) for js_file, (locale, po_file) in zip(js_files, po_files): - with open(po_file, 'r') as infile: + with open(po_file) as infile: catalog = read_po(infile, locale) if catalog.fuzzy and not self.use_fuzzy: @@ -162,11 +151,11 @@ else: with open(js_file, 'wt') as outfile: outfile.write('Documentation.addTranslations(') - dump(dict( - messages=jscatalog, - plural_expr=catalog.plural_expr, - locale=str(catalog.locale) - ), outfile, sort_keys=True) + dump({ + 'messages': jscatalog, + 'plural_expr': catalog.plural_expr, + 'locale': str(catalog.locale) + }, outfile, sort_keys=True) outfile.write(');') cmdclass['compile_catalog'] = compile_catalog_plusjs @@ -195,12 +184,11 @@ setup( 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Framework :: Setuptools Plugin', @@ -235,7 +223,7 @@ setup( 'build_sphinx = sphinx.setup_command:BuildDoc', ], }, - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + python_requires=">=3.5", install_requires=install_requires, extras_require=extras_require, cmdclass=cmdclass, |