From 867cfd34d2ba07451c7afed7e7ab513a210ee86c Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Mon, 24 Apr 2017 11:29:33 -0700 Subject: [PATCH 01/12] Switch to alabaster theme --- source/_static/custom.css | 1 + source/conf.py | 292 +++++++++++++----- source/themes/pug/static/pug.css | 10 - source/themes/pug/templates/page.html | 2 - source/themes/pydoctheme/_static/sidebar.js | 193 ------------ source/themes/pydoctheme/_templates/page.html | 12 - .../themes/pydoctheme/_templates/sidebar.html | 11 - .../themes/pydoctheme/static/pydoctheme.css | 178 ----------- source/themes/pydoctheme/theme.conf | 23 -- 9 files changed, 219 insertions(+), 503 deletions(-) create mode 100644 source/_static/custom.css delete mode 100644 source/themes/pug/static/pug.css delete mode 100644 source/themes/pug/templates/page.html delete mode 100644 source/themes/pydoctheme/_static/sidebar.js delete mode 100644 source/themes/pydoctheme/_templates/page.html delete mode 100644 source/themes/pydoctheme/_templates/sidebar.html delete mode 100644 source/themes/pydoctheme/static/pydoctheme.css delete mode 100644 source/themes/pydoctheme/theme.conf diff --git a/source/_static/custom.css b/source/_static/custom.css new file mode 100644 index 000000000..86cc12255 --- /dev/null +++ b/source/_static/custom.css @@ -0,0 +1 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono'); diff --git a/source/conf.py b/source/conf.py index 5ff21f641..259c36131 100644 --- a/source/conf.py +++ b/source/conf.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # The Python Packaging Guide documentation build configuration file, created by @@ -12,38 +13,39 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys -import os -import glob - -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - # 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 # documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.append(os.path.abspath('.')) - -# -- General configuration ---------------------------------------------------- +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.intersphinx'] +# -- General configuration ------------------------------------------------ -intersphinx_cache_limit = 0 -intersphinx_mapping = { - 'pip': ('https://pip.pypa.io/en/latest/', None), - 'pypa': ('https://pypa.io/en/latest/', None), - } +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.intersphinx', +] # Add any paths that contain templates here, relative to this directory. -templates_path = ['themes/pug/templates'] +templates_path = ['_templates'] -# The suffix of source filenames. +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The encoding of source files. -# source_encoding = 'utf-8' +# +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' @@ -51,6 +53,7 @@ # General information about the project. project = u'Python Packaging User Guide' copyright = u'2013–2017, PyPA' +author = 'Python Packaging Authority' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -63,34 +66,42 @@ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -# language = None +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: +# # today = '' +# # Else, today_fmt is used as the format for a strftime call. +# # today_fmt = '%B %d, %Y' -# List of documents that shouldn't be included in the build. -# unused_docs = [] - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = [] +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The reST default role (used for this markup: `text`) to use for all # documents. +# # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. +# # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -# add_module_names = True +# +# add_module_names = False # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. +# # show_authors = False # The name of the Pygments (syntax highlighting) style to use. @@ -99,123 +110,256 @@ # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False -# -- Options for HTML output -------------------------------------------------- +# If true, `todo` and `todoList` produce output, else they produce nothing. +# todo_include_todos = False -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' -if not on_rtd: - try: - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - except ImportError: - pass +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +# +html_theme_options = { + 'description': None, + 'github_user': 'pypa', + 'github_repo': 'python-packaging-user-guide', + 'github_banner': True, + 'travis_button': False, + 'font_family': "'Roboto', Georgia, sans", + 'head_font_family': "'Roboto', Georgia, serif", + 'code_font_family': "'Roboto Mono', 'Consolas', monospace", +} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [] -if not on_rtd: - try: - import sphinx_rtd_theme - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - except ImportError: - pass - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None +# html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = 'python-packaging-user-guide' # A shorter title for the navigation bar. Default is the same as html_title. +# # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. +# # html_logo = None -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# 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 # pixels large. +# # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['themes/pug/static'] +html_static_path = ['_static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. +# # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {} +# + +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', + 'searchbox.html', + ] +} # Additional templates that should be rendered to pages, maps page names to # template names. +# # html_additional_pages = {} # If false, no module index is generated. -# html_use_modindex = True +# +# html_domain_indices = True # If false, no index is generated. +# # html_use_index = True # If true, the index is split into individual pages for each letter. +# # html_split_index = False # If true, links to the reST sources are added to the pages. -html_show_sourcelink = False +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. +# # html_use_opensearch = '' -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = '' +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = 'pythonpackagingguide' +htmlhelp_basename = 'pythonpackagingguide-authdoc' + +# -- Options for LaTeX output --------------------------------------------- +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', -# -- Options for LaTeX output ------------------------------------------------- + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', -# The paper size ('letter' or 'a4'). -# latex_paper_size = 'letter' + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', -# The font size ('10pt', '11pt' or '12pt'). -# latex_font_size = '10pt' + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} # Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, -# documentclass [howto/manual]). +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'PythonPackagingGuide.tex', u'Python Packaging Guide', - u'PyPA', 'manual'), + (master_doc, 'pythonpackagingguide.tex', 'Python Packaging User Guide', + 'Python Packaging Authority', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. +# # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. +# # latex_use_parts = False -# Additional stuff for the LaTeX preamble. -# latex_preamble = '' +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False # Documents to append as an appendix to all manuals. +# # latex_appendices = [] +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'pythonpackagingguide', 'Python Packaging User Guide', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'pythonpackagingguide', 'Python Packaging User Guide', + author, 'pythonpackagingguide', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + # If false, no module index is generated. -# latex_use_modindex = True +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = { + 'python': ('https://docs.python.org/3.6', None), + 'pip': ('https://pip.pypa.io/en/latest/', None), + 'pypa': ('https://pypa.io/en/latest/', None), +} diff --git a/source/themes/pug/static/pug.css b/source/themes/pug/static/pug.css deleted file mode 100644 index 6672f2ea7..000000000 --- a/source/themes/pug/static/pug.css +++ /dev/null @@ -1,10 +0,0 @@ -.rst-content table.field-list .field-name { - background-color: #eee; - border: 1px solid #ddd; - padding: 5px; -} - -.rst-content table.field-list .field-body { - border: 1px solid #ddd; - padding: 5px; -} \ No newline at end of file diff --git a/source/themes/pug/templates/page.html b/source/themes/pug/templates/page.html deleted file mode 100644 index e992de02d..000000000 --- a/source/themes/pug/templates/page.html +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "!page.html" %} -{% set css_files = css_files + ["_static/pug.css"] %} diff --git a/source/themes/pydoctheme/_static/sidebar.js b/source/themes/pydoctheme/_static/sidebar.js deleted file mode 100644 index e8d58f4bf..000000000 --- a/source/themes/pydoctheme/_static/sidebar.js +++ /dev/null @@ -1,193 +0,0 @@ -/* - * sidebar.js - * ~~~~~~~~~~ - * - * This script makes the Sphinx sidebar collapsible and implements intelligent - * scrolling. - * - * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds in - * .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton used to - * collapse and expand the sidebar. - * - * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden and the - * width of the sidebar and the margin-left of the document are decreased. - * When the sidebar is expanded the opposite happens. This script saves a - * per-browser/per-session cookie used to remember the position of the sidebar - * among the pages. Once the browser is closed the cookie is deleted and the - * position reset to the default (expanded). - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -$(function() { - // global elements used by the functions. - // the 'sidebarbutton' element is defined as global after its - // creation, in the add_sidebar_button function - var jwindow = $(window); - var jdocument = $(document); - var bodywrapper = $('.bodywrapper'); - var sidebar = $('.sphinxsidebar'); - var sidebarwrapper = $('.sphinxsidebarwrapper'); - - // original margin-left of the bodywrapper and width of the sidebar - // with the sidebar expanded - var bw_margin_expanded = bodywrapper.css('margin-left'); - var ssb_width_expanded = sidebar.width(); - - // margin-left of the bodywrapper and width of the sidebar - // with the sidebar collapsed - var bw_margin_collapsed = '.8em'; - var ssb_width_collapsed = '.8em'; - - // colors used by the current theme - var dark_color = '#AAAAAA'; - var light_color = '#CCCCCC'; - - function get_viewport_height() { - if (window.innerHeight) - return window.innerHeight; - else - return jwindow.height(); - } - - function sidebar_is_collapsed() { - return sidebarwrapper.is(':not(:visible)'); - } - - function toggle_sidebar() { - if (sidebar_is_collapsed()) - expand_sidebar(); - else - collapse_sidebar(); - // adjust the scrolling of the sidebar - scroll_sidebar(); - } - - function collapse_sidebar() { - sidebarwrapper.hide(); - sidebar.css('width', ssb_width_collapsed); - bodywrapper.css('margin-left', bw_margin_collapsed); - sidebarbutton.css({ - 'margin-left': '0', - 'height': bodywrapper.height(), - 'border-radius': '5px' - }); - sidebarbutton.find('span').text('»'); - sidebarbutton.attr('title', _('Expand sidebar')); - document.cookie = 'sidebar=collapsed'; - } - - function expand_sidebar() { - bodywrapper.css('margin-left', bw_margin_expanded); - sidebar.css('width', ssb_width_expanded); - sidebarwrapper.show(); - sidebarbutton.css({ - 'margin-left': ssb_width_expanded-12, - 'height': bodywrapper.height(), - 'border-radius': '0 5px 5px 0' - }); - sidebarbutton.find('span').text('«'); - sidebarbutton.attr('title', _('Collapse sidebar')); - //sidebarwrapper.css({'padding-top': - // Math.max(window.pageYOffset - sidebarwrapper.offset().top, 10)}); - document.cookie = 'sidebar=expanded'; - } - - function add_sidebar_button() { - sidebarwrapper.css({ - 'float': 'left', - 'margin-right': '0', - 'width': ssb_width_expanded - 28 - }); - // create the button - sidebar.append( - '
«
' - ); - var sidebarbutton = $('#sidebarbutton'); - // find the height of the viewport to center the '<<' in the page - var viewport_height = get_viewport_height(); - var sidebar_offset = sidebar.offset().top; - var sidebar_height = Math.max(bodywrapper.height(), sidebar.height()); - sidebarbutton.find('span').css({ - 'display': 'block', - 'position': 'fixed', - 'top': Math.min(viewport_height/2, sidebar_height/2 + sidebar_offset) - 10 - }); - - sidebarbutton.click(toggle_sidebar); - sidebarbutton.attr('title', _('Collapse sidebar')); - sidebarbutton.css({ - 'border-radius': '0 5px 5px 0', - 'color': '#444444', - 'background-color': '#CCCCCC', - 'font-size': '1.2em', - 'cursor': 'pointer', - 'height': sidebar_height, - 'padding-top': '1px', - 'padding-left': '1px', - 'margin-left': ssb_width_expanded - 12 - }); - - sidebarbutton.hover( - function () { - $(this).css('background-color', dark_color); - }, - function () { - $(this).css('background-color', light_color); - } - ); - } - - function set_position_from_cookie() { - if (!document.cookie) - return; - var items = document.cookie.split(';'); - for(var k=0; k wintop && curbot > winbot) { - sidebarwrapper.css('top', $u.max([wintop - offset - 10, 0])); - } - else if (curtop < wintop && curbot < winbot) { - sidebarwrapper.css('top', $u.min([winbot - sidebar_height - offset - 20, - jdocument.height() - sidebar_height - 200])); - } - } - } - jwindow.scroll(scroll_sidebar); -}); diff --git a/source/themes/pydoctheme/_templates/page.html b/source/themes/pydoctheme/_templates/page.html deleted file mode 100644 index 3f8a06725..000000000 --- a/source/themes/pydoctheme/_templates/page.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "!page.html" %} - -{% block extrahead %} -{# -You can't override layout.html in RTD -https://github.com/rtfd/readthedocs.org/issues/152 -Therefore, placing in page.html -#} - -{{ super() }} -{% endblock %} - diff --git a/source/themes/pydoctheme/_templates/sidebar.html b/source/themes/pydoctheme/_templates/sidebar.html deleted file mode 100644 index 09c018192..000000000 --- a/source/themes/pydoctheme/_templates/sidebar.html +++ /dev/null @@ -1,11 +0,0 @@ -
- -

