-
-
Notifications
You must be signed in to change notification settings - Fork 120
/
setup.py
69 lines (61 loc) · 2.21 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
import os
from typing import List
from setuptools import find_packages, setup
def find_stub_files(name: str) -> List[str]:
result = []
for root, _dirs, files in os.walk(name):
for file in files:
if file.endswith(".pyi"):
if os.path.sep in root:
sub_root = root.split(os.path.sep, 1)[-1]
file = os.path.join(sub_root, file)
result.append(file)
return result
with open("README.md") as f:
readme = f.read()
dependencies = [
"django-stubs>=5.0.4",
"typing-extensions>=3.10.0",
"requests>=2.0.0",
"types-requests>=0.1.12",
"types-PyYAML>=5.4.3",
]
# Keep compatible-mypy major.minor version pinned to what latest django-stubs release uses.
extras_require = {
"compatible-mypy": ["mypy>=1.12,<1.14", "django-stubs[compatible-mypy]"],
"coreapi": ["coreapi>=2.0.0"],
"markdown": ["types-Markdown>=0.1.5"],
}
setup(
name="djangorestframework-stubs",
version="3.15.1",
description="PEP-484 stubs for django-rest-framework",
long_description=readme,
long_description_content_type="text/markdown",
url="https://github.com/typeddjango/djangorestframework-stubs",
author="Maksim Kurnikov",
author_email="[email protected]",
maintainer="Marti Raudsepp",
maintainer_email="[email protected]",
license="MIT",
install_requires=dependencies,
extras_require=extras_require,
packages=["rest_framework-stubs", *find_packages(exclude=["scripts"])],
package_data={"rest_framework-stubs": find_stub_files("rest_framework-stubs")},
python_requires=">=3.8",
classifiers=[
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
"Framework :: Django",
],
project_urls={
"Release notes": "https://github.com/typeddjango/djangorestframework-stubs/releases",
"Funding": "https://github.com/sponsors/typeddjango",
},
)