forked from PyCQA/flake8-pyi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (52 loc) · 1.99 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright (C) 2016 Łukasz Langa
import ast
import os
import re
import sys
from setuptools import setup
assert sys.version_info >= (3, 7, 0), "flake8-pyi requires Python 3.7+"
current_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(current_dir, "README.md"), encoding="UTF-8") as ld_file:
long_description = ld_file.read()
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
with open(os.path.join(current_dir, "pyi.py"), "r", encoding="UTF-8") as f:
version = _version_re.search(f.read()).group("version")
version = str(ast.literal_eval(version))
setup(
name="flake8-pyi",
version=version,
description="A plugin for flake8 to enable linting .pyi files.",
long_description=long_description,
long_description_content_type="text/markdown",
keywords="flake8 pyi bugs pyflakes pylint linter qa",
author="Łukasz Langa",
author_email="lukasz@langa.pl",
url="https://github.com/ambv/flake8-pyi",
license="MIT",
py_modules=["pyi"],
zip_safe=False,
python_requires=">=3.7",
install_requires=[
"flake8 >= 3.2.1, < 7.0.0",
"pyflakes >= 2.1.1",
'ast-decompiler >= 0.7.0, < 1.0; python_version < "3.9"',
],
test_suite="tests.test_pyi",
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Framework :: Flake8",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
],
entry_points={"flake8.extension": ["Y0 = pyi:PyiTreeChecker"]},
)