This Page

- - - -
diff --git a/source/themes/pydoctheme/static/pydoctheme.css b/source/themes/pydoctheme/static/pydoctheme.css deleted file mode 100644 index 3d995d81b..000000000 --- a/source/themes/pydoctheme/static/pydoctheme.css +++ /dev/null @@ -1,178 +0,0 @@ -@import url("default.css"); - -body { - background-color: white; - margin-left: 1em; - margin-right: 1em; -} - -div.related { - margin-bottom: 1.2em; - padding: 0.5em 0; - border-top: 1px solid #ccc; - margin-top: 0.5em; -} - -div.related a:hover { - color: #0095C4; -} - -div.related:first-child { - border-top: 0; - border-bottom: 1px solid #ccc; -} - -div.sphinxsidebar { - background-color: #eeeeee; - border-radius: 5px; - line-height: 130%; - font-size: smaller; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin-top: 1.5em; -} - -div.sphinxsidebarwrapper > h3:first-child { - margin-top: 0.2em; -} - -div.sphinxsidebarwrapper > ul > li > ul > li { - margin-bottom: 0.4em; -} - -div.sphinxsidebar a:hover { - color: #0095C4; -} - -div.sphinxsidebar input { - font-family: 'Lucida Grande',Arial,sans-serif; - border: 1px solid #999999; - font-size: smaller; - border-radius: 3px; -} - -div.sphinxsidebar input[type=text] { - max-width: 150px; -} - -div.body { - padding: 0 0 0 1.2em; -} - -div.body p { - line-height: 140%; -} - -div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - margin: 0; - border: 0; - padding: 0.3em 0; -} - -div.body hr { - border: 0; - background-color: #ccc; - height: 1px; -} - -div.body pre { - border-radius: 3px; - border: 1px solid #ac9; -} - -div.body div.admonition, div.body div.impl-detail { - border-radius: 3px; -} - -div.body div.impl-detail > p { - margin: 0; -} - -div.body div.seealso { - border: 1px solid #dddd66; -} - -div.body a { - color: #00608f; -} - -div.body a:visited { - color: #30306f; -} - -div.body a:hover { - color: #00B0E4; -} - -tt, pre { - font-family: monospace, sans-serif; - font-size: 96.5%; -} - -div.body tt { - border-radius: 3px; -} - -div.body tt.descname { - font-size: 120%; -} - -div.body tt.xref, div.body a tt { - font-weight: normal; -} - -.deprecated { - border-radius: 3px; -} - -table.docutils { - border: 1px solid #ddd; - min-width: 20%; - border-radius: 3px; - margin-top: 10px; - margin-bottom: 10px; -} - -table.docutils td, table.docutils th { - border: 1px solid #ddd !important; - border-radius: 3px; -} - -table p, table li { - text-align: left !important; -} - -table.docutils th { - background-color: #eee; - padding: 0.3em 0.5em; -} - -table.docutils td { - background-color: white; - padding: 0.3em 0.5em; -} - -table.footnote, table.footnote td { - border: 0 !important; -} - -div.footer { - line-height: 150%; - margin-top: -2em; - text-align: right; - width: auto; - margin-right: 10px; -} - -div.footer a:hover { - color: #0095C4; -} - -.refcount { - color: #060; -} - -.stableabi { - color: #229; -} diff --git a/source/themes/pydoctheme/theme.conf b/source/themes/pydoctheme/theme.conf deleted file mode 100644 index 0c4388167..000000000 --- a/source/themes/pydoctheme/theme.conf +++ /dev/null @@ -1,23 +0,0 @@ -[theme] -inherit = default -stylesheet = pydoctheme.css -pygments_style = sphinx - -[options] -bodyfont = 'Lucida Grande', Arial, sans-serif -headfont = 'Lucida Grande', Arial, sans-serif -footerbgcolor = white -footertextcolor = #555555 -relbarbgcolor = white -relbartextcolor = #666666 -relbarlinkcolor = #444444 -sidebarbgcolor = white -sidebartextcolor = #444444 -sidebarlinkcolor = #444444 -bgcolor = white -textcolor = #222222 -linkcolor = #0090c0 -visitedlinkcolor = #00608f -headtextcolor = #1a1a1a -headbgcolor = white -headlinkcolor = #aaaaaa From 3865c60dcb434c18584d64a2c21e8b1c3de41fc0 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Mon, 22 May 2017 21:21:33 -0700 Subject: [PATCH 02/12] Switch to pydoctheme --- source/conf.py | 24 +-- source/index.rst | 5 +- .../themes/pydoctheme/static/pydoctheme.css | 194 ++++++++++++++++++ source/themes/pydoctheme/theme.conf | 23 +++ 4 files changed, 226 insertions(+), 20 deletions(-) create mode 100644 source/themes/pydoctheme/static/pydoctheme.css create mode 100644 source/themes/pydoctheme/theme.conf diff --git a/source/conf.py b/source/conf.py index 259c36131..4709d4d5c 100644 --- a/source/conf.py +++ b/source/conf.py @@ -122,25 +122,18 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'pydoctheme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = { - 'description': None, - 'github_user': 'pypa', - 'github_repo': 'python-packaging-user-guide', - 'github_banner': True, - 'travis_button': False, - 'font_family': "'Roboto', Georgia, sans", - 'head_font_family': "'Roboto', Georgia, serif", - 'code_font_family': "'Roboto Mono', 'Consolas', monospace", + 'collapsiblesidebar': True, + 'externalrefs': True, } # Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] +html_theme_path = ['themes'] # The name for this set of Sphinx documents. # " v documentation" by default. @@ -187,13 +180,10 @@ # Custom sidebar templates, maps document names to template names. # +# Custom sidebar templates, filenames relative to this file. html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', - 'searchbox.html', - ] + '**': ['localtoc.html', 'relations.html', 'searchbox.html'], + 'index': ['globaltoc.html', 'searchbox.html'] } # Additional templates that should be rendered to pages, maps page names to diff --git a/source/index.rst b/source/index.rst index 084e77a74..bfe08bc8d 100644 --- a/source/index.rst +++ b/source/index.rst @@ -13,6 +13,8 @@ Packaging Authority `_. This guide is maintained on `github `_. +.. _docs.python.org: http://docs.python.org + .. toctree:: :maxdepth: 1 @@ -24,6 +26,3 @@ This guide is maintained on `github glossary support contribute - - -.. _docs.python.org: http://docs.python.org diff --git a/source/themes/pydoctheme/static/pydoctheme.css b/source/themes/pydoctheme/static/pydoctheme.css new file mode 100644 index 000000000..1d5c18e5f --- /dev/null +++ b/source/themes/pydoctheme/static/pydoctheme.css @@ -0,0 +1,194 @@ +@import url("default.css"); + +body { + background-color: white; + margin-left: 1em; + margin-right: 1em; +} + +div.related { + margin-bottom: 1.2em; + padding: 0.5em 0; + border-top: 1px solid #ccc; + margin-top: 0.5em; +} + +div.related a:hover { + color: #0095C4; +} + +div.related:first-child { + border-top: 0; + border-bottom: 1px solid #ccc; +} + +.inline-search { + display: inline; +} +form.inline-search input { + display: inline; +} +form.inline-search input[type="submit"] { + width: 30px; +} + +div.sphinxsidebar { + background-color: #eeeeee; + border-radius: 5px; + line-height: 130%; + font-size: smaller; +} + +div.sphinxsidebar h3, div.sphinxsidebar h4 { + margin-top: 1.5em; +} + +div.sphinxsidebarwrapper > h3:first-child { + margin-top: 0.2em; +} + +div.sphinxsidebarwrapper > ul > li > ul > li { + margin-bottom: 0.4em; +} + +div.sphinxsidebar a:hover { + color: #0095C4; +} + +form.inline-search input, +div.sphinxsidebar input { + font-family: 'Lucida Grande',Arial,sans-serif; + border: 1px solid #999999; + font-size: smaller; + border-radius: 3px; +} + +div.sphinxsidebar input[type=text] { + max-width: 150px; +} + +div.body { + padding: 0 0 0 1.2em; +} + +div.body p { + line-height: 140%; +} + +div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { + margin: 0; + border: 0; + padding: 0.3em 0; +} + +div.body hr { + border: 0; + background-color: #ccc; + height: 1px; +} + +div.body pre { + border-radius: 3px; + border: 1px solid #ac9; +} + +div.body div.admonition, div.body div.impl-detail { + border-radius: 3px; +} + +div.body div.impl-detail > p { + margin: 0; +} + +div.body div.seealso { + border: 1px solid #dddd66; +} + +div.body a { + color: #0072aa; +} + +div.body a:visited { + color: #6363bb; +} + +div.body a:hover { + color: #00B0E4; +} + +tt, code, pre { + font-family: monospace, sans-serif; + font-size: 96.5%; +} + +div.body tt, div.body code { + border-radius: 3px; +} + +div.body tt.descname, div.body code.descname { + font-size: 120%; +} + +div.body tt.xref, div.body a tt, div.body code.xref, div.body a code { + font-weight: normal; +} + +.deprecated { + border-radius: 3px; +} + +table.docutils { + border: 1px solid #ddd; + min-width: 20%; + border-radius: 3px; + margin-top: 10px; + margin-bottom: 10px; +} + +table.docutils td, table.docutils th { + border: 1px solid #ddd !important; + border-radius: 3px; +} + +table p, table li { + text-align: left !important; +} + +table.docutils th { + background-color: #eee; + padding: 0.3em 0.5em; +} + +table.docutils td { + background-color: white; + padding: 0.3em 0.5em; +} + +table.footnote, table.footnote td { + border: 0 !important; +} + +div.footer { + line-height: 150%; + margin-top: -2em; + text-align: right; + width: auto; + margin-right: 10px; +} + +div.footer a:hover { + color: #0095C4; +} + +.refcount { + color: #060; +} + +.stableabi { + color: #229; +} + +.highlight { + background: none !important; +} + diff --git a/source/themes/pydoctheme/theme.conf b/source/themes/pydoctheme/theme.conf new file mode 100644 index 000000000..0c4388167 --- /dev/null +++ b/source/themes/pydoctheme/theme.conf @@ -0,0 +1,23 @@ +[theme] +inherit = default +stylesheet = pydoctheme.css +pygments_style = sphinx + +[options] +bodyfont = 'Lucida Grande', Arial, sans-serif +headfont = 'Lucida Grande', Arial, sans-serif +footerbgcolor = white +footertextcolor = #555555 +relbarbgcolor = white +relbartextcolor = #666666 +relbarlinkcolor = #444444 +sidebarbgcolor = white +sidebartextcolor = #444444 +sidebarlinkcolor = #444444 +bgcolor = white +textcolor = #222222 +linkcolor = #0090c0 +visitedlinkcolor = #00608f +headtextcolor = #1a1a1a +headbgcolor = white +headlinkcolor = #aaaaaa From 18705827b110192460cc1edcb7edbcbfb8b62ad3 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 25 May 2017 18:01:14 -0700 Subject: [PATCH 03/12] Move pypa theme into its own package --- pypa-theme/LICENSE | 48 +++++++++++++++++++ pypa-theme/MANIFEST.in | 2 + pypa-theme/README.rst | 5 ++ pypa-theme/pypa_theme/__init__.py | 7 +++ .../pypa_theme}/static/pydoctheme.css | 0 .../pypa_theme}/theme.conf | 0 pypa-theme/setup.cfg | 2 + pypa-theme/setup.py | 36 ++++++++++++++ requirements.txt | 4 +- source/conf.py | 4 +- 10 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 pypa-theme/LICENSE create mode 100644 pypa-theme/MANIFEST.in create mode 100644 pypa-theme/README.rst create mode 100644 pypa-theme/pypa_theme/__init__.py rename {source/themes/pydoctheme => pypa-theme/pypa_theme}/static/pydoctheme.css (100%) rename {source/themes/pydoctheme => pypa-theme/pypa_theme}/theme.conf (100%) create mode 100644 pypa-theme/setup.cfg create mode 100644 pypa-theme/setup.py diff --git a/pypa-theme/LICENSE b/pypa-theme/LICENSE new file mode 100644 index 000000000..b6bddd8f8 --- /dev/null +++ b/pypa-theme/LICENSE @@ -0,0 +1,48 @@ +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights +Reserved" are retained in Python alone or in any derivative version prepared by +Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. diff --git a/pypa-theme/MANIFEST.in b/pypa-theme/MANIFEST.in new file mode 100644 index 000000000..c8824419e --- /dev/null +++ b/pypa-theme/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE README.rst +recursive-include pypa_theme *.* diff --git a/pypa-theme/README.rst b/pypa-theme/README.rst new file mode 100644 index 000000000..b83f15b0e --- /dev/null +++ b/pypa-theme/README.rst @@ -0,0 +1,5 @@ +PyPA Sphinx Theme +================= + +This theme is the common theme for all PyPA projects. This theme is an +externalized version of Python 3's pydoctheme. diff --git a/pypa-theme/pypa_theme/__init__.py b/pypa-theme/pypa_theme/__init__.py new file mode 100644 index 000000000..428398137 --- /dev/null +++ b/pypa-theme/pypa_theme/__init__.py @@ -0,0 +1,7 @@ +import os + + +def setup(app): + current_dir = os.path.abspath(os.path.dirname(__file__)) + app.add_html_theme( + 'pypa_theme', current_dir) diff --git a/source/themes/pydoctheme/static/pydoctheme.css b/pypa-theme/pypa_theme/static/pydoctheme.css similarity index 100% rename from source/themes/pydoctheme/static/pydoctheme.css rename to pypa-theme/pypa_theme/static/pydoctheme.css diff --git a/source/themes/pydoctheme/theme.conf b/pypa-theme/pypa_theme/theme.conf similarity index 100% rename from source/themes/pydoctheme/theme.conf rename to pypa-theme/pypa_theme/theme.conf diff --git a/pypa-theme/setup.cfg b/pypa-theme/setup.cfg new file mode 100644 index 000000000..2a9acf13d --- /dev/null +++ b/pypa-theme/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/pypa-theme/setup.py b/pypa-theme/setup.py new file mode 100644 index 000000000..ab5d45b1c --- /dev/null +++ b/pypa-theme/setup.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import io + +from setuptools import setup + +# README into long description +with io.open('README.rst', encoding='utf-8') as readme_file: + long_description = readme_file.read() + + +setup( + name='pypa-theme', + version='0.0.1', + description='The Sphinx theme for PyPA projects', + long_description=long_description, + author='PyPA', + author_email='distutils-sig@python.org', + url='https://pypa.io', + packages=['pypa_theme'], + include_package_data=True, + entry_points={ + 'sphinx.html_themes': [ + 'pypa_theme = pypa_theme', + ] + }, + classifiers=[ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Python Software Foundation License', + 'Operating System :: OS Independent', + 'Topic :: Documentation', + 'Topic :: Software Development :: Documentation', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + ], +) diff --git a/requirements.txt b/requirements.txt index a1b524d2d..da945f6e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -sphinx==1.5.6 -sphinx_rtd_theme +sphinx==1.6.1 +./pypa-theme diff --git a/source/conf.py b/source/conf.py index 4709d4d5c..3df1eb10d 100644 --- a/source/conf.py +++ b/source/conf.py @@ -122,7 +122,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'pydoctheme' +html_theme = 'pypa_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -133,7 +133,7 @@ } # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['themes'] +# html_theme_path = ['themes'] # The name for this set of Sphinx documents. # " v documentation" by default. From 9ade588f26e932147cc8d78b0e6bdfb9cc576a08 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 25 May 2017 18:40:25 -0700 Subject: [PATCH 04/12] Pull in pydoctheme's layout and static assets --- pypa-theme/pypa_theme/layout.html | 64 +++++++++++++++++ pypa-theme/pypa_theme/static/copybutton.js | 62 ++++++++++++++++ pypa-theme/pypa_theme/static/py.png | Bin 0 -> 695 bytes .../pypa_theme/static/version_switch.js | 67 ++++++++++++++++++ pypa-theme/pypa_theme/theme.conf | 1 + source/conf.py | 5 +- 6 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 pypa-theme/pypa_theme/layout.html create mode 100644 pypa-theme/pypa_theme/static/copybutton.js create mode 100644 pypa-theme/pypa_theme/static/py.png create mode 100644 pypa-theme/pypa_theme/static/version_switch.js diff --git a/pypa-theme/pypa_theme/layout.html b/pypa-theme/pypa_theme/layout.html new file mode 100644 index 000000000..c699e63ab --- /dev/null +++ b/pypa-theme/pypa_theme/layout.html @@ -0,0 +1,64 @@ +{% extends "classic/layout.html" %} + +{% block rootrellink %} +
  • +
  • PyPA{{ reldelim1 }}
  • +
  • + {%- if versionswitcher is defined %} + {{ release }} + {%- endif %} + {{ shorttitle }}{{ reldelim1 }} +
  • +{% endblock %} + +{%- macro searchbox() %} +{# modified from sphinx/themes/basic/searchbox.html #} + {%- if builder != "htmlhelp" %} + + + {%- endif %} +{%- endmacro %} + +{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbaritems %} + {%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %} +
  • + {{ searchbox() }} + {{ reldelim2 }} +
  • + {%- endif %} +{% endblock %} + +{% block extrahead %} + + {% if builder != "htmlhelp" %} + {% if not embedded %} + + {% endif %} + {% if versionswitcher is defined and not embedded %}{% endif %} + {% endif %} +{{ super() }} +{% endblock %} + +{% block footer %} + +{% endblock %} diff --git a/pypa-theme/pypa_theme/static/copybutton.js b/pypa-theme/pypa_theme/static/copybutton.js new file mode 100644 index 000000000..716c9e472 --- /dev/null +++ b/pypa-theme/pypa_theme/static/copybutton.js @@ -0,0 +1,62 @@ +$(document).ready(function() { + /* Add a [>>>] button on the top-right corner of code samples to hide + * the >>> and ... prompts and the output and thus make the code + * copyable. */ + var div = $('.highlight-python .highlight,' + + '.highlight-python3 .highlight') + var pre = div.find('pre'); + + // get the styles from the current theme + pre.parent().parent().css('position', 'relative'); + var hide_text = 'Hide the prompts and output'; + var show_text = 'Show the prompts and output'; + var border_width = pre.css('border-top-width'); + var border_style = pre.css('border-top-style'); + var border_color = pre.css('border-top-color'); + var button_styles = { + 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', + 'border-color': border_color, 'border-style': border_style, + 'border-width': border_width, 'color': border_color, 'text-size': '75%', + 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', + 'border-radius': '0 3px 0 0' + } + + // create and add the button to all the code blocks that contain >>> + div.each(function(index) { + var jthis = $(this); + if (jthis.find('.gp').length > 0) { + var button = $('>>>'); + button.css(button_styles) + button.attr('title', hide_text); + button.data('hidden', 'false'); + jthis.prepend(button); + } + // tracebacks (.gt) contain bare text elements that need to be + // wrapped in a span to work with .nextUntil() (see later) + jthis.find('pre:has(.gt)').contents().filter(function() { + return ((this.nodeType == 3) && (this.data.trim().length > 0)); + }).wrap(''); + }); + + // define the behavior of the button when it's clicked + $('.copybutton').click(function(e){ + e.preventDefault(); + var button = $(this); + if (button.data('hidden') === 'false') { + // hide the code output + button.parent().find('.go, .gp, .gt').hide(); + button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); + button.css('text-decoration', 'line-through'); + button.attr('title', show_text); + button.data('hidden', 'true'); + } else { + // show the code output + button.parent().find('.go, .gp, .gt').show(); + button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); + button.css('text-decoration', 'none'); + button.attr('title', hide_text); + button.data('hidden', 'false'); + } + }); +}); + diff --git a/pypa-theme/pypa_theme/static/py.png b/pypa-theme/pypa_theme/static/py.png new file mode 100644 index 0000000000000000000000000000000000000000..93e4a02c3d321c545898a2ebb8873c26dd8a9e5b GIT binary patch literal 695 zcmV;o0!aOdP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOD~ z5jY_RGbdgE00K8jL_t(I%Vm>KNL4`;hrfH@vv+$Uln|xSCTLTOHmzE;5FTwpDtJ)a zz)exE-2_34AR^i+ZCXeh7m*-F5k*FrmbSHs%rX_!{PXUec{69`w(#D(>Vd<+%=bIz zH_V)XUD5sE?K5ebbKaSDu}#Dnq^Y!3`tis9>wSO*T+WBP3wS3NNBU~*PAtw^yjZ+< zQ5yK0z%d{y@_Pz6YdL>s7$6Y^hI$}5GUX?Ns>+iCUiRP z7h|*&%kQa?wQA%pYzqpaf*4?WM!x_ygY0K@07rplx^QhGhnE)r4wbx0x11<&3V?63 z=F8ch)p6iQ88E;iumPmSZif%JIwIgKh$T3)*ab8ImGLVf;IoYtVAb11Z&@wm>96=S z)!B&hojbAPoik&f)Lp;=N!HK;X~5oyfJ49$pbcorTyADv dm$H!t;2#0MumAjv0Ga>*002ovPDHLkV1gIiH5UK? literal 0 HcmV?d00001 diff --git a/pypa-theme/pypa_theme/static/version_switch.js b/pypa-theme/pypa_theme/static/version_switch.js new file mode 100644 index 000000000..8b36a6167 --- /dev/null +++ b/pypa-theme/pypa_theme/static/version_switch.js @@ -0,0 +1,67 @@ +(function() { + 'use strict'; + + var all_versions = { + '3.7': 'dev (3.7)', + '3.6': '3.6', + '3.5': '3.5', + '3.4': '3.4', + '3.3': '3.3', + '2.7': '2.7', + }; + + function build_select(current_version, current_release) { + var buf = [''); + return buf.join(''); + } + + function patch_url(url, new_version) { + var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//, + new_url = url.replace(url_re, '.org/' + new_version + '/'); + + if (new_url == url && !new_url.match(url_re)) { + // python 2 url without version? + new_url = url.replace(/\.org\//, '.org/' + new_version + '/'); + } + return new_url; + } + + function on_switch() { + var selected = $(this).children('option:selected').attr('value'); + + var url = window.location.href, + new_url = patch_url(url, selected); + + if (new_url != url) { + // check beforehand if url exists, else redirect to version's start page + $.ajax({ + url: new_url, + success: function() { + window.location.href = new_url; + }, + error: function() { + window.location.href = 'https://docs.python.org/' + selected; + } + }); + } + } + + $(document).ready(function() { + var release = DOCUMENTATION_OPTIONS.VERSION; + var version = release.substr(0, 3); + var select = build_select(version, release); + + $('.version_switcher_placeholder').html(select); + $('.version_switcher_placeholder select').bind('change', on_switch); + }); +})(); diff --git a/pypa-theme/pypa_theme/theme.conf b/pypa-theme/pypa_theme/theme.conf index 0c4388167..bc5b37b10 100644 --- a/pypa-theme/pypa_theme/theme.conf +++ b/pypa-theme/pypa_theme/theme.conf @@ -21,3 +21,4 @@ visitedlinkcolor = #00608f headtextcolor = #1a1a1a headbgcolor = white headlinkcolor = #aaaaaa +issues_url = diff --git a/source/conf.py b/source/conf.py index 3df1eb10d..76dd2086c 100644 --- a/source/conf.py +++ b/source/conf.py @@ -130,6 +130,7 @@ html_theme_options = { 'collapsiblesidebar': True, 'externalrefs': True, + 'issues_url': 'https://github.com/pypa/python-packaging-user-guide/issues' } # Add any paths that contain custom themes here, relative to this directory. @@ -138,7 +139,7 @@ # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = 'python-packaging-user-guide' +html_title = 'Python Packaging User Guide' # A shorter title for the navigation bar. Default is the same as html_title. # @@ -170,7 +171,7 @@ # bottom, using the given strftime format. # The empty string is equivalent to '%b %d, %Y'. # -# html_last_updated_fmt = None +html_last_updated_fmt = '' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. From f31b5747acf725ca9faa0bf306b9f75253750b57 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 25 May 2017 23:04:08 -0700 Subject: [PATCH 05/12] Add ability to use a global toc --- pypa-theme/pypa_theme/localtoc.html | 15 +++++++++++++++ pypa-theme/pypa_theme/theme.conf | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 pypa-theme/pypa_theme/localtoc.html diff --git a/pypa-theme/pypa_theme/localtoc.html b/pypa-theme/pypa_theme/localtoc.html new file mode 100644 index 000000000..dbfabe12d --- /dev/null +++ b/pypa-theme/pypa_theme/localtoc.html @@ -0,0 +1,15 @@ +{# Adapted from sphinx_rtd_theme/layout.html #} +

    {{ _('Table Of Contents') }}

    +{# + The singlehtml builder doesn't handle this toctree call when the + toctree is empty. Skip building this for now. +#} +{% if theme_global_toc and 'singlehtml' not in builder %} + {% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %} +{% endif %} +{% if global_toc %} + {{ global_toc }} +{% else %} + {# local toc #} + {{ toc }} +{% endif %} diff --git a/pypa-theme/pypa_theme/theme.conf b/pypa-theme/pypa_theme/theme.conf index bc5b37b10..fa243c478 100644 --- a/pypa-theme/pypa_theme/theme.conf +++ b/pypa-theme/pypa_theme/theme.conf @@ -22,3 +22,6 @@ headtextcolor = #1a1a1a headbgcolor = white headlinkcolor = #aaaaaa issues_url = +global_toc = True +collapse_navigation = False +navigation_depth = 4 From c7ed45191298eb62d0cca72ab0ddb1ad8b80ee15 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Fri, 26 May 2017 09:25:39 -0700 Subject: [PATCH 06/12] Highlight active menu item --- pypa-theme/pypa_theme/static/pypa.css | 11 +++++++++++ pypa-theme/pypa_theme/theme.conf | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pypa-theme/pypa_theme/static/pypa.css diff --git a/pypa-theme/pypa_theme/static/pypa.css b/pypa-theme/pypa_theme/static/pypa.css new file mode 100644 index 000000000..246588bb6 --- /dev/null +++ b/pypa-theme/pypa_theme/static/pypa.css @@ -0,0 +1,11 @@ +@import url("pydoctheme.css"); + +/* Highlight active item in global toctree sidebar */ + +.sphinxsidebar li.current a.current { + font-weight: bold; +} + +.sphinxsidebar li.current a { + color: #0072aa; +} diff --git a/pypa-theme/pypa_theme/theme.conf b/pypa-theme/pypa_theme/theme.conf index fa243c478..0cc2287da 100644 --- a/pypa-theme/pypa_theme/theme.conf +++ b/pypa-theme/pypa_theme/theme.conf @@ -1,6 +1,6 @@ [theme] inherit = default -stylesheet = pydoctheme.css +stylesheet = pypa.css pygments_style = sphinx [options] From fc54c5d3cec9cd6b4ba24005aceb6fbd6e05c42f Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Fri, 26 May 2017 09:28:07 -0700 Subject: [PATCH 07/12] Slightly better styling for highlighting the menu item --- pypa-theme/pypa_theme/static/pypa.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypa-theme/pypa_theme/static/pypa.css b/pypa-theme/pypa_theme/static/pypa.css index 246588bb6..0594937ba 100644 --- a/pypa-theme/pypa_theme/static/pypa.css +++ b/pypa-theme/pypa_theme/static/pypa.css @@ -2,7 +2,7 @@ /* Highlight active item in global toctree sidebar */ -.sphinxsidebar li.current a.current { +.sphinxsidebar li.current > a { font-weight: bold; } From 5b01e6aee0f32be558193ddae8eb317f9336a250 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Mon, 5 Jun 2017 14:12:20 -0700 Subject: [PATCH 08/12] Use common python-docs-theme --- pypa-theme/pypa_theme/layout.html | 64 ------ pypa-theme/pypa_theme/static/copybutton.js | 62 ------ pypa-theme/pypa_theme/static/py.png | Bin 695 -> 0 bytes pypa-theme/pypa_theme/static/pydoctheme.css | 194 ------------------ .../pypa_theme/static/version_switch.js | 67 ------ pypa-theme/pypa_theme/theme.conf | 22 +- requirements.txt | 1 + source/_static/custom.css | 1 - source/conf.py | 2 +- 9 files changed, 5 insertions(+), 408 deletions(-) delete mode 100644 pypa-theme/pypa_theme/layout.html delete mode 100644 pypa-theme/pypa_theme/static/copybutton.js delete mode 100644 pypa-theme/pypa_theme/static/py.png delete mode 100644 pypa-theme/pypa_theme/static/pydoctheme.css delete mode 100644 pypa-theme/pypa_theme/static/version_switch.js delete mode 100644 source/_static/custom.css diff --git a/pypa-theme/pypa_theme/layout.html b/pypa-theme/pypa_theme/layout.html deleted file mode 100644 index c699e63ab..000000000 --- a/pypa-theme/pypa_theme/layout.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "classic/layout.html" %} - -{% block rootrellink %} -
  • -
  • PyPA{{ reldelim1 }}
  • -
  • - {%- if versionswitcher is defined %} - {{ release }} - {%- endif %} - {{ shorttitle }}{{ reldelim1 }} -
  • -{% endblock %} - -{%- macro searchbox() %} -{# modified from sphinx/themes/basic/searchbox.html #} - {%- if builder != "htmlhelp" %} - - - {%- endif %} -{%- endmacro %} - -{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} -{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} -{% block relbaritems %} - {%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %} -
  • - {{ searchbox() }} - {{ reldelim2 }} -
  • - {%- endif %} -{% endblock %} - -{% block extrahead %} - - {% if builder != "htmlhelp" %} - {% if not embedded %} - - {% endif %} - {% if versionswitcher is defined and not embedded %}{% endif %} - {% endif %} -{{ super() }} -{% endblock %} - -{% block footer %} - -{% endblock %} diff --git a/pypa-theme/pypa_theme/static/copybutton.js b/pypa-theme/pypa_theme/static/copybutton.js deleted file mode 100644 index 716c9e472..000000000 --- a/pypa-theme/pypa_theme/static/copybutton.js +++ /dev/null @@ -1,62 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - button.data('hidden', 'false'); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').click(function(e){ - e.preventDefault(); - var button = $(this); - if (button.data('hidden') === 'false') { - // hide the code output - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - button.data('hidden', 'true'); - } else { - // show the code output - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - button.data('hidden', 'false'); - } - }); -}); - diff --git a/pypa-theme/pypa_theme/static/py.png b/pypa-theme/pypa_theme/static/py.png deleted file mode 100644 index 93e4a02c3d321c545898a2ebb8873c26dd8a9e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 695 zcmV;o0!aOdP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOD~ z5jY_RGbdgE00K8jL_t(I%Vm>KNL4`;hrfH@vv+$Uln|xSCTLTOHmzE;5FTwpDtJ)a zz)exE-2_34AR^i+ZCXeh7m*-F5k*FrmbSHs%rX_!{PXUec{69`w(#D(>Vd<+%=bIz zH_V)XUD5sE?K5ebbKaSDu}#Dnq^Y!3`tis9>wSO*T+WBP3wS3NNBU~*PAtw^yjZ+< zQ5yK0z%d{y@_Pz6YdL>s7$6Y^hI$}5GUX?Ns>+iCUiRP z7h|*&%kQa?wQA%pYzqpaf*4?WM!x_ygY0K@07rplx^QhGhnE)r4wbx0x11<&3V?63 z=F8ch)p6iQ88E;iumPmSZif%JIwIgKh$T3)*ab8ImGLVf;IoYtVAb11Z&@wm>96=S z)!B&hojbAPoik&f)Lp;=N!HK;X~5oyfJ49$pbcorTyADv dm$H!t;2#0MumAjv0Ga>*002ovPDHLkV1gIiH5UK? diff --git a/pypa-theme/pypa_theme/static/pydoctheme.css b/pypa-theme/pypa_theme/static/pydoctheme.css deleted file mode 100644 index 1d5c18e5f..000000000 --- a/pypa-theme/pypa_theme/static/pydoctheme.css +++ /dev/null @@ -1,194 +0,0 @@ -@import url("default.css"); - -body { - background-color: white; - margin-left: 1em; - margin-right: 1em; -} - -div.related { - margin-bottom: 1.2em; - padding: 0.5em 0; - border-top: 1px solid #ccc; - margin-top: 0.5em; -} - -div.related a:hover { - color: #0095C4; -} - -div.related:first-child { - border-top: 0; - border-bottom: 1px solid #ccc; -} - -.inline-search { - display: inline; -} -form.inline-search input { - display: inline; -} -form.inline-search input[type="submit"] { - width: 30px; -} - -div.sphinxsidebar { - background-color: #eeeeee; - border-radius: 5px; - line-height: 130%; - font-size: smaller; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin-top: 1.5em; -} - -div.sphinxsidebarwrapper > h3:first-child { - margin-top: 0.2em; -} - -div.sphinxsidebarwrapper > ul > li > ul > li { - margin-bottom: 0.4em; -} - -div.sphinxsidebar a:hover { - color: #0095C4; -} - -form.inline-search input, -div.sphinxsidebar input { - font-family: 'Lucida Grande',Arial,sans-serif; - border: 1px solid #999999; - font-size: smaller; - border-radius: 3px; -} - -div.sphinxsidebar input[type=text] { - max-width: 150px; -} - -div.body { - padding: 0 0 0 1.2em; -} - -div.body p { - line-height: 140%; -} - -div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - margin: 0; - border: 0; - padding: 0.3em 0; -} - -div.body hr { - border: 0; - background-color: #ccc; - height: 1px; -} - -div.body pre { - border-radius: 3px; - border: 1px solid #ac9; -} - -div.body div.admonition, div.body div.impl-detail { - border-radius: 3px; -} - -div.body div.impl-detail > p { - margin: 0; -} - -div.body div.seealso { - border: 1px solid #dddd66; -} - -div.body a { - color: #0072aa; -} - -div.body a:visited { - color: #6363bb; -} - -div.body a:hover { - color: #00B0E4; -} - -tt, code, pre { - font-family: monospace, sans-serif; - font-size: 96.5%; -} - -div.body tt, div.body code { - border-radius: 3px; -} - -div.body tt.descname, div.body code.descname { - font-size: 120%; -} - -div.body tt.xref, div.body a tt, div.body code.xref, div.body a code { - font-weight: normal; -} - -.deprecated { - border-radius: 3px; -} - -table.docutils { - border: 1px solid #ddd; - min-width: 20%; - border-radius: 3px; - margin-top: 10px; - margin-bottom: 10px; -} - -table.docutils td, table.docutils th { - border: 1px solid #ddd !important; - border-radius: 3px; -} - -table p, table li { - text-align: left !important; -} - -table.docutils th { - background-color: #eee; - padding: 0.3em 0.5em; -} - -table.docutils td { - background-color: white; - padding: 0.3em 0.5em; -} - -table.footnote, table.footnote td { - border: 0 !important; -} - -div.footer { - line-height: 150%; - margin-top: -2em; - text-align: right; - width: auto; - margin-right: 10px; -} - -div.footer a:hover { - color: #0095C4; -} - -.refcount { - color: #060; -} - -.stableabi { - color: #229; -} - -.highlight { - background: none !important; -} - diff --git a/pypa-theme/pypa_theme/static/version_switch.js b/pypa-theme/pypa_theme/static/version_switch.js deleted file mode 100644 index 8b36a6167..000000000 --- a/pypa-theme/pypa_theme/static/version_switch.js +++ /dev/null @@ -1,67 +0,0 @@ -(function() { - 'use strict'; - - var all_versions = { - '3.7': 'dev (3.7)', - '3.6': '3.6', - '3.5': '3.5', - '3.4': '3.4', - '3.3': '3.3', - '2.7': '2.7', - }; - - function build_select(current_version, current_release) { - var buf = [''); - return buf.join(''); - } - - function patch_url(url, new_version) { - var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//, - new_url = url.replace(url_re, '.org/' + new_version + '/'); - - if (new_url == url && !new_url.match(url_re)) { - // python 2 url without version? - new_url = url.replace(/\.org\//, '.org/' + new_version + '/'); - } - return new_url; - } - - function on_switch() { - var selected = $(this).children('option:selected').attr('value'); - - var url = window.location.href, - new_url = patch_url(url, selected); - - if (new_url != url) { - // check beforehand if url exists, else redirect to version's start page - $.ajax({ - url: new_url, - success: function() { - window.location.href = new_url; - }, - error: function() { - window.location.href = 'https://docs.python.org/' + selected; - } - }); - } - } - - $(document).ready(function() { - var release = DOCUMENTATION_OPTIONS.VERSION; - var version = release.substr(0, 3); - var select = build_select(version, release); - - $('.version_switcher_placeholder').html(select); - $('.version_switcher_placeholder select').bind('change', on_switch); - }); -})(); diff --git a/pypa-theme/pypa_theme/theme.conf b/pypa-theme/pypa_theme/theme.conf index 0cc2287da..0421e6b0c 100644 --- a/pypa-theme/pypa_theme/theme.conf +++ b/pypa-theme/pypa_theme/theme.conf @@ -1,27 +1,11 @@ [theme] -inherit = default +inherit = python_docs_theme stylesheet = pypa.css pygments_style = sphinx [options] -bodyfont = 'Lucida Grande', Arial, sans-serif -headfont = 'Lucida Grande', Arial, sans-serif -footerbgcolor = white -footertextcolor = #555555 -relbarbgcolor = white -relbartextcolor = #666666 -relbarlinkcolor = #444444 -sidebarbgcolor = white -sidebartextcolor = #444444 -sidebarlinkcolor = #444444 -bgcolor = white -textcolor = #222222 -linkcolor = #0090c0 -visitedlinkcolor = #00608f -headtextcolor = #1a1a1a -headbgcolor = white -headlinkcolor = #aaaaaa -issues_url = global_toc = True collapse_navigation = False navigation_depth = 4 +root_name = PyPA +root_url = https://pypa.io diff --git a/requirements.txt b/requirements.txt index da945f6e0..eb066b493 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ sphinx==1.6.1 +../python-docs-theme ./pypa-theme diff --git a/source/_static/custom.css b/source/_static/custom.css deleted file mode 100644 index 86cc12255..000000000 --- a/source/_static/custom.css +++ /dev/null @@ -1 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono'); diff --git a/source/conf.py b/source/conf.py index 76dd2086c..aac744e8d 100644 --- a/source/conf.py +++ b/source/conf.py @@ -159,7 +159,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied From a4ca2d3f64547a286f982b526c1d2db4fdee1829 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 8 Jun 2017 20:43:02 -0700 Subject: [PATCH 09/12] Install python-docs-theme from github --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eb066b493..02588a216 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ sphinx==1.6.1 -../python-docs-theme +git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme ./pypa-theme From e5de0bcac2848be6fcac7daf41ec4894f1789ea0 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Mon, 22 May 2017 13:20:13 -0700 Subject: [PATCH 10/12] Remove status complete markers --- source/discussions/install-requires-vs-requirements.rst | 3 --- source/discussions/pip-vs-easy-install.rst | 3 --- source/discussions/wheel-vs-egg.rst | 3 --- source/glossary.rst | 4 ---- source/guides/creating-and-discovering-plugins.rst | 3 --- source/guides/hosting-your-own-index.rst | 3 --- source/guides/installing-using-linux-tools.rst | 1 - source/guides/multi-version-installs.rst | 3 --- source/guides/packaging-namespace-packages.rst | 3 --- source/guides/single-sourcing-package-version.rst | 3 --- source/guides/tool-recommendations.rst | 3 --- source/index.rst | 2 -- source/key_projects.rst | 3 --- source/specifications/index.rst | 3 --- source/support.rst | 3 --- source/tutorials/distributing-packages.rst | 3 --- source/tutorials/installing-packages.rst | 3 --- 17 files changed, 49 deletions(-) diff --git a/source/discussions/install-requires-vs-requirements.rst b/source/discussions/install-requires-vs-requirements.rst index a9ae9402b..cd98bba4a 100644 --- a/source/discussions/install-requires-vs-requirements.rst +++ b/source/discussions/install-requires-vs-requirements.rst @@ -4,9 +4,6 @@ install_requires vs Requirements files ====================================== -:Page Status: Complete -:Last Reviewed: 2015-09-08 - .. contents:: Contents :local: diff --git a/source/discussions/pip-vs-easy-install.rst b/source/discussions/pip-vs-easy-install.rst index 6630096ad..995eb5fc0 100644 --- a/source/discussions/pip-vs-easy-install.rst +++ b/source/discussions/pip-vs-easy-install.rst @@ -5,9 +5,6 @@ pip vs easy_install =================== -:Page Status: Complete -:Last Reviewed: 2015-09-08 - `easy_install` was released in 2004, as part of :ref:`setuptools`. It was notable at the time for installing :term:`packages ` from diff --git a/source/discussions/wheel-vs-egg.rst b/source/discussions/wheel-vs-egg.rst index 723a02cd0..7c8ae82fc 100644 --- a/source/discussions/wheel-vs-egg.rst +++ b/source/discussions/wheel-vs-egg.rst @@ -4,9 +4,6 @@ Wheel vs Egg ============ -:Page Status: Complete -:Last Reviewed: 2015-09-10 - :term:`Wheel` and :term:`Egg` are both packaging formats that aim to support the use case of needing an install artifact that doesn't require building or compilation, which can be costly in testing and production workflows. diff --git a/source/glossary.rst b/source/glossary.rst index 7a82664fe..88d67c43a 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -1,11 +1,7 @@ - ======== Glossary ======== -:Page Status: Complete -:Last Reviewed: 2015-09-08 - .. glossary:: diff --git a/source/guides/creating-and-discovering-plugins.rst b/source/guides/creating-and-discovering-plugins.rst index c97a98bd7..6b1c76057 100644 --- a/source/guides/creating-and-discovering-plugins.rst +++ b/source/guides/creating-and-discovering-plugins.rst @@ -2,9 +2,6 @@ Creating and discovering plugins ================================ -:Page Status: Complete -:Last Reviewed: 2017-04-10 - Often when creating a Python application or library you'll want the ability to provide customizations or extra features via **plugins**. Because Python packages can be separately distributed, your application or library may want to diff --git a/source/guides/hosting-your-own-index.rst b/source/guides/hosting-your-own-index.rst index 3d74a0577..5e72d8ed2 100644 --- a/source/guides/hosting-your-own-index.rst +++ b/source/guides/hosting-your-own-index.rst @@ -4,9 +4,6 @@ Hosting your own simple repository ================================== -:Page Status: Complete -:Last Reviewed: 2015-09-24 - If you wish to host your own simple repository [1]_, you can either use a software package like `devpi`_ or you can use simply create the proper diff --git a/source/guides/installing-using-linux-tools.rst b/source/guides/installing-using-linux-tools.rst index c92b8d4b7..8a284793b 100644 --- a/source/guides/installing-using-linux-tools.rst +++ b/source/guides/installing-using-linux-tools.rst @@ -1,4 +1,3 @@ - .. _`Installing pip/setuptools/wheel with Linux Package Managers`: =========================================================== diff --git a/source/guides/multi-version-installs.rst b/source/guides/multi-version-installs.rst index fb94a667e..422f0c577 100644 --- a/source/guides/multi-version-installs.rst +++ b/source/guides/multi-version-installs.rst @@ -4,9 +4,6 @@ Multi-version Installs ====================== -:Page Status: Complete -:Last Reviewed: 2014-12-27 - easy_install allows simultaneous installation of different versions of the same project into a single environment shared by multiple programs which must diff --git a/source/guides/packaging-namespace-packages.rst b/source/guides/packaging-namespace-packages.rst index 69ba95de3..262fa5a19 100644 --- a/source/guides/packaging-namespace-packages.rst +++ b/source/guides/packaging-namespace-packages.rst @@ -2,9 +2,6 @@ Packaging namespace packages ============================ -:Page Status: Complete -:Last Reviewed: 2017-04-19 - Namespace packages allow you to split the sub-packages and modules within a single :term:`package ` across multiple, separate :term:`distribution packages ` (referred to as diff --git a/source/guides/single-sourcing-package-version.rst b/source/guides/single-sourcing-package-version.rst index 9798ebbaa..9e5b91635 100644 --- a/source/guides/single-sourcing-package-version.rst +++ b/source/guides/single-sourcing-package-version.rst @@ -4,9 +4,6 @@ Single-sourcing the package version =================================== -:Page Status: Complete -:Last Reviewed: 2015-12-03 - There are many techniques to maintain a single source of truth for the version number of your project: diff --git a/source/guides/tool-recommendations.rst b/source/guides/tool-recommendations.rst index 53876a90d..906acecb2 100644 --- a/source/guides/tool-recommendations.rst +++ b/source/guides/tool-recommendations.rst @@ -4,9 +4,6 @@ Tool recommendations ==================== -:Page Status: Complete -:Last Reviewed: 2016-06-24 - If you're familiar with Python packaging and installation, and just want to know what tools are currently recommended, then here it is. diff --git a/source/index.rst b/source/index.rst index bfe08bc8d..0f292ef10 100644 --- a/source/index.rst +++ b/source/index.rst @@ -2,8 +2,6 @@ Python Packaging User Guide =========================== -:Last Reviewed: 2015-09-08 - The "Python Packaging User Guide" (PyPUG) aims to be the authoritative resource on how to package, publish, and install Python projects using current tools. diff --git a/source/key_projects.rst b/source/key_projects.rst index b97e7b029..e12fb478f 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -5,9 +5,6 @@ Project Summaries ================= -:Page Status: Complete -:Last Reviewed: 2016-06-24 - Summaries and links for the most relevant projects in the space of Python installation and packaging. diff --git a/source/specifications/index.rst b/source/specifications/index.rst index e81cf852d..1aa2b3c0a 100644 --- a/source/specifications/index.rst +++ b/source/specifications/index.rst @@ -5,9 +5,6 @@ PyPA Specifications =================== -:Page Status: Complete -:Last Reviewed: 2017-02-06 - This is a list of currently active interoperability specifications maintained by the Python Packaging Authority. diff --git a/source/support.rst b/source/support.rst index 5f81705f5..9510fb72c 100644 --- a/source/support.rst +++ b/source/support.rst @@ -2,9 +2,6 @@ How to Get Support ================== -:Page Status: Complete -:Last Reviewed: 2015-09-08 - For support related to a specific project, see the links on the :doc:`Projects ` page. diff --git a/source/tutorials/distributing-packages.rst b/source/tutorials/distributing-packages.rst index 6d010e689..6d26e0727 100644 --- a/source/tutorials/distributing-packages.rst +++ b/source/tutorials/distributing-packages.rst @@ -2,9 +2,6 @@ Packaging and Distributing Projects =================================== -:Page Status: Complete -:Last Reviewed: 2015-09-08 - This section covers the basics of how to configure, package and distribute your own Python projects. It assumes that you are already familiar with the contents of the :doc:`installing` page. diff --git a/source/tutorials/installing-packages.rst b/source/tutorials/installing-packages.rst index 5760005bd..785f3ea70 100644 --- a/source/tutorials/installing-packages.rst +++ b/source/tutorials/installing-packages.rst @@ -2,9 +2,6 @@ Installing Packages =================== -:Page Status: Complete -:Last Reviewed: 2016-06-24 - This section covers the basics of how to install Python :term:`packages `. From 6cf0b85443f5be05f2aa33803fc343e489aaf1f8 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Mon, 12 Jun 2017 22:27:52 -0700 Subject: [PATCH 11/12] removing rtd-search-form from linkchecker --- scripts/linkmonitor/inventory.yaml | 53 +++++++++++++++--------------- scripts/linkmonitor/linkmonitor.py | 2 +- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/scripts/linkmonitor/inventory.yaml b/scripts/linkmonitor/inventory.yaml index b0d7b3024..13da44925 100644 --- a/scripts/linkmonitor/inventory.yaml +++ b/scripts/linkmonitor/inventory.yaml @@ -5,7 +5,7 @@ appveyor.html#support-script, appveyor.html#support-scripts, appveyor.html#supporting-windows-using-appveyor, appveyor.html#testing-with-tox, contribute.html, contribute.html#audience, contribute.html#contribute-to-this-guide, contribute.html#contributing-style-guide, contribute.html#conventions-and-mechanics, - contribute.html#purpose, contribute.html#rtd-search-form, contribute.html#scope, + contribute.html#purpose, contribute.html#scope, contribute.html#style-guide, contribute.html#voice-and-tone, current.html, current.html#installation-tool-recommendations, current.html#packaging-tool-recommendations, current.html#tool-recommendations, deployment.html, deployment.html#application-bundles, deployment.html#application-deployment, @@ -15,15 +15,14 @@ discussions/deploying-python-applications.html#configuration-management, discussions/deploying-python-applications.html#contents, discussions/deploying-python-applications.html#deploying-python-applications, discussions/deploying-python-applications.html#os-packaging-installers, discussions/deploying-python-applications.html#overview, discussions/deploying-python-applications.html#pynsist, - discussions/deploying-python-applications.html#rtd-search-form, discussions/deploying-python-applications.html#supporting-multiple-hardware-platforms, + discussions/deploying-python-applications.html#supporting-multiple-hardware-platforms, discussions/deploying-python-applications.html#windows, discussions/index.html, - discussions/index.html#discussions, discussions/index.html#rtd-search-form, discussions/install-requires-vs-requirements.html, + discussions/index.html#discussions, discussions/install-requires-vs-requirements.html, discussions/install-requires-vs-requirements.html#contents, discussions/install-requires-vs-requirements.html#install-requires, discussions/install-requires-vs-requirements.html#install-requires-vs-requirements-files, - discussions/install-requires-vs-requirements.html#requirements-files, discussions/install-requires-vs-requirements.html#rtd-search-form, + discussions/install-requires-vs-requirements.html#requirements-files, discussions/pip-vs-easy-install.html, discussions/pip-vs-easy-install.html#pip-vs-easy-install, - discussions/pip-vs-easy-install.html#rtd-search-form, discussions/wheel-vs-egg.html, - discussions/wheel-vs-egg.html#rtd-search-form, discussions/wheel-vs-egg.html#wheel-vs-egg, + discussions/wheel-vs-egg.html, discussions/wheel-vs-egg.html#wheel-vs-egg, distributing.html, distributing.html#author, distributing.html#choosing-a-versioning-scheme, distributing.html#classifiers, distributing.html#configuring-your-project, distributing.html#console-scripts, distributing.html#contents, distributing.html#create-an-account, distributing.html#data-files, @@ -46,7 +45,7 @@ extensions.html#building-binary-extensions, extensions.html#contents, extensions.html#disadvantages, extensions.html#implementing-binary-extensions, extensions.html#publishing-binary-extensions, extensions.html#setting-up-a-build-environment-on-windows, extensions.html#use-cases, - glossary.html, glossary.html#glossary, glossary.html#rtd-search-form, glossary.html#term-binary-distribution, + glossary.html, glossary.html#glossary, glossary.html#term-binary-distribution, glossary.html#term-built-distribution, glossary.html#term-distribution-package, glossary.html#term-egg, glossary.html#term-extension-module, glossary.html#term-import-package, glossary.html#term-known-good-set-kgs, glossary.html#term-module, glossary.html#term-package-index, @@ -57,28 +56,28 @@ glossary.html#term-source-distribution-or-sdist, glossary.html#term-system-package, glossary.html#term-version-specifier, glossary.html#term-virtual-environment, glossary.html#term-wheel, glossary.html#term-working-set, guides/creating-and-discovering-plugins.html, guides/creating-and-discovering-plugins.html#creating-and-discovering-plugins, - guides/creating-and-discovering-plugins.html#rtd-search-form, guides/creating-and-discovering-plugins.html#using-namespace-packages, + guides/creating-and-discovering-plugins.html#using-namespace-packages, guides/creating-and-discovering-plugins.html#using-naming-convention, guides/creating-and-discovering-plugins.html#using-package-metadata, guides/hosting-your-own-index.html, guides/hosting-your-own-index.html#hosting-your-own-simple-repository, - guides/hosting-your-own-index.html#manual-repository, guides/hosting-your-own-index.html#rtd-search-form, + guides/hosting-your-own-index.html#manual-repository, guides/index-mirrors-and-caches.html, guides/index-mirrors-and-caches.html#caching-with-devpi, guides/index-mirrors-and-caches.html#caching-with-pip, guides/index-mirrors-and-caches.html#complete-mirror-with-bandersnatch, guides/index-mirrors-and-caches.html#contents, guides/index-mirrors-and-caches.html#package-index-mirrors-and-caches, - guides/index-mirrors-and-caches.html#pypi-mirrors-and-caches, guides/index-mirrors-and-caches.html#rtd-search-form, - guides/index.html, guides/index.html#guides, guides/index.html#rtd-search-form, + guides/index-mirrors-and-caches.html#pypi-mirrors-and-caches, + guides/index.html, guides/index.html#guides, guides/installing-scientific-packages.html, guides/installing-scientific-packages.html#building-from-source, guides/installing-scientific-packages.html#contents, guides/installing-scientific-packages.html#installing-scientific-packages, guides/installing-scientific-packages.html#linux-distribution-packages, guides/installing-scientific-packages.html#mac-os-x-installers-and-package-managers, - guides/installing-scientific-packages.html#numpy-and-the-science-stack, guides/installing-scientific-packages.html#rtd-search-form, + guides/installing-scientific-packages.html#numpy-and-the-science-stack, guides/installing-scientific-packages.html#scipy-distributions, guides/installing-scientific-packages.html#spack, guides/installing-scientific-packages.html#the-conda-cross-platform-package-manager, guides/installing-scientific-packages.html#windows-installers, guides/installing-using-linux-tools.html, guides/installing-using-linux-tools.html#arch-linux, guides/installing-using-linux-tools.html#centos-rhel, guides/installing-using-linux-tools.html#debian-ubuntu, guides/installing-using-linux-tools.html#fedora, guides/installing-using-linux-tools.html#installing-pip-setuptools-wheel-with-linux-package-managers, - guides/installing-using-linux-tools.html#opensuse, guides/installing-using-linux-tools.html#rtd-search-form, + guides/installing-using-linux-tools.html#opensuse, guides/multi-version-installs.html, guides/multi-version-installs.html#multi-version-installs, - guides/multi-version-installs.html#rtd-search-form, guides/packaging-binary-extensions.html, + guides/packaging-binary-extensions.html, guides/packaging-binary-extensions.html#alternatives-for-low-level-system-access, guides/packaging-binary-extensions.html#alternatives-to-handcoded-accelerator-modules, guides/packaging-binary-extensions.html#alternatives-to-handcoded-wrapper-modules, @@ -86,16 +85,16 @@ guides/packaging-binary-extensions.html#building-binary-extensions, guides/packaging-binary-extensions.html#contents, guides/packaging-binary-extensions.html#disadvantages, guides/packaging-binary-extensions.html#implementing-binary-extensions, guides/packaging-binary-extensions.html#packaging-binary-extensions, guides/packaging-binary-extensions.html#publishing-binary-extensions, - guides/packaging-binary-extensions.html#rtd-search-form, guides/packaging-binary-extensions.html#setting-up-a-build-environment-on-windows, + guides/packaging-binary-extensions.html#setting-up-a-build-environment-on-windows, guides/packaging-binary-extensions.html#use-cases, guides/packaging-namespace-packages.html, guides/packaging-namespace-packages.html#creating-a-namespace-package, guides/packaging-namespace-packages.html#native-namespace-packages, guides/packaging-namespace-packages.html#packaging-namespace-packages, guides/packaging-namespace-packages.html#pkg-resources-style-namespace-packages, - guides/packaging-namespace-packages.html#pkgutil-style-namespace-packages, guides/packaging-namespace-packages.html#rtd-search-form, - guides/single-sourcing-package-version.html, guides/single-sourcing-package-version.html#rtd-search-form, + guides/packaging-namespace-packages.html#pkgutil-style-namespace-packages, + guides/single-sourcing-package-version.html, guides/single-sourcing-package-version.html#single-sourcing-the-package-version, guides/single-sourcing-package-version.html#single-sourcing-the-version, guides/supporting-multiple-python-versions.html, guides/supporting-multiple-python-versions.html#automated-testing-and-continuous-integration, - guides/supporting-multiple-python-versions.html#contents, guides/supporting-multiple-python-versions.html#rtd-search-form, + guides/supporting-multiple-python-versions.html#contents, guides/supporting-multiple-python-versions.html#supporting-multiple-python-versions, guides/supporting-multiple-python-versions.html#tools-for-single-source-python-packages, guides/supporting-multiple-python-versions.html#what-s-in-which-python, guides/supporting-windows-using-appveyor.html, @@ -103,13 +102,13 @@ guides/supporting-windows-using-appveyor.html#additional-notes, guides/supporting-windows-using-appveyor.html#appveyor-yml, guides/supporting-windows-using-appveyor.html#automatically-uploading-wheels, guides/supporting-windows-using-appveyor.html#background, guides/supporting-windows-using-appveyor.html#contents, guides/supporting-windows-using-appveyor.html#external-dependencies, - guides/supporting-windows-using-appveyor.html#rtd-search-form, guides/supporting-windows-using-appveyor.html#setting-up, + guides/supporting-windows-using-appveyor.html#setting-up, guides/supporting-windows-using-appveyor.html#support-script, guides/supporting-windows-using-appveyor.html#support-scripts, guides/supporting-windows-using-appveyor.html#supporting-windows-using-appveyor, guides/supporting-windows-using-appveyor.html#testing-with-tox, guides/tool-recommendations.html, guides/tool-recommendations.html#installation-tool-recommendations, guides/tool-recommendations.html#packaging-tool-recommendations, - guides/tool-recommendations.html#rtd-search-form, guides/tool-recommendations.html#tool-recommendations, - index.html, index.html#python-packaging-user-guide, index.html#rtd-search-form, + guides/tool-recommendations.html#tool-recommendations, + index.html, index.html#python-packaging-user-guide, install_requirements_linux.html, install_requirements_linux.html#arch-linux, install_requirements_linux.html#centos-rhel, install_requirements_linux.html#debian-ubuntu, install_requirements_linux.html#fedora, install_requirements_linux.html#installing-pip-setuptools-wheel-with-linux-package-managers, @@ -129,7 +128,7 @@ key_projects.html#ensurepip, key_projects.html#hashdist, key_projects.html#non-pypa-projects, key_projects.html#packaging, key_projects.html#pex, key_projects.html#pip, key_projects.html#project-summaries, key_projects.html#projects, key_projects.html#pypa-projects, key_projects.html#python-packaging-user-guide, - key_projects.html#rtd-search-form, key_projects.html#setuptools, key_projects.html#spack, + key_projects.html#setuptools, key_projects.html#spack, key_projects.html#standard-library-projects, key_projects.html#twine, key_projects.html#venv, key_projects.html#virtualenv, key_projects.html#warehouse, key_projects.html#wheel, mirrors.html, mirrors.html#caching-with-devpi, mirrors.html#caching-with-pip, mirrors.html#complete-mirror-with-bandersnatch, @@ -165,10 +164,10 @@ specifications/index.html#description-content-type, specifications/index.html#package-distribution-metadata, specifications/index.html#package-index-interfaces, specifications/index.html#platform-compatibility-tags, specifications/index.html#provides-extra-multiple-use, specifications/index.html#pypa-specifications, - specifications/index.html#recording-installed-distributions, specifications/index.html#rtd-search-form, + specifications/index.html#recording-installed-distributions, specifications/index.html#simple-repository-api, specifications/index.html#source-distribution-format, specifications/index.html#specifications, specifications/index.html#version-specifiers, - support.html, support.html#how-to-get-support, support.html#rtd-search-form, tutorial.html, + support.html, support.html#how-to-get-support, tutorial.html, tutorials/distributing-packages.html, tutorials/distributing-packages.html#author, tutorials/distributing-packages.html#choosing-a-versioning-scheme, tutorials/distributing-packages.html#classifiers, tutorials/distributing-packages.html#configuring-your-project, tutorials/distributing-packages.html#console-scripts, @@ -184,7 +183,7 @@ tutorials/distributing-packages.html#platform-wheels, tutorials/distributing-packages.html#pre-release-versioning, tutorials/distributing-packages.html#pure-python-wheels, tutorials/distributing-packages.html#readme-rst, tutorials/distributing-packages.html#requirements-for-packaging-and-distributing, - tutorials/distributing-packages.html#rtd-search-form, tutorials/distributing-packages.html#scheme-choices, + tutorials/distributing-packages.html#scheme-choices, tutorials/distributing-packages.html#scripts, tutorials/distributing-packages.html#semantic-versioning-preferred, tutorials/distributing-packages.html#serial-versioning, tutorials/distributing-packages.html#setup-args, tutorials/distributing-packages.html#setup-cfg, tutorials/distributing-packages.html#setup-name, @@ -194,7 +193,7 @@ tutorials/distributing-packages.html#uploading-your-project-to-pypi, tutorials/distributing-packages.html#url, tutorials/distributing-packages.html#version, tutorials/distributing-packages.html#wheels, tutorials/distributing-packages.html#working-in-development-mode, tutorials/distributing-packages.html#your-package, - tutorials/index.html, tutorials/index.html#rtd-search-form, tutorials/index.html#tutorials, + tutorials/index.html, tutorials/index.html#tutorials, tutorials/installing-packages.html, tutorials/installing-packages.html#contents, tutorials/installing-packages.html#creating-and-using-virtual-environments, tutorials/installing-packages.html#creating-virtual-environments, tutorials/installing-packages.html#install-pip-setuptools-and-wheel, tutorials/installing-packages.html#installing-from-a-local-src-tree, @@ -204,6 +203,6 @@ tutorials/installing-packages.html#installing-prereleases, tutorials/installing-packages.html#installing-requirements, tutorials/installing-packages.html#installing-setuptools-extras, tutorials/installing-packages.html#installing-to-the-user-site, tutorials/installing-packages.html#optionally-create-a-virtual-environment, tutorials/installing-packages.html#requirements-files, - tutorials/installing-packages.html#requirements-for-installing-packages, tutorials/installing-packages.html#rtd-search-form, + tutorials/installing-packages.html#requirements-for-installing-packages, tutorials/installing-packages.html#source-distributions-vs-wheels, tutorials/installing-packages.html#upgrading-packages, tutorials/installing-packages.html#use-pip-for-installing, wheel_egg.html, wheel_egg.html#wheel-vs-egg] diff --git a/scripts/linkmonitor/linkmonitor.py b/scripts/linkmonitor/linkmonitor.py index 80f7c5eda..0150a18f2 100644 --- a/scripts/linkmonitor/linkmonitor.py +++ b/scripts/linkmonitor/linkmonitor.py @@ -38,7 +38,7 @@ def find_all_named_anchors(filename): if anchor.startswith('index-'): continue # Ignore searchbox anchors - if anchor == 'searchbox': + if anchor in ('searchbox', 'rtd-search-form'): continue href = '{}#{}'.format(filename, anchor) From f37513f2e7770bec8c5756a5f7ee40bce6dfc283 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Wed, 14 Jun 2017 13:24:12 -0700 Subject: [PATCH 12/12] Use pypa theme from github --- pypa-theme/LICENSE | 48 --------------------------- pypa-theme/MANIFEST.in | 2 -- pypa-theme/README.rst | 5 --- pypa-theme/pypa_theme/__init__.py | 7 ---- pypa-theme/pypa_theme/localtoc.html | 15 --------- pypa-theme/pypa_theme/static/pypa.css | 11 ------ pypa-theme/pypa_theme/theme.conf | 11 ------ pypa-theme/setup.cfg | 2 -- pypa-theme/setup.py | 36 -------------------- requirements.txt | 2 +- 10 files changed, 1 insertion(+), 138 deletions(-) delete mode 100644 pypa-theme/LICENSE delete mode 100644 pypa-theme/MANIFEST.in delete mode 100644 pypa-theme/README.rst delete mode 100644 pypa-theme/pypa_theme/__init__.py delete mode 100644 pypa-theme/pypa_theme/localtoc.html delete mode 100644 pypa-theme/pypa_theme/static/pypa.css delete mode 100644 pypa-theme/pypa_theme/theme.conf delete mode 100644 pypa-theme/setup.cfg delete mode 100644 pypa-theme/setup.py diff --git a/pypa-theme/LICENSE b/pypa-theme/LICENSE deleted file mode 100644 index b6bddd8f8..000000000 --- a/pypa-theme/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 --------------------------------------------- - -1. This LICENSE AGREEMENT is between the Python Software Foundation -("PSF"), and the Individual or Organization ("Licensee") accessing and -otherwise using this software ("Python") in source or binary form and -its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF hereby -grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python alone or in any derivative version, -provided, however, that PSF's License Agreement and PSF's notice of copyright, -i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights -Reserved" are retained in Python alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python. - -4. PSF is making Python available to Licensee on an "AS IS" -basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between PSF and -Licensee. This License Agreement does not grant permission to use PSF -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using Python, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. diff --git a/pypa-theme/MANIFEST.in b/pypa-theme/MANIFEST.in deleted file mode 100644 index c8824419e..000000000 --- a/pypa-theme/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include LICENSE README.rst -recursive-include pypa_theme *.* diff --git a/pypa-theme/README.rst b/pypa-theme/README.rst deleted file mode 100644 index b83f15b0e..000000000 --- a/pypa-theme/README.rst +++ /dev/null @@ -1,5 +0,0 @@ -PyPA Sphinx Theme -================= - -This theme is the common theme for all PyPA projects. This theme is an -externalized version of Python 3's pydoctheme. diff --git a/pypa-theme/pypa_theme/__init__.py b/pypa-theme/pypa_theme/__init__.py deleted file mode 100644 index 428398137..000000000 --- a/pypa-theme/pypa_theme/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -import os - - -def setup(app): - current_dir = os.path.abspath(os.path.dirname(__file__)) - app.add_html_theme( - 'pypa_theme', current_dir) diff --git a/pypa-theme/pypa_theme/localtoc.html b/pypa-theme/pypa_theme/localtoc.html deleted file mode 100644 index dbfabe12d..000000000 --- a/pypa-theme/pypa_theme/localtoc.html +++ /dev/null @@ -1,15 +0,0 @@ -{# Adapted from sphinx_rtd_theme/layout.html #} -

    {{ _('Table Of Contents') }}

    -{# - The singlehtml builder doesn't handle this toctree call when the - toctree is empty. Skip building this for now. -#} -{% if theme_global_toc and 'singlehtml' not in builder %} - {% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %} -{% endif %} -{% if global_toc %} - {{ global_toc }} -{% else %} - {# local toc #} - {{ toc }} -{% endif %} diff --git a/pypa-theme/pypa_theme/static/pypa.css b/pypa-theme/pypa_theme/static/pypa.css deleted file mode 100644 index 0594937ba..000000000 --- a/pypa-theme/pypa_theme/static/pypa.css +++ /dev/null @@ -1,11 +0,0 @@ -@import url("pydoctheme.css"); - -/* Highlight active item in global toctree sidebar */ - -.sphinxsidebar li.current > a { - font-weight: bold; -} - -.sphinxsidebar li.current a { - color: #0072aa; -} diff --git a/pypa-theme/pypa_theme/theme.conf b/pypa-theme/pypa_theme/theme.conf deleted file mode 100644 index 0421e6b0c..000000000 --- a/pypa-theme/pypa_theme/theme.conf +++ /dev/null @@ -1,11 +0,0 @@ -[theme] -inherit = python_docs_theme -stylesheet = pypa.css -pygments_style = sphinx - -[options] -global_toc = True -collapse_navigation = False -navigation_depth = 4 -root_name = PyPA -root_url = https://pypa.io diff --git a/pypa-theme/setup.cfg b/pypa-theme/setup.cfg deleted file mode 100644 index 2a9acf13d..000000000 --- a/pypa-theme/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 diff --git a/pypa-theme/setup.py b/pypa-theme/setup.py deleted file mode 100644 index ab5d45b1c..000000000 --- a/pypa-theme/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -import io - -from setuptools import setup - -# README into long description -with io.open('README.rst', encoding='utf-8') as readme_file: - long_description = readme_file.read() - - -setup( - name='pypa-theme', - version='0.0.1', - description='The Sphinx theme for PyPA projects', - long_description=long_description, - author='PyPA', - author_email='distutils-sig@python.org', - url='https://pypa.io', - packages=['pypa_theme'], - include_package_data=True, - entry_points={ - 'sphinx.html_themes': [ - 'pypa_theme = pypa_theme', - ] - }, - classifiers=[ - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Python Software Foundation License', - 'Operating System :: OS Independent', - 'Topic :: Documentation', - 'Topic :: Software Development :: Documentation', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - ], -) diff --git a/requirements.txt b/requirements.txt index 02588a216..4603d6ea3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ sphinx==1.6.1 git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme -./pypa-theme +git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme