All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # Copyright (C) 2018 Łukasz Langa
4 from setuptools import setup
7 assert sys.version_info >= (3, 6, 0), "black requires Python 3.6+"
8 from pathlib import Path # noqa E402
10 CURRENT_DIR = Path(__file__).parent
13 def get_long_description() -> str:
14 readme_md = CURRENT_DIR / "README.md"
15 with open(readme_md, encoding="utf8") as ld_file:
19 def get_version() -> str:
20 black_py = CURRENT_DIR / "black.py"
21 _version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
22 with open(black_py, "r", encoding="utf8") as f:
23 match = _version_re.search(f.read())
24 version = match.group("version") if match is not None else '"unknown"'
25 return str(ast.literal_eval(version))
30 version=get_version(),
31 description="The uncompromising code formatter.",
32 long_description=get_long_description(),
33 long_description_content_type="text/markdown",
34 keywords="automation formatter yapf autopep8 pyfmt gofmt rustfmt",
35 author="Łukasz Langa",
36 author_email="lukasz@langa.pl",
37 url="https://github.com/ambv/black",
40 packages=["blib2to3", "blib2to3.pgen2"],
41 package_data={"blib2to3": ["*.txt"]},
42 python_requires=">=3.6",
44 install_requires=["click>=6.5", "attrs>=17.4.0", "appdirs", "toml>=0.9.4"],
45 test_suite="tests.test_black",
47 "Development Status :: 4 - Beta",
48 "Environment :: Console",
49 "Intended Audience :: Developers",
50 "License :: OSI Approved :: MIT License",
51 "Operating System :: OS Independent",
52 "Programming Language :: Python",
53 "Programming Language :: Python :: 3.6",
54 "Programming Language :: Python :: 3 :: Only",
55 "Topic :: Software Development :: Libraries :: Python Modules",
56 "Topic :: Software Development :: Quality Assurance",
58 entry_points={"console_scripts": ["black=black:main"]},