-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
61 lines (53 loc) · 1.63 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
#!/usr/bin/env python
import os
import re
from pathlib import Path
from codecs import open
from setuptools import find_packages, setup
here = Path(__file__).parent
# Load the package metadata from the __init__.py file as a dictionary.
pkg = {}
with open(here / 'fastapi_rfc7807' / '__init__.py', 'r', 'utf-8') as f:
pkg = {k: v for k, v in re.findall(r"^(__\w+__) = \'(.+)\'", f.read(), re.M)}
# Load the README
readme = ''
if os.path.exists(here / 'README.md'):
with open(here / 'README.md', 'r', 'utf-8') as f:
readme = f.read()
setup(
name=pkg['__title__'],
version=pkg['__version__'],
description=pkg['__description__'],
license=pkg['__license__'],
long_description=readme,
long_description_content_type='text/markdown',
url=pkg['__url__'],
author=pkg['__author__'],
author_email=pkg['__author_email__'],
packages=find_packages(),
package_data={
'': ['LICENSE'],
'fastapi_rfc7807': ['py.typed'],
},
include_package_data=True,
python_requires='>=3.6',
install_requires=[
'fastapi',
'starlette',
'pydantic',
],
keywords=[
'fastapi', 'errors', 'middleware', 'rfc7807',
],
classifiers=[
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
],
zip_safe=False,
)