]> git.madduck.net Git - etc/vim.git/blob - setup.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

remove obviously unnecessary parentheses (#850)
[etc/vim.git] / setup.py
1 # Copyright (C) 2018 Łukasz Langa
2 import ast
3 import re
4 from setuptools import setup
5 import sys
6
7 assert sys.version_info >= (3, 6, 0), "black requires Python 3.6+"
8 from pathlib import Path  # noqa E402
9
10 CURRENT_DIR = Path(__file__).parent
11
12
13 def get_long_description() -> str:
14     readme_md = CURRENT_DIR / "README.md"
15     with open(readme_md, encoding="utf8") as ld_file:
16         return ld_file.read()
17
18
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))
26
27
28 setup(
29     name="black",
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/python/black",
38     license="MIT",
39     py_modules=["black", "blackd"],
40     packages=["blib2to3", "blib2to3.pgen2"],
41     package_data={"blib2to3": ["*.txt"]},
42     python_requires=">=3.6",
43     zip_safe=False,
44     install_requires=[
45         "click>=6.5",
46         "attrs>=18.1.0",
47         "appdirs",
48         "toml>=0.9.4",
49         "typed-ast>=1.3.1",
50     ],
51     extras_require={"d": ["aiohttp>=3.3.2", "aiohttp-cors"]},
52     test_suite="tests.test_black",
53     classifiers=[
54         "Development Status :: 4 - Beta",
55         "Environment :: Console",
56         "Intended Audience :: Developers",
57         "License :: OSI Approved :: MIT License",
58         "Operating System :: OS Independent",
59         "Programming Language :: Python",
60         "Programming Language :: Python :: 3.6",
61         "Programming Language :: Python :: 3.7",
62         "Programming Language :: Python :: 3 :: Only",
63         "Topic :: Software Development :: Libraries :: Python Modules",
64         "Topic :: Software Development :: Quality Assurance",
65     ],
66     entry_points={
67         "console_scripts": [
68             "black=black:patched_main",
69             "blackd=blackd:patched_main [d]",
70         ]
71     },
72 )