Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
dae00fec
Commit
dae00fec
authored
8 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Move all documentation generation into conf.py
- extra steps in Makefile are ignored by readthedocs
parent
47bf7ecb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/spack/docs/Makefile
+1
-19
1 addition, 19 deletions
lib/spack/docs/Makefile
lib/spack/docs/basic_usage.rst
+2
-2
2 additions, 2 deletions
lib/spack/docs/basic_usage.rst
lib/spack/docs/conf.py
+29
-0
29 additions, 0 deletions
lib/spack/docs/conf.py
with
32 additions
and
21 deletions
lib/spack/docs/Makefile
+
1
−
19
View file @
dae00fec
...
...
@@ -21,24 +21,6 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
all
:
html
#
# This autogenerates a package list.
#
package_list
:
spack package-list
>
package_list.rst
#
# Generate a command index
#
command_index
:
cp
command_index.in command_index.rst
echo
>>
command_index.rst
grep
-ho
'.. _spack-.*:'
*
rst
\
| perl
-pe
's/.. _([^:]*):/ * :ref:`\1`/'
\
|
sort
>>
command_index.rst
custom_targets
:
package_list command_index
#
# This creates a git repository and commits generated html docs.
# It them pushes the new branch into THIS repository as gh-pages.
...
...
@@ -92,7 +74,7 @@ clean:
-
rm
-f
package_list.rst command_index.rst
-
rm
-rf
$(
BUILDDIR
)
/
*
$(
APIDOC_FILES
)
html
:
apidoc
custom_targets
html
:
apidoc
$(
SPHINXBUILD
)
-b
html
$(
ALLSPHINXOPTS
)
$(
BUILDDIR
)
/html
@
echo
@
echo
"Build finished. The HTML pages are in
$(
BUILDDIR
)
/html."
...
...
This diff is collapsed.
Click to expand it.
lib/spack/docs/basic_usage.rst
+
2
−
2
View file @
dae00fec
...
...
@@ -779,7 +779,7 @@ use the triplet form of platform, operating system and processor.
Users on non-Cray systems won't have to worry about specifying the architecture.
Spack will autodetect what kind of operating system is on your machine as well
as the processor. For more information on how the architecture can be
used on Cray machines, check here :ref:`
spack-cray
`
used on Cray machines, check here :ref:`
cray-support
`
.. _sec-virtual-dependencies:
...
...
@@ -1798,7 +1798,7 @@ This issue typically manifests with the error below:
A nicer error message is TBD in future versions of Spack.
.. _
spack-cray
:
.. _
cray-support
:
Spack on Cray
-----------------------------
...
...
This diff is collapsed.
Click to expand it.
lib/spack/docs/conf.py
+
29
−
0
View file @
dae00fec
...
...
@@ -37,7 +37,10 @@
import
sys
import
os
import
re
import
shutil
import
subprocess
from
glob
import
glob
# 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
...
...
@@ -50,10 +53,36 @@
os
.
environ
[
'
SPACK_ROOT
'
]
=
spack_root
os
.
environ
[
'
PATH
'
]
+=
os
.
pathsep
+
'
$SPACK_ROOT/bin
'
# Get the spack version for use in the docs
spack_version
=
subprocess
.
Popen
(
[
spack_root
+
'
/bin/spack
'
,
'
-V
'
],
stderr
=
subprocess
.
PIPE
).
communicate
()[
1
].
strip
().
split
(
'
.
'
)
#
# Generate package list using spack command
#
with
open
(
'
package_list.rst
'
,
'
w
'
)
as
plist_file
:
subprocess
.
Popen
(
[
spack_root
+
'
/bin/spack
'
,
'
package-list
'
],
stdout
=
plist_file
)
#
# Find all the `spack-*` references and add them to a command index
#
command_names
=
[]
for
filename
in
glob
(
'
*rst
'
):
with
open
(
filename
)
as
f
:
for
line
in
f
:
match
=
re
.
match
(
r
'
.. _(spack-[^:]*)
'
,
line
)
if
match
:
command_names
.
append
(
match
.
group
(
1
).
strip
())
shutil
.
copy
(
'
command_index.in
'
,
'
command_index.rst
'
)
with
open
(
'
command_index.rst
'
,
'
a
'
)
as
index
:
index
.
write
(
'
\n
'
)
for
cmd
in
command_names
:
index
.
write
(
'
* :ref:`%s`
\n
'
%
cmd
)
# Set an environment variable so that colify will print output like it would to
# a terminal.
os
.
environ
[
'
COLIFY_SIZE
'
]
=
'
25x80
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment