pep8 for setup and sphinx conf py files.

This commit is contained in:
Darko Poljak 2016-07-10 11:09:09 +02:00
parent 9b2800b614
commit 356e4b89f8
2 changed files with 77 additions and 72 deletions

View File

@ -15,12 +15,15 @@
import sys import sys
import os import os
import cdist.version
import sphinx_rtd_theme
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../"))) sys.path.insert(0, os.path.abspath(os.path.join(
os.path.dirname(os.path.realpath(__file__)), "../../")))
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
@ -58,7 +61,6 @@ project = 'cdist'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
import cdist.version
version = cdist.version.VERSION version = cdist.version.VERSION
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = version release = version
@ -113,7 +115,6 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme' html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
@ -137,7 +138,8 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# html_logo = None # html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of # The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # the docs. This file should be a Windows icon file (.ico)
# being 16x16 or 32x32
# pixels large. # pixels large.
# html_favicon = None # html_favicon = None
@ -214,7 +216,7 @@ htmlhelp_basename = 'cdistdoc'
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
latex_elements = { # latex_elements = {
# The paper size ('letterpaper' or 'a4paper'). # The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper', # 'papersize': 'letterpaper',
@ -226,7 +228,7 @@ latex_elements = {
# Latex figure (float) alignment # Latex figure (float) alignment
# 'figure_align': 'htbp', # 'figure_align': 'htbp',
} # }
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, # (source start file, target name, title,

View File

@ -3,6 +3,7 @@ import cdist
import os import os
import re import re
def data_finder(data_dir): def data_finder(data_dir):
entries = [] entries = []
for name in os.listdir(data_dir): for name in os.listdir(data_dir):
@ -29,9 +30,10 @@ os.chdir("cdist")
package_data = data_finder("conf") package_data = data_finder("conf")
os.chdir(cur) os.chdir(cur)
setup( setup(
name="cdist", name="cdist",
packages = ["cdist", "cdist.core", "cdist.exec", "cdist.util" ], packages=["cdist", "cdist.core", "cdist.exec", "cdist.util", ],
package_data={'cdist': package_data}, package_data={'cdist': package_data},
scripts=["scripts/cdist"], scripts=["scripts/cdist"],
version=cdist.version.VERSION, version=cdist.version.VERSION,
@ -59,7 +61,8 @@ setup(
], ],
long_description=''' long_description='''
cdist is a usable configuration management system. cdist is a usable configuration management system.
It adheres to the KISS principle and is being used in small up to enterprise grade environments. It adheres to the KISS principle and is being used in small up to
enterprise grade environments.
cdist is an alternative to other configuration management systems like cdist is an alternative to other configuration management systems like
cfengine, bcfg2, chef and puppet. cfengine, bcfg2, chef and puppet.
''' '''