forked from PWZER/swagger-ui-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
49 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
ignore = E402,W504 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Python Package using Conda | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint-and-pytest: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: python setup.py install | ||
- run: pip install flask8 pytest requests uvicorn tornado flask falcon aiohttp bottle sanic quart starlette | ||
- run: flask8 | ||
- run: pytest -s test/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,32 @@ | ||
import os | ||
import platform | ||
from pathlib import Path | ||
|
||
from setuptools import find_packages, setup | ||
from distutils.version import StrictVersion | ||
|
||
|
||
DESCRIPTION = 'Swagger UI for Python web framework, such Tornado, Flask, Quart, Sanic and Falcon.' | ||
|
||
cur_dir = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
|
||
def load_package_data(): | ||
package_data = [] | ||
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(os.path.join(cur_dir, 'requirements.txt')) as requirements_file: | ||
return [r.strip() for r in requirements_file.read().split()] | ||
|
||
|
||
if __name__ == '__main__': | ||
if StrictVersion(platform.python_version()) < StrictVersion('3.0.0'): | ||
raise Exception("`swagger-ui-py` support python version >= 3.0.0 only.") | ||
|
||
setup( | ||
name='swagger-ui-py', | ||
version='21.09.28', | ||
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=[ | ||
"jinja2>=2.0", | ||
"PyYaml>=5.0", | ||
], | ||
tests_requires=[ | ||
], | ||
url='https://github.com/PWZER/swagger-ui-py', | ||
author='PWZER', | ||
author_email='pwzergo@gmail.com', | ||
) | ||
if StrictVersion(platform.python_version()) < StrictVersion('3.0.0'): | ||
raise Exception("`swagger-ui-py` support python version >= 3.0.0 only.") | ||
|
||
setup( | ||
name='swagger-ui-py', | ||
version='21.09.28', | ||
description=( | ||
'Swagger UI for Python web framework, ' | ||
'such as Tornado, Flask, Quart, Sanic and Falcon.' | ||
), | ||
long_description=Path(__file__).parent.joinpath('README.md').read_text(), | ||
long_description_content_type='text/markdown', | ||
license='Apache License 2.0', | ||
packages=find_packages(), | ||
package_data={ | ||
'swagger_ui': ['static/*', 'templates/*'], | ||
}, | ||
install_requires=[ | ||
"jinja2>=2.0", | ||
"PyYaml>=5.0", | ||
], | ||
url='https://github.com/PWZER/swagger-ui-py', | ||
author='PWZER', | ||
author_email='pwzergo@gmail.com', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters