forked from PWZER/swagger-ui-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
43 lines (32 loc) · 1.23 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
import os
from setuptools import find_packages, setup
DESCRIPTION = 'Swagger UI for Python web framework, such Tornado, Flask, Quart, Sanic and Falcon.'
def load_package_data():
package_data = []
cur_dir = os.path.dirname(os.path.abspath(__file__))
for data_dir in ['static', 'templates']:
for file_name in os.listdir(os.path.join(cur_dir, 'swagger_ui', data_dir)):
package_data.append(data_dir + '/' + file_name)
return {'swagger_ui': package_data}
def readme():
with open('README.md') as f:
return f.read()
def load_requirements():
with open('./requirements.txt') as requirements_file:
return [r.strip() for r in requirements_file.read().split()]
if __name__ == '__main__':
setup(
name='swagger-ui-py',
version='0.4.0-dev',
description=DESCRIPTION,
long_description=readme(),
long_description_content_type='text/markdown',
license='Apache License 2.0',
include_package_data=True,
packages=find_packages(),
package_data=load_package_data(),
install_requires=load_requirements(),
url='https://github.com/PWZER/swagger-ui-py',
author='PWZER',
author_email='[email protected]',
)