-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathconstants.py
50 lines (44 loc) · 988 Bytes
/
constants.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
# List of version control systems we support.
VCS_LIST = ("git", "svn", "hg", "bzr")
SCHEME_LIST = ("http://", "https://", "ftp://", "ftps://", "file://")
FALSE_VALUES = ("0", "false", "no", "off")
TRUE_VALUES = ("1", "true", "yes", "on")
REMOTE_FILE_SCHEMES = [
"http",
"https",
"ftp",
]
VCS_SCHEMES = [
"git+http",
"git+https",
"git+ssh",
"git+git",
"hg+http",
"hg+https",
"hg+ssh",
"svn+http",
"svn+https",
"svn+svn",
"bzr+http",
"bzr+https",
"bzr+ssh",
"bzr+sftp",
"bzr+ftp",
"bzr+lp",
]
REMOTE_SCHEMES = REMOTE_FILE_SCHEMES + VCS_SCHEMES
RELEVANT_PROJECT_FILES = (
"METADATA",
"PKG-INFO",
"setup.py",
"setup.cfg",
"pyproject.toml",
)
INSTALLABLE_EXTENSIONS = (".whl", ".zip", ".tar", ".tar.gz", ".tgz")
def is_type_checking():
try:
from typing import TYPE_CHECKING
except ImportError:
return False
return TYPE_CHECKING
MYPY_RUNNING = is_type_checking()