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():
14 readme_md = CURRENT_DIR / 'README.md'
17 return pypandoc.convert_file(str(readme_md), 'rst')
19 except (IOError, ImportError):
22 '\x1b[31m\x1b[1mwarning:\x1b[0m\x1b[31m pandoc not found, '
23 'long description will be ugly (PyPI does not support .md).'
27 with open(readme_md, encoding='utf8') as ld_file:
32 black_py = CURRENT_DIR / 'black.py'
33 _version_re = re.compile(r'__version__\s+=\s+(?P<version>.*)')
34 with open(black_py, 'r', encoding='utf8') as f:
35 version = _version_re.search(f.read()).group('version')
36 return str(ast.literal_eval(version))
41 version=get_version(),
42 description="The uncompromising code formatter.",
43 long_description=get_long_description(),
44 keywords='automation formatter yapf autopep8 pyfmt gofmt rustfmt',
45 author='Łukasz Langa',
46 author_email='lukasz@langa.pl',
47 url='https://github.com/ambv/black',
50 packages=['blib2to3', 'blib2to3.pgen2'],
51 package_data={'blib2to3': ['*.txt']},
52 python_requires=">=3.6",
54 install_requires=['click', 'attrs'],
55 test_suite='tests.test_black',
57 'Development Status :: 3 - Alpha',
58 'Environment :: Console',
59 'Intended Audience :: Developers',
60 'License :: OSI Approved :: MIT License',
61 'Operating System :: OS Independent',
62 'Programming Language :: Python',
63 'Programming Language :: Python :: 3.6',
64 'Programming Language :: Python :: 3 :: Only',
65 'Topic :: Software Development :: Libraries :: Python Modules',
66 'Topic :: Software Development :: Quality Assurance',
68 entry_points={'console_scripts': ['black=black:main']},