mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-16 09:09:52 +00:00
Working for both 2 and 3
This commit is contained in:
parent
1d7a5690a3
commit
89cbe0f729
2 changed files with 31 additions and 22 deletions
30
setup.cfg
30
setup.cfg
|
|
@ -3,7 +3,6 @@ universal = 1
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = flake8
|
name = flake8
|
||||||
version = attr: src.flake8.__version__
|
|
||||||
license = MIT
|
license = MIT
|
||||||
license_file = LICENSE
|
license_file = LICENSE
|
||||||
description = the modular source code checker: pep8 pyflakes and co
|
description = the modular source code checker: pep8 pyflakes and co
|
||||||
|
|
@ -47,29 +46,16 @@ classifiers =
|
||||||
[options]
|
[options]
|
||||||
package_dir=
|
package_dir=
|
||||||
=src
|
=src
|
||||||
packages = find:
|
packages =
|
||||||
|
flake8
|
||||||
|
flake8.api
|
||||||
|
flake8.formatting
|
||||||
|
flake8.main
|
||||||
|
flake8.options
|
||||||
|
flake8.plugins
|
||||||
|
|
||||||
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
||||||
|
|
||||||
# # We document the reasoning for using ranges here:
|
|
||||||
# # http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies
|
|
||||||
# # And in which releases we will update those ranges here:
|
|
||||||
# # http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
|
|
||||||
|
|
||||||
# install_requires =
|
|
||||||
# entrypoints >= 0.3.0, < 0.4.0
|
|
||||||
# pyflakes >= 2.1.0, < 2.2.0
|
|
||||||
# pycodestyle >= 2.5.0, < 2.6.0
|
|
||||||
# mccabe >= 0.6.0, < 0.7.0
|
|
||||||
|
|
||||||
[options.packages.find]
|
|
||||||
where=src
|
|
||||||
|
|
||||||
# [options.extras_require]
|
|
||||||
# enum34=enum34; python_version<"3.4"
|
|
||||||
# typing=typing; python_version<"3.5"
|
|
||||||
# configparser=configparser; python_version<"3.2"
|
|
||||||
# functools32=functools32; python_version<"3.2"
|
|
||||||
|
|
||||||
[mypy]
|
[mypy]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_any_generics = true
|
disallow_any_generics = true
|
||||||
|
|
|
||||||
23
setup.py
23
setup.py
|
|
@ -11,6 +11,26 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) # noqa
|
||||||
|
|
||||||
import flake8
|
import flake8
|
||||||
|
|
||||||
|
# NOTE(sigmavirus24): When updating these requirements, update them in
|
||||||
|
# setup.cfg as well.
|
||||||
|
requires = [
|
||||||
|
# We document the reasoning for using ranges here:
|
||||||
|
# http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies
|
||||||
|
# And in which releases we will update those ranges here:
|
||||||
|
# http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
|
||||||
|
"entrypoints >= 0.3.0, < 0.4.0",
|
||||||
|
"pyflakes >= 2.1.0, < 2.2.0",
|
||||||
|
"pycodestyle >= 2.5.0, < 2.6.0",
|
||||||
|
"mccabe >= 0.6.0, < 0.7.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
extras_require = {
|
||||||
|
":python_version<'3.4'": ['enum34'],
|
||||||
|
":python_version<'3.5'": ['typing'],
|
||||||
|
":python_version<'3.2'": ['configparser', 'functools32'],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if int(setuptools.__version__.split('.')[0]) < 18:
|
if int(setuptools.__version__.split('.')[0]) < 18:
|
||||||
extras_require = {}
|
extras_require = {}
|
||||||
|
|
@ -25,6 +45,9 @@ PEP8_PLUGIN = functools.partial(_FORMAT.format, PEP8)
|
||||||
|
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
|
version=flake8.__version__,
|
||||||
|
install_requires=requires,
|
||||||
|
extras_require=extras_require,
|
||||||
entry_points={
|
entry_points={
|
||||||
'distutils.commands': [
|
'distutils.commands': [
|
||||||
'flake8 = flake8.main.setuptools_command:Flake8'
|
'flake8 = flake8.main.setuptools_command:Flake8'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue