Clean up for publish to pypi

This commit is contained in:
Cristi Vîjdea
2017-12-12 22:56:35 +01:00
parent 8883894775
commit 71b3fd2895
7 changed files with 56 additions and 26 deletions
+8 -6
View File
@@ -7,6 +7,7 @@ import os
import sys
import sphinx_rtd_theme
from pkg_resources import get_distribution
# -- General configuration ------------------------------------------------
@@ -39,11 +40,12 @@ author = 'Cristi V.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
release = get_distribution('drf_swagger').version
# The short X.Y.Z version.
version = '.'.join(release.split('.')[:3])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -194,11 +196,11 @@ nitpick_ignore = [
sys.path.insert(0, os.path.abspath('../testproj'))
os.putenv('DJANGO_SETTINGS_MODULE', 'testproj.settings')
from django.conf import settings
from django.conf import settings # noqa: E402
settings.configure()
import drf_swagger.views
import drf_swagger.views # noqa: E402
# instantiate a SchemaView in the views module to make it available to autodoc
drf_swagger.views.SchemaView = drf_swagger.views.get_schema_view(None)