Refactor setup requirements
parent
02b72c466e
commit
74fcd47047
|
|
@ -1,4 +1,6 @@
|
|||
node_modules/
|
||||
testproj/db.sqlite3
|
||||
.vscode/
|
||||
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Python template
|
||||
|
|
@ -156,5 +158,3 @@ com_crashlytics_export_strings.xml
|
|||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
testproj/db\.sqlite3
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ Features
|
|||
- customization hooks at all points in the spec generation process
|
||||
- JSON and YAML format for spec
|
||||
- bundles latest version of
|
||||
`swagger-ui <https://github.com/swagger-api/swagger-ui>`__ and
|
||||
`redoc <https://github.com/Rebilly/ReDoc>`__ for viewing the generated documentation
|
||||
`swagger-ui <https://github.com/swagger-api/swagger-ui>`_ and
|
||||
`redoc <https://github.com/Rebilly/ReDoc>`_ for viewing the generated documentation
|
||||
- schema view is cacheable out of the box
|
||||
- generated Swagger schema can be automatically validated by
|
||||
`swagger-spec-validator <https://github.com/Yelp/swagger_spec_validator>`__ or
|
||||
`flex <https://github.com/pipermerriam/flex>`__
|
||||
`swagger-spec-validator <https://github.com/Yelp/swagger_spec_validator>`_ or
|
||||
`flex <https://github.com/pipermerriam/flex>`_
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/axnsan12/drf-yasg/1.0.2/screenshots/redoc-nested-response.png
|
||||
:width: 100%
|
||||
|
|
|
|||
|
|
@ -199,8 +199,6 @@ nitpick_ignore = [
|
|||
('py:obj', 'APIView'),
|
||||
]
|
||||
|
||||
# TODO: inheritance aliases in sphinx 1.7
|
||||
|
||||
# even though the package should be already installed, the sphinx build on RTD
|
||||
# for some reason needs the sources dir to be in the path in order for viewcode to work
|
||||
sys.path.insert(0, os.path.abspath('../src'))
|
||||
|
|
|
|||
|
|
@ -7,5 +7,4 @@ isort>=4.2
|
|||
flake8>=3.5.0
|
||||
flake8-isort>=2.3
|
||||
|
||||
# do not unpin this (see setup.py)
|
||||
setuptools_scm==1.15.6
|
||||
-r setup.txt
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
# requirements for building the distributable package
|
||||
|
||||
# do not unpin this (see setup.py)
|
||||
setuptools_scm==1.15.6
|
||||
25
setup.py
25
setup.py
|
|
@ -6,7 +6,18 @@ import os
|
|||
import sys
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
requirements_setup = ['setuptools_scm==1.15.6']
|
||||
|
||||
def read_req(req_file):
|
||||
with open(os.path.join('requirements', req_file)) as req:
|
||||
return [line for line in req.readlines() if line and not line.isspace()]
|
||||
|
||||
|
||||
with io.open('README.rst', encoding='utf-8') as readme:
|
||||
description = readme.read()
|
||||
|
||||
requirements = ['djangorestframework>=3.7.0'] + read_req('base.txt')
|
||||
requirements_setup = read_req('setup.txt')
|
||||
requirements_validation = read_req('validation.txt')
|
||||
|
||||
|
||||
def _install_setup_requires(attrs):
|
||||
|
|
@ -40,18 +51,6 @@ if 'sdist' in sys.argv:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def read_req(req_file):
|
||||
with open(os.path.join('requirements', req_file)) as req:
|
||||
return [line for line in req.readlines() if line and not line.isspace()]
|
||||
|
||||
|
||||
with io.open('README.rst', encoding='utf-8') as readme:
|
||||
description = readme.read()
|
||||
|
||||
requirements = ['djangorestframework>=3.7.0'] + read_req('base.txt')
|
||||
requirements_validation = read_req('validation.txt')
|
||||
|
||||
setup(
|
||||
name='drf-yasg',
|
||||
use_scm_version=True,
|
||||
|
|
|
|||
Loading…
Reference in New Issue