mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes #2032
When following the steps in the Github contributor wiki flake8 reports PEP8 violation against setup.py and docs/conf.py.
This commit is contained in:
parent
b2231c40f7
commit
aa2c84a59c
2 changed files with 26 additions and 23 deletions
23
docs/conf.py
23
docs/conf.py
|
|
@ -1,16 +1,19 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from pelican import __version__
|
||||||
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.pardir))
|
sys.path.append(os.path.abspath(os.pardir))
|
||||||
|
|
||||||
from pelican import __version__
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.extlinks']
|
extensions = ['sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.ifconfig',
|
||||||
|
'sphinx.ext.extlinks']
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = 'Pelican'
|
project = 'Pelican'
|
||||||
|
|
@ -30,7 +33,7 @@ extlinks = {
|
||||||
'pelican-doc': ('http://docs.getpelican.com/%s/', '')
|
'pelican-doc': ('http://docs.getpelican.com/%s/', '')
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Options for HTML output ---------------------------------------------------
|
# -- Options for HTML output --------------------------------------------------
|
||||||
|
|
||||||
html_theme = 'default'
|
html_theme = 'default'
|
||||||
if not on_rtd:
|
if not on_rtd:
|
||||||
|
|
@ -63,13 +66,13 @@ def setup(app):
|
||||||
app.add_stylesheet('theme_overrides.css') # path relative to _static
|
app.add_stylesheet('theme_overrides.css') # path relative to _static
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output --------------------------------------------------
|
# -- Options for LaTeX output -------------------------------------------------
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'Pelican.tex', 'Pelican Documentation',
|
('index', 'Pelican.tex', 'Pelican Documentation', 'Alexis Métaireau',
|
||||||
'Alexis Métaireau', 'manual'),
|
'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# -- Options for manual page output --------------------------------------------
|
# -- Options for manual page output -------------------------------------------
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'pelican', 'pelican documentation',
|
('index', 'pelican', 'pelican documentation',
|
||||||
['Alexis Métaireau'], 1),
|
['Alexis Métaireau'], 1),
|
||||||
|
|
|
||||||
26
setup.py
26
setup.py
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from os import walk
|
from os import walk
|
||||||
from os.path import join, relpath, dirname
|
from os.path import join, relpath
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
@ -31,22 +31,22 @@ setup(
|
||||||
long_description=README + '\n' + CHANGELOG,
|
long_description=README + '\n' + CHANGELOG,
|
||||||
packages=['pelican', 'pelican.tools'],
|
packages=['pelican', 'pelican.tools'],
|
||||||
package_data={
|
package_data={
|
||||||
# we manually collect the package data, as opposed to using include_package_data=True
|
# we manually collect the package data, as opposed to using,
|
||||||
# because we don't want the tests to be included automatically as package data
|
# include_package_data=True because we don't want the tests to be
|
||||||
# (MANIFEST.in is too greedy)
|
# included automatically as package data (MANIFEST.in is too greedy)
|
||||||
'pelican': [
|
'pelican': [relpath(join(root, name), 'pelican')
|
||||||
relpath(join(root, name), 'pelican')
|
for root, _, names in walk(join('pelican', 'themes'))
|
||||||
for root, _, names in walk(join('pelican', 'themes')) for name in names
|
for name in names],
|
||||||
],
|
'pelican.tools': [relpath(join(root, name), join('pelican', 'tools'))
|
||||||
'pelican.tools': [
|
for root, _, names in walk(join('pelican',
|
||||||
relpath(join(root, name), join('pelican', 'tools'))
|
'tools',
|
||||||
for root, _, names in walk(join('pelican', 'tools', 'templates')) for name in names
|
'templates'))
|
||||||
],
|
for name in names],
|
||||||
},
|
},
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
entry_points=entry_points,
|
entry_points=entry_points,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'License :: OSI Approved :: GNU Affero General Public License v3',
|
'License :: OSI Approved :: GNU Affero General Public License v3',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue