forked from Instagram/LibCST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
75 lines (67 loc) · 2.41 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
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib.util
from os import path
from typing import TYPE_CHECKING
import setuptools
if TYPE_CHECKING:
from importlib.machinery import ModuleSpec
from types import ModuleType
# Grab the readme so that our package stays in sync with github.
this_directory: str = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
# Grab the version constant so that libcst.tool stays in sync with this package.
spec: "ModuleSpec" = importlib.util.spec_from_file_location(
"version", path.join(this_directory, "libcst/_version.py")
)
version: "ModuleType" = importlib.util.module_from_spec(spec)
# pyre-ignore Pyre doesn't know about importlib entirely.
spec.loader.exec_module(version)
# pyre-ignore Pyre has no way of knowing that this constant exists.
LIBCST_VERSION = version.LIBCST_VERSION
setuptools.setup(
name="libcst",
description="A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7 and 3.8 programs.",
long_description=long_description,
long_description_content_type="text/x-rst",
version=LIBCST_VERSION,
url="https://github.com/Instagram/LibCST",
license="MIT",
packages=setuptools.find_packages(),
package_data={"libcst": ["py.typed"]},
test_suite="libcst",
python_requires=">=3.6",
install_requires=[
"dataclasses; python_version < '3.7'",
"typing_extensions >= 3.7.2",
"typing_inspect >= 0.4.0",
"pyyaml >= 5.2",
],
extras_require={
"dev": [
"black",
"codecov",
"coverage",
"hypothesis >= 4.36.0",
"hypothesmith >= 0.0.4",
"isort",
"flake8",
"jupyter",
"nbsphinx",
"pyre-check",
"Sphinx",
"sphinx-rtd-theme",
]
},
classifiers=[
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
zip_safe=False, # for mypy compatibility https://mypy.readthedocs.io/en/latest/installed_packages.html
)