Update RtD and Sphinx configuration (#38046)
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							5840a00000
						
					
				
				
					commit
					e483762015
				
			
							
								
								
									
										16
									
								
								lib/spack/docs/_pygments/style.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								lib/spack/docs/_pygments/style.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| # Copyright 2013-2023 Lawrence Livermore National Security, LLC and other | ||||
| # Spack Project Developers. See the top-level COPYRIGHT file for details. | ||||
| # | ||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||
| 
 | ||||
| # The name of the Pygments (syntax highlighting) style to use. | ||||
| # We use our own extension of the default style with a few modifications | ||||
| from pygments.styles.default import DefaultStyle | ||||
| from pygments.token import Generic | ||||
| 
 | ||||
| 
 | ||||
| class SpackStyle(DefaultStyle): | ||||
|     styles = DefaultStyle.styles.copy() | ||||
|     background_color = "#f4f4f8" | ||||
|     styles[Generic.Output] = "#355" | ||||
|     styles[Generic.Prompt] = "bold #346ec9" | ||||
| @@ -149,7 +149,6 @@ def setup(sphinx): | ||||
| # Get nice vector graphics | ||||
| graphviz_output_format = "svg" | ||||
| 
 | ||||
| 
 | ||||
| # Add any paths that contain templates here, relative to this directory. | ||||
| templates_path = ["_templates"] | ||||
| 
 | ||||
| @@ -233,30 +232,8 @@ def setup(sphinx): | ||||
| # 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. | ||||
| # We use our own extension of the default style with a few modifications | ||||
| from pygments.style import Style | ||||
| from pygments.styles.default import DefaultStyle | ||||
| from pygments.token import Comment, Generic, Text | ||||
| 
 | ||||
| 
 | ||||
| class SpackStyle(DefaultStyle): | ||||
|     styles = DefaultStyle.styles.copy() | ||||
|     background_color = "#f4f4f8" | ||||
|     styles[Generic.Output] = "#355" | ||||
|     styles[Generic.Prompt] = "bold #346ec9" | ||||
| 
 | ||||
| 
 | ||||
| import pkg_resources | ||||
| 
 | ||||
| dist = pkg_resources.Distribution(__file__) | ||||
| sys.path.append(".")  # make 'conf' module findable | ||||
| ep = pkg_resources.EntryPoint.parse("spack = conf:SpackStyle", dist=dist) | ||||
| dist._ep_map = {"pygments.styles": {"plugin1": ep}} | ||||
| pkg_resources.working_set.add(dist) | ||||
| 
 | ||||
| pygments_style = "spack" | ||||
| sys.path.append("./_pygments") | ||||
| pygments_style = "style.SpackStyle" | ||||
| 
 | ||||
| # A list of ignored prefixes for module index sorting. | ||||
| # modindex_common_prefix = [] | ||||
| @@ -341,16 +318,15 @@ class SpackStyle(DefaultStyle): | ||||
| # Output file base name for HTML help builder. | ||||
| htmlhelp_basename = "Spackdoc" | ||||
| 
 | ||||
| 
 | ||||
| # -- Options for LaTeX output -------------------------------------------------- | ||||
| 
 | ||||
| latex_elements = { | ||||
|     # The paper size ('letterpaper' or 'a4paper'). | ||||
|     #'papersize': 'letterpaper', | ||||
|     # 'papersize': 'letterpaper', | ||||
|     # The font size ('10pt', '11pt' or '12pt'). | ||||
|     #'pointsize': '10pt', | ||||
|     # 'pointsize': '10pt', | ||||
|     # Additional stuff for the LaTeX preamble. | ||||
|     #'preamble': '', | ||||
|     # 'preamble': '', | ||||
| } | ||||
| 
 | ||||
| # Grouping the document tree into LaTeX files. List of tuples | ||||
|   | ||||
| @@ -1,13 +1,8 @@ | ||||
| # These dependencies should be installed using pip in order | ||||
| # to build the documentation. | ||||
|  | ||||
| sphinx>=3.4,!=4.1.2,!=5.1.0 | ||||
| sphinxcontrib-programoutput | ||||
| sphinx-design | ||||
| sphinx-rtd-theme | ||||
| python-levenshtein | ||||
| # Restrict to docutils <0.17 to workaround a list rendering issue in sphinx. | ||||
| # https://stackoverflow.com/questions/67542699 | ||||
| docutils <0.17 | ||||
| pygments <2.13 | ||||
| urllib3 <2 | ||||
| sphinx==6.2.1 | ||||
| sphinxcontrib-programoutput==0.17 | ||||
| sphinx_design==0.4.1 | ||||
| sphinx-rtd-theme==1.2.1 | ||||
| python-levenshtein==0.21.0 | ||||
| docutils==0.18.1 | ||||
| pygments==2.15.1 | ||||
| urllib3==2.0.2 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